Authenticate with your workspace API key.
GET /notifications can return both Classic and Elemental rows; inspect each item if you need a single editor type.Prerequisites
- Courier API key
curlfor the examples (the bash flow usesjqto read ids from JSON responses)- A routing strategy id (
strategy_idinsideroutingon a template). Copy it from any template that already has routing configured: open the template in Studio, or callGET /notifications/{id}and readrouting.strategy_id.
nt_...). The steps below store that in TEMPLATE_ID after the create call.
Step 1: List templates
See what is already on the workspace. The response is paginated; usecursor from paging for the next page if you need it.
cURL
Step 2: Create a draft with Elemental content
Create a new notification template withPOST /notifications. The body is published, plus a notification object: metadata (name, tags, brand, subscription), routing with a strategy_id from your workspace, and content in the Elemental shape (version and elements). Courier returns a template id (commonly nt_...); use that value as TEMPLATE_ID in the following steps.
To replace an existing template in full, use
PUT /notifications/{id} with the same notification object shape. See Replace Notification Template. To create without overwriting, keep using POST /notifications as below. If validation fails, compare your payload to Create Notification Template.Step 3: Publish
Publish the current draft (or a specific version) withPOST /notifications/{id}/publish.
cURL
Step 4: Read published content
Confirm what is live:cURL
Step 5: Send a message with your template
CallPOST /send with your template id and values for the variables used in the draft (order_id, name, tracking_url). Put the recipient in message.to; the example below uses email. You can send to a Courier profile with to: { "user_id": "..." } instead. See Send a message for all to shapes.
The template must have a delivery channel and provider configured in Studio (for example email) or the send can fail routing. Use a Test API key while iterating.
What you built
You listed workspace templates, created a draft with Elemental content and routing, published it, read the published blocks, and sent a message that references the returned template id.What’s Next
Templates API reference
Endpoints, scope, and links to API Reference
How to Build Notifications with Elemental
Patterns for
content and channel overridesSend API
Request body, profiles, and routing
Sending overview
Strategies, channels, and production sending