Webhook Configuration

When using the Treefort API, you will have the option of setting up a webhook, where Treefort will send real-time updates on files, clients, and ID verification requests to your webhook URL endpoint. This section describes how to configure your webhook to accept Treefort updates.

Setting up your webhook

You will need to ensure your webhook is configured with the following specifications:

Accept: application/json or text/plain
Type: HttpPost

Please Note:

  1. You will need to provide Treefort with your webhook URL endpoint and media type (application/json or text/plain) once it has been set up.

  2. Treefort does not check any response returned from the webhook.

  3. Treefort will send the request encrypted and signed. Decrypt the request in the same way as other API methods.

  4. The webhook will need to accept the request payload as a body parameter, an example of which is shown below:

{
	"fileReferenceId": "string",
	"clientRequestId": "string",
	"requesterReferenceId": "string",
	"requesterClientRequestId": "string",
	"eventId": integer,
	"event": "string"
}

Body Parameters

The following table details the body parameters that will be sent in the request payload to the webhook URL endpoint.

AttributeTypeDescription
fileReferenceIdStringThe unique reference ID created by Treefort for internal purposes. This ID is used to track all ID verifications associated with this request (i.e. all ID verifications associated to a file), and can be provided to Treefort for troubleshooting purposes.

Note: this attribute will be null if the eventId does not begin with a 1 (e.g. 1XX). Event IDs are outlined later in this section.
clientRequestIdStringThe unique reference ID created by Treefort for internal purposes. This ID is used to track the ID verification request associated with only this client, and can be provided to Treefort for troubleshooting purposes.

Note: this attribute will be null if the eventId does not begin with a 2 or 3 (e.g. 2XX or 3XX). Event IDs are outlined later in this section.
requesterReferenceIdStringThe reference ID created by your organization and associated with this fileReferenceId is returned.

Note: this attribute will be null if the eventId does not begin with a 1 (e.g. 1XX). Event IDs are outlined later in this section.
requesterClientRequestIdStringThe unique reference ID created by your organization is returned. This ID is used to track the ID verification associated with only this client.

Note: this attribute will be null if the eventId does not begin with a 2 or 3 (e.g. 2XX or 3XX). Event IDs are outlined later in this section.
eventIdIntegerThe unique ID associated with the event returned. A list of all event IDs and their default descriptions are outlined later in this section.
eventStringThe description associated with the eventId. A list of all event IDs and their default descriptions are outlined later in this section.

Event IDs and Descriptions

Below is a list of all event IDs and their default descriptions. Note: the description for each Event ID can be customized for your organization.

Events in the 1XX range correspond to events associated with a particular file.

Events in the 2XX and 3XX range correspond to events associated with a particular ID verification request.

Event IDDefault Description
101File has been created.
102File has been cancelled.
103File has been closed.
201Verification request has been created.
202Verification request has been updated.
203Verification request has been sent.
204Verification request has been cancelled.
205Verification request has been completed.
206Verification report has been set to review.
207Verification report has been verified.
208Verification report has been expired.
209Verification report has been rejected.
210Verification request been re-initialized.
211Verification link has been resent.
301Verification report has been downloaded.