Skip to content

Workflow Event Triggers

List of valid attributes:

AttributeDescriptionSpecifics
account_idID of an account a trigger belongs toCannot be set
created_atTimestamp of creationCannot be set
eventThe action that triggers the workflowRequired. See valid combinations below
item_typeThe type of entity that the event applies toRequired. Must be either contract_signature, user_document, field_value or user

Valid event triggers:

item_typeAllowed event values
contract_signatureprovide
user_documentupload
field_valuecreate, update
usercreate

Create

Example request:

{
"data": {
"type": "workflow_event_trigger",
"attributes": {
"event": "create",
"item_type": "user"
}
}
}

Example response:

{
"data": {
"id": "85579c3b-22ea-43b8-ab79-d60d05680be5",
"type": "workflow_event_trigger",
"attributes": {
"account_id": "45e9a68c-35ae-4e73-8f9f-8baa6d3c6f7a",
"event": "create",
"item_type": "user"
}
}
}

This endpoint adds a new event trigger to a workflow.

HTTP Request

POST /api/v1/workflows/:workflow_id/event_triggers

URL Parameters

ParameterDescription
workflow_idThe ID of the workflow that the trigger will be added to

Update

Example request:

{
"data": {
"type": "workflow_event_trigger",
"attributes": {
"account_id": "45e9a68c-35ae-4e73-8f9f-8baa6d3c6f7a",
"event": "upload",
"item_type": "user_document"
}
}
}

Example response:

{
"data": {
"id": "85579c3b-22ea-43b8-ab79-d60d05680be5",
"type": "workflow_event_trigger",
"attributes": {
"account_id": "45e9a68c-35ae-4e73-8f9f-8baa6d3c6f7a",
"event": "upload",
"item_type": "user_document"
}
}
}

This endpoint updates an event trigger for a workflow (only if there are no actions connected to the workflow).

HTTP Request

PUT /api/v1/workflows/:workflow_id/event_triggers/:event_trigger_id

URL Parameters

ParameterDescription
workflow_idThe ID of the workflow that the trigger belongs to
event_trigger_idThe ID of the event trigger to update