Create or Update Workflow
Create a new workflow or update the draft version of an existing one
Authorizations
Pass as Authorization: ServiceToken <token>. You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.
Path Parameters
Query Parameters
Body
You can trigger a workflow either via API by passing its slug directly, or through an event-based system where the workflow runs when a specific event occurs. You can compare both methods here. If the workflow should run when a user enters or exits a list, use trigger_type = event.
event, api Override recipients using a property from the trigger payload. Type defines if the workflow should run for a list of users or a single object. Only applicable for trigger_type = event.
user, single_object_fields "user"
JQ expression to override tenant. Only applicable for trigger_type = event.
".tenant_id"
Response
Workflow created. The response includes the saved workflow object along with a validation_result field that indicates whether the workflow configuration is valid. When commit=true is passed, a commit_result field is also returned.