Start a workflow for a subscriber.
Returns a workflow execution object representing representing the execution of the workflow for the subscriber. Returns an empty object if no execution was started. An execution may not start due to the workflow being disabled, start conditions or execution count restrictions, or the immediate firing of a stop condition.
Response format | JSON |
---|---|
Requires authentication? | Yes |
sid required | The |
---|---|
kwargs optional | A dictionary of arguments to pass to the workflow being started. |
curl \
-X POST \
-u '[SID]:[TOKEN]' \
-H 'Content-Type: application/json' \
-d '{ \
"sid": [WORKFLOW_SID], \
"kwargs": { \
"order": { \
"id": "ABC123", \
"customer": { \
"firstName": "Joe", \
"lastName": "Smith" \
} \
} \
} \
}' \
'https://api.essential.to/v2/account/channels/p03Gjl8Uzn0RkZSpHXHnrw/subscribers/15009998080/automation_workflow_executions/start'
# Sample response
{
"sid": "2_YNucxnudJfR8L5dqUv3Q",
"status": "running",
"start_date": "2020-05-13T20:28:38.000Z",
"completion_date": null,
"created_at": "2020-05-13T20:28:38.000Z",
"updated_at": "2020-05-13T20:28:39.000Z",
"started_by": "api",
"channel_sid": "p03Gjl8Uzn0RkZSpHXHnrw",
"subscriber_sid": "5YIMqn98M5qvWdAvDPwGBA",
"automation_workflow_sid": [WORKFLOW_SID],
"kwargs": {
"order": {
"id": "ABC123",
"customer": {
"firstName": "Joe",
"lastName": "Smith"
}
}
}
}
Python coming soon.
Node coming soon.