Skip to content

Workflow Expiration Triggers

Attribute Description Details
account_id ID of the account the trigger belongs to Cannot be set.
created_at Timestamp of creation Cannot be set.
offset Number of days added to (positive) or subtracted from (negative) the expiration date Required. Integer. Example: -7 is seven days before, 1 is one day after.
offset_unit Unit for the offset Required. Currently only day is supported.
resource_type The type of resource whose expiration date determines the trigger Required. Currently only user_document is supported.
updated_at Timestamp of the latest update Cannot be set.

Example request:

{
"data": {
"type": "workflow_expiration_trigger",
"attributes": {
"offset": -7,
"offset_unit": "day",
"resource_type": "user_document"
}
}
}

Example response:

{
"data": {
"id": "ad21caa3-c798-4be2-8af4-019fec9b21be",
"type": "workflow_expiration_trigger",
"attributes": {
"account_id": "c2546da1-e5ef-4f31-a205-9539c45805d2",
"offset": -7,
"offset_unit": "day",
"resource_type": "user_document"
}
}
}

Creating an expiration trigger also creates the associated workflow trigger linking it to the workflow.

POST /api/v1/workflows/:workflow_id/expiration_triggers

Parameter Description
workflow_id The ID of the workflow the trigger will be attached to

Example request:

{
"data": {
"type": "workflow_expiration_trigger",
"attributes": {
"offset": -14
}
}
}

Example response:

{
"data": {
"id": "ad21caa3-c798-4be2-8af4-019fec9b21be",
"type": "workflow_expiration_trigger",
"attributes": {
"account_id": "c2546da1-e5ef-4f31-a205-9539c45805d2",
"offset": -14,
"offset_unit": "day",
"resource_type": "user_document"
}
}
}

This endpoint updates an expiration trigger in a workflow.

PUT /api/v1/workflows/:workflow_id/expiration_triggers/:expiration_trigger_id

Parameter Description
workflow_id The ID of the workflow that the trigger belongs to
expiration_trigger_id The ID of the expiration trigger to update