Authorizations
You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.
Path Parameters
Workspace where the workflow should be created (staging, production, etc.)
Unique identifier of the workflow. You can get it from workflow settings for existing workflows.
Query Parameters
Whether to commit the workflow immediately. Workflow will be successfully committed only if validation_result.is_valid is true.
Commit message describing the changes (required if commit=true)
Body
Human-readable name of the workflow. Workflow slug is generated from this name for new workflows.
"Welcome Sequence"
Notification category of the workflow. Used to apply category-specific settings and preferences.
"transactional"
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
Node tree structure of the workflow. Contains the nodes array with all workflow nodes and their configuration.
Description explaining the usecase of the workflow
Whether the workflow should be enabled
Tags are used for grouping and filtering workflows in list.
["onboarding-sequence"]
Schema to validate workflow api data structure. Used only when trigger_type = api.
Events that trigger this workflow (required if trigger_type = event). In case of list entry/exit, event names will be $USER_ENTERED_LIST - <list_id>
and $USER_EXITED_LIST - <list_id>
respectively.
Throttle settings for the workflow. This is used to limit the number of times a workflow can be executed per user in a given time period.
Trigger Conditions. Workflow will be executed if any of the conditions in this array evaluate to true.
JQ expression to override recipients when override_recipients_type = user
. Only applicable for trigger_type = event
.
".distinct_id"
JQ expression to override recipients with object when override_recipients_type = single_object_fields
. Only applicable for trigger_type = event
.
{
"id": ".object_id",
"object_type": ".object_type",
"$object_subscriptions_query.depth": "2"
}
JQ expression to override actor. Only applicable for trigger_type = event
.
".actor_id"
Response
The response includes the same workflow object as input along with a validation_result field that indicates whether the workflow configuration is valid.