Webhook and event

Webhook

Webhooks is a notification mechanism to inform third-party systems about contract events. Every time an event occurs, Oneflow makes a corresponding HTTP request to the webhooks connected to the template type, using the URLs defined in the account the contract that the contract is in.

📘

Note:

The webhook will retry the request until it receives a successful response (HTTP 200) or makes a total of 10 unsuccessful attempts.

The table below shows all the attributes available for each webhook notification:

AttributeTypeDescription
contractobjectIndicates the contract linked to the webhook. See Contract ID.
callback_idstringThe callback ID. This identifier is the same for all calls (retries) of the same event webhook. Thus, it can be used to ensure that events are processed only once. It is also used to authenticate the request by calculating the webhook signature.
eventsarray[object]The list of event objects. See Event.
signaturestringThe signature of the webhook request. See Webhook API Security.

Contract ID

AttributeTypeDescription
idinteger(signed_integer_id)The ID of the contract.

Event

A contract event is created by actions or changes in the contract and is also the basis for triggering webhooks.

The table below displays all the attributes available for each contract event:

AttributeTypeDescription
created_timestring(datetime)The time the event was created.
idinteger(signed_integer_id)The ID of the event.
typestringThe type of event that triggered this webhook. See the Webhook type page.

🚧

Note:

A webhook contains only the attributes listed in the table above. If you need additional information about an event or related contract changes, they need to be requested using the REST API.