Send transactional email
If you have questions about the API, please visit our API FAQ page.
A transactional email is created and activated in Inboxroad. Subject, sender and template come from that configuration. This endpoint only queues a send.
The email must be active. An inactive email is rejected.
Send a transactional email
Send a POST request to:
https://webapi.inboxroad.com/api/v2/transactional-emails/{transactional_email_id}/send/Authentication is required using the X-API-Key header. See Authentication & rate limits.
Example request
curl -X POST 'https://webapi.inboxroad.com/api/v2/transactional-emails/{transactional_email_id}/send/' \ -H 'X-API-Key: <your_token>' \ -H 'Content-Type: application/json' \ -d '{ "to": "jane@example.com", "context": { "first_name": "Jane", "token": "reset-token" } }'Path parameters
| Parameter | Description |
|---|---|
| transactional_email_id | Unique identifier of the transactional email (UUID). |
Request fields
| Field name | Type | Required | Description |
|---|---|---|---|
| to | string | Yes | Recipient email address. |
| context | object | No | Values for variables in the template. Defaults to {}. |
Response
When the send is accepted, the API returns 202 with the Inboxroad message id.
The message is queued. 202 means it was accepted, not that it has already been delivered.
{ "message_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"}Possible response codes
| Status code | Description |
|---|---|
| 202 | Send accepted. |
| 400 | The transactional email was not found, is not active, no longer has a sender, or context exceeds 8 KB. |
| 401 | Unauthorized. |
| 422 | transactional_email_id is not a valid UUID, or to is not an email address. |
| 429 | Rate limit exceeded. See Rate limiting. |
A 400 body names the rejected field:
{ "status": ["Only active transactional emails can be sent."]}| Field | Message |
|---|---|
| id | Transactional email not found. |
| status | Only active transactional emails can be sent. |
| sender_profile_id | Transactional email was deactivated because the sender profile no longer exists. |
| context | Send context exceeds 8 KB. |
A 422 body uses the same field map. See Validation errors.