A webhook allows you to integrate with Oneflow by receiving callbacks whenever there is a new contract event in one of your contracts.

Webhook attributes

The table below shows all the attributes available for a webhook:

AttributeTypeDescription
callback_urlstringThe webhook's callback url.
filtersarrayThe list of filters associated with the webhook. See Filter.
integration_instanceinteger(signed_integer_id)Integration instance ID which the webhook is connected to.
legacy_webhookbooleanIndicates if the webhook is a legacy webhook.
template_group_idinteger(signed_integer_id)Template group ID which the webhook is connected to.
webhook_idinteger(signed_integer_id)The ID of the webhook.

Filter

A filter denotes an object in the filters array. A filter containsfilter_rules.

AttributeTypeDescription
filter_rulesarrayRepresents a list of filter rules which can be associated with one webhook filter object. See Filter rule.

Filter rule

A filter rule denotes an object in the filter_rules array. A filter rule contains type and values.

AttributeTypeDescription
typestringRepresents the type of the filter rule. Currently, there are two types of filter rules available; EVENT_TYPE and WORKSPACE.
valuesarrayContains a list of values related to the type of the filter rule. If it is an EVENT_TYPE, values are a list of strings that are any of the contract events. If it is a WORKSPACE, values are a list of integers of workspace IDs.