Automations
Invoke Ad Hoc Automation
Audiences
AuthTokens
Brands
Inbound
Lists
Messages
Notifications
Profiles
Tenants
User Preferences
User Tenants
Automations
Invoke Ad Hoc Automation
Invoke an ad hoc automation run. This endpoint accepts a JSON payload with a series of automation steps. For information about what steps are available, checkout the ad hoc automation guide here.
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
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"
}