POST /send
Custom Formatting
To improve working with cURL, Courier also supports a custom urlencoded format that can be used in the place of JSON.
This format allows nested data values using square bracket syntax. This is useful when passing profile
and data
parameters.
For example, a cURL --data
option with the profile
parameter and a nested email
would look like this:
--data "profile[email]=test@example.com"
Send Response Data
Sending a message is an async process. So upon submission of a message, only a requestId will be returned.
{ "requestId": "87e7c05b-4f46-fda24e356e23" }
Example
Method: POST
URL: https://api.courier.com/send
Body:
{
"message": {
"to": {
"email": "hello@example.com"
},
"template": "abcdef12345678",
"data": {
"name": "John Doe"
},
"routing": {
"method": "single",
"channels": [
"email"
]
}
}
}