Skip to navigation

Send message

Sends an email to a recipient using a template of the account. The send is asynchronous: the API responds 202 Accepted immediately with a message_id; the events (SENT, DELIVERED, BOUNCED, OPENED, CLICKED…) are notified later through the webhook, correlated by that message_id.

Authentication

x-api-keystring

Account authentication key. The App-Key must have the Email channel enabled and a sender (mailing output) linked; it cannot be used against the endpoints of other channels.

OR
AuthorizationBearer

OAuth 2.0 access token issued by POST /api/oauth/token (client-credentials). Takes precedence over x-api-key when both are sent. See the Authentication section.

Request

This endpoint expects an object.
tostringRequiredformat: "email"<=254 characters
Recipient address.
template_idstringRequiredformat: "^[a-fA-F0-9]{24}$"

Id of an active GENERAL template of the account.

subjectstringRequired1-255 characters

Subject of the email. It is used as is (no variables).

variablesmap from strings to strings or doubles or booleansOptional

Values for the template placeholders. Keys are the variable names (without braces); values can be strings (up to 10,000 characters), numbers or booleans, and are HTML-escaped.

Response

Message accepted for delivery.
statusCodeintegerOptional
messagestringOptional
message_idstringOptional
Id to correlate the webhook events of this message.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error