menu
Send a transactional message
Sends a transactional email: the referenced template is rendered with the contact’s stored attributes merged with variables (request values win) and queued for delivery through the account’s email server. Delivery is asynchronous, and the recipient contact is auto-created if unknown. A hard-bounced (suppressed) recipient still returns 200 with status bounce_blocked - the message is recorded but never delivered.
Endpoint
POST https://api.sendstreak.com/v2/accounts/{accountId}/messages
All v2 endpoints require a bearer token - see Authentication.
Path parameters
| Parameter | Type | Description |
|---|---|---|
accountId | string | The account the request is scoped to. |
Request body
Transactional send request. variables are merged over the contact’s stored attributes for template rendering (request values win).
| Field | Type | Required | Description |
|---|---|---|---|
rcpt | string (email) | yes | Recipient email; the contact is auto-created if unknown. |
templateSlug | string | yes | Slug of the email template to render - shown on the template’s edit screen. |
variables | object | no | Key-value pairs for template variables; they override the contact’s stored attributes for this send. |
attachments | array of objects | no | Up to 10 attachments, base64-encoded. |
attachments[].filename | string | yes | File name the recipient’s email client shows. |
attachments[].content | string | no | Base64-encoded body. |
Response
The created message (lean view - the rendered content is not echoed back).
{
"_id": "665f0a2b1c9d440012ab34cd",
"createDate": "2026-07-07T09:30:00.000Z",
"parentType": "transactional",
"rcpt": "[email protected]",
"status": "queued",
"subject": "Welcome to Acme!",
"templateSlug": "sign-up-thank-you"
}
Errors
| Status | Description |
|---|---|
400 | The request body or parameters failed validation. |
401 | Missing or invalid token, or the token is not authorized for this account/user. |
402 | The account is over its plan’s send limit. |
404 | The requested resource does not exist. |
See Errors and rate limits for what error responses look like.
Curl example
curl --location --request POST 'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/messages' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"rcpt": "[email protected]",
"templateSlug": "sign-up-thank-you",
"variables": {
"planId": "professional",
"country": "Germany"
},
"attachments": [
{
"filename": "hello.txt",
"content": "SGVsbG8gV29ybGQhCgo="
}
]
}'