Workflow Event Triggers
List of valid attributes:
| Attribute | Description | Specifics |
|---|---|---|
| account_id | ID of an account a trigger belongs to | Cannot be set |
| created_at | Timestamp of creation | Cannot be set |
| event | The action that triggers the workflow | Required. See valid combinations below |
| item_type | The type of entity that the event applies to | Required. Must be either contract_signature, user_document, field_value or user |
Valid event triggers:
| item_type | Allowed event values |
|---|---|
| contract_signature | provide |
| user_document | upload |
| field_value | create, update |
| user | create |
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
| Parameter | Description |
|---|---|
| workflow_id | The 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
| Parameter | Description |
|---|---|
| workflow_id | The ID of the workflow that the trigger belongs to |
| event_trigger_id | The ID of the event trigger to update |