Automations
Invoke Ad Hoc Automation
Audiences
Audit Events
AuthTokens
Inbound
Lists
Messages
Notifications
Profiles
Tenants
Translations
User Preferences
User Tenants
Automations
Invoke Ad Hoc Automation
POST
/
automations
/
invoke
curl --request POST \
--url https://api.courier.com/automations/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"name": "Foo"
},
"profile": {
"tenant_id": "abc-123"
},
"recipient": "user-yes",
"automation": {
"cancelation_token": "delay-send--user-yes--abc-123",
"steps": [
{
"action": "delay",
"until": "20240408T080910.123"
},
{
"action": "send",
"template": "64TP5HKPFTM8VTK1Y75SJDQX9JK0"
}
]
}
}'
{
"runId": "1-65f240a0-47a6a120c8374de9bcf9f22c"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200 - application/json
Example:
"1-65f240a0-47a6a120c8374de9bcf9f22c"
curl --request POST \
--url https://api.courier.com/automations/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"name": "Foo"
},
"profile": {
"tenant_id": "abc-123"
},
"recipient": "user-yes",
"automation": {
"cancelation_token": "delay-send--user-yes--abc-123",
"steps": [
{
"action": "delay",
"until": "20240408T080910.123"
},
{
"action": "send",
"template": "64TP5HKPFTM8VTK1Y75SJDQX9JK0"
}
]
}
}'
{
"runId": "1-65f240a0-47a6a120c8374de9bcf9f22c"
}