/mail/send endpoint is the core of turboSMTP’s HTTP API. Use it to send transactional receipts, password resets, marketing campaigns, or any other programmatic email from your application. You submit a JSON payload containing the sender, recipients, subject, and body content, and turboSMTP queues and delivers the message through its global relay infrastructure. This endpoint uses a dedicated sending host and requires Consumer Key / Secret headers with the HTTP API Sending permission enabled.
Endpoint
Global endpoint
EU endpoint
Request headers
Request body parameters
The sender’s email address, optionally with a display name:
Name <sender@example.com>. Use a domain you have verified with turboSMTP.One or more recipient email addresses, comma-separated (e.g.
alice@example.com, bob@example.com).The email subject line displayed in the recipient’s inbox. The API specification sets a maximum of 700 characters.
The plain-text body of the email. Recommended for maximum deliverability: include this alongside
html_content whenever possible.Comma-separated list of email addresses to BCC. Recipients in this field are hidden from all other recipients.
A JSON object of additional SMTP headers to attach to the message. Example:
{"Reply-To": "support@example.com", "X-Mailer": "MyApp"}.A custom identifier included in event webhook data when provided. Use a UUID to correlate sends with your application records.
A campaign identifier used to group messages. This is a top-level JSON body field with this exact capitalization, separate from
custom_headers. Read it back through analytics (filter_by=x_campaign_id). The X-Campaign-Id header on the delivered message is internal routing data, not this value.Accepted by the request schema, but
/mail/send does not use it. A request that carries only mime_raw is delivered with an empty body, and the raw message’s headers and subject are discarded; when content or html_content is present, those are sent instead. To send a pre-built MIME message, use the SMTP relay.An array of attachment objects. See the Attachment object section below.
Attachment object
Each item in theattachments array must be an object with the following fields:
The filename of the attachment as it will appear to the recipient, including extension (e.g.
invoice-2024.pdf).The Base64-encoded content of the file. Encode the raw binary of the file before including it here.
Optional bare identifier for an inline attachment, such as
logo. For a sender at example.com, reference it in HTML as cid:logo@example.com. See inline images.Example request
Terminal
Example with attachment
Terminal
Successful response
Response codes
Error responses
Error formats vary by failure. Inspect the HTTP status and the returnedmessage, errors, or details fields. A successful queue response does not confirm final delivery; use analytics or delivery webhooks for that.
Missing or invalid credentials
Missing or invalid credentials
Invalid recipient address
Invalid recipient address
Missing sender address
Missing sender address
Insufficient sending credits
Insufficient sending credits
Deactivated account
Deactivated account
Keep the total message size, including attachments and encoding overhead, under 24 MB. This is not a 24 MB raw-file allowance. See attachment limits.