Prerequisites
- A Courier account with at least one configured provider
- At least one published notification template
- Your Courier API key (found in Settings > API Keys)
Saved vs Ad-Hoc Automations
| Saved Automation | Ad-Hoc Automation | |
|---|---|---|
| Definition | Built and published in the Automations Designer | Defined inline in the API request |
| Endpoint | POST /automations/:automationId/invoke | POST /automations/invoke |
| Best for | Reusable workflows triggered by events or API calls | Dynamic workflows where steps change per request |
| Visual editor | Yes; build visually, test with debugger, then invoke via API | No |
Invoke a Saved Automation
When you’ve built an automation in the Automations Designer and published it, invoke it by its ID. The automation defines the steps; you provide the runtime data.Find the automation ID
Open your automation in the Designer. You can find the ID in two places:
- The Invoke tab, which generates a ready-to-use curl command with the ID filled in
- The URL bar:
app.courier.com/automations/:automationId
Invoke with runtime data
data and profile objects become the automation’s run context, accessible in every node via refs.data.* and refs.profile.*.Verify in the debugger
The response includes a
runId. Open the Automations Debugger and search for it to see each step’s status and any errors.Invoke an Ad-Hoc Automation
Define the full workflow inline. This is useful when the steps or recipients need to change per request and you don’t want to create a saved automation for every variation.Define the workflow and invoke
runId you can use to track the automation in the Automations Debugger.The
template field inside each send step refers to a notification template (the content you design in the Template Designer), not an automation. This is the one place where “template” appears in the automations API.What’s Next
Build and Send Your First Automation
Build a multi-step workflow in the visual Automations Designer
How to Send Digests
Batch notifications into periodic digest messages using automations
Trigger Automations from Segment
Connect Segment events to Courier automations
Automation API Reference
Full API documentation for invoking automations