Create Workflow
Creates a workflow definition: the trigger event, audience filters, frequency, and delay between runs. Creating one never starts a run and never sends anything. Steps and edges are added separately.
Authorization
Authorization In: header
Path Parameters
ID of the project that owns the workflow.
Request Body
application/json
Display name of the workflow.
Name of the analytics event that starts a run, e.g. signup.
Maximum times a contact can go through this workflow. Null means no cap.
Minimum delay between runs for the same contact. Pair with minDelayUnit.
Unit for minDelayAmount: MINUTES, HOURS, or DAYS.
ONCE runs a contact through at most once. EVERY re-enters them each time the trigger fires, subject to maxRuns and minDelay.
INACTIVE, PAUSED, or ACTIVE.
Audience filter groups. A contact must match at least one group to enter the workflow.
Attribute filters combined with groupType.
Contact attribute distinct id to filter on.
Attribute type. Defaults to string when omitted.
Comparison operator for the attribute value.
Value to compare the attribute against.
Event filters evaluated over the last 24 hours only.
Analytics event name.
Whether the contact performed the event in the last 24 hours.
How filters in this group are combined.
When true, the group is ANDed with $subscribed == true. Set by email sending, not the filter UI.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://www.saasco.com/api/v2/projects/string/workflows" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "triggerEvent": "string", "frequency": "ONCE", "status": "INACTIVE", "contactsFilterGroups": [ { "filters": [ { "attributeDistinctId": "string", "operator": "equals", "value": "string" } ], "groupType": "AND" } ] }'{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"name": "string",
"projectId": "string",
"triggerEvent": "string",
"maxRuns": -9007199254740991,
"minDelayAmount": 5,
"minDelayUnit": "MINUTES",
"frequency": "ONCE",
"status": "INACTIVE",
"contactsFilterGroups": [
{
"filters": [
{
"attributeDistinctId": "string",
"attributeType": "string",
"operator": "equals",
"value": "string"
}
],
"oneDayEventFilters": [
{
"eventName": "string",
"operator": "performed"
}
],
"groupType": "AND",
"requireSubscribed": true
}
]
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}