Automations
Create an Automation
Use this method to create a new automation campaign workflow from scratch by providing trigger information. For example, an automation that triggers when contacts join a list or an automation that triggers for a contact birthday.
Some common automation examples are included in the request body example dropdown menu.
post/automations/workflows
Query parameters
workflowNamestring
Use this query parameter to provide a workflow name and override the default name.
Request body
Example request
{
"action_name": "list_join",
"engagement_level": "SOMEWHAT",
"type": "Action",
"unique_by": "list_ids"
}Response
Request successful
Example response
{
"name": "Autogenerated Birthday: Basic",
"description": "Send a greeting or special offer to your contacts on or before their birthday",
"structured_tags": [
{
"display_value": "All from-scratch paths",
"key": "GOAL",
"value": "goal_undefined"
}
],
"active_definition": {
"state": "DRAFT",
"trigger": {
"trigger_def": {
"action_name": "list_join",
"engagement_level": "SOMEWHAT",
"type": "Action",
"unique_by": "list_ids"
},
"trigger_version": "1.0.0"
},
"workflow": {
"workflow_def": {
"parameters": {
"automation_flow_id": "9a5982f0-26d8-4e74-b2f5-f415af434fa4",
"automation_flow_name": "Autogenerated Birthday: Basic",
"campaign_id": "861dd493-540a-4e3e-b457-44cfde28a5f0"
},
"correlation_metadata": {
"automation_flow_id": "9a5982f0-26d8-4e74-b2f5-f415af434fa4",
"automation_template_id": "17f58023-559a-41e5-84b7-0e9e213f7aef",
"campaign_id": "861dd493-540a-4e3e-b457-44cfde28a5f0"
},
"tasks": [
{
"correlation_metadata": {
"campaign_activity_id": "0434c0ee-bdd2-47ee-8634-fa163e6b01c1"
},
"id": "79bydf92-rr48-4765-83cb-0e8a8f63ay0",
"timeout": {
"amount": 10,
"time_unit": "HOURS"
}
}
],
"status": "SCHEDULED",
"timeout": {
"amount": 10,
"time_unit": "HOURS"
}
}
}
},
"draft_definition": {
"state": "DRAFT",
"trigger": {
"trigger_def": {
"action_name": "list_join",
"engagement_level": "SOMEWHAT",
"type": "Action",
"unique_by": "list_ids"
},
"trigger_version": "1.0.0"
},
"workflow": {
"workflow_def": {
"parameters": {
"automation_flow_id": "9a5982f0-26d8-4e74-b2f5-f415af434fa4",
"automation_flow_name": "Autogenerated Birthday: Basic",
"campaign_id": "861dd493-540a-4e3e-b457-44cfde28a5f0"
},
"correlation_metadata": {
"automation_flow_id": "9a5982f0-26d8-4e74-b2f5-f415af434fa4",
"automation_template_id": "17f58023-559a-41e5-84b7-0e9e213f7aef",
"campaign_id": "861dd493-540a-4e3e-b457-44cfde28a5f0"
},
"tasks": [
{
"correlation_metadata": {
"campaign_activity_id": "0434c0ee-bdd2-47ee-8634-fa163e6b01c1"
},
"id": "79bydf92-rr48-4765-83cb-0e8a8f63ay0",
"timeout": {
"amount": 10,
"time_unit": "HOURS"
}
}
],
"status": "SCHEDULED",
"timeout": {
"amount": 10,
"time_unit": "HOURS"
}
}
}
}
}