Skip to main content
The email goes out through the provider’s SMTP server (Gmail included), from the user’s own address, and lands in their Sent folder.
With curl, use --form-string for HTML bodies: -F 'body=<p>…' treats a value starting with < as a file name.

Fields

string
required
The account to send from (acc_…).
attendee[]
Recipients as [{ "display_name": "Ana", "identifier": "ana@example.com" }], a list of addresses, or one comma-separated string. At least one recipient is required (except for replies).
string
string
HTML body. A text version is made from it automatically.
string
Plain-text body, if you want to set it yourself.
attendee
display_name changes the sender’s name. identifier sends from an alias; the provider must allow it (a Gmail “Send mail as” address, for example).
string
The email_… id of an email to answer. See Replies and threads.
attendee[]
Addresses for the Reply-To header.
object[]
[{ "name": "X-Campaign", "value": "q4" }]. Allowed: any X-… header, List-Unsubscribe, List-Unsubscribe-Post, and Reply-To. Content-Type is accepted and ignored.
object
{ "opens": true, "links": true, "label": "…" }. See Tracking.
file[] | object[]
Multipart: files in fields named attachments. JSON: [{ "filename", "content_type", "content" }] with content in base64.
In a multipart request, send to, cc, bcc, tracking_options and custom_headers as JSON text. Requests are limited to 30 MB in total, attachments included. Providers have their own limits, for example 25 MB for Gmail.

Response

201 Created
  • message_id identifies the email in every mailbox it reaches. Its Sent copy has the same message_id.
  • provider_id is null: SMTP doesn’t return an id when sending. The Sent copy gets its ids when it syncs.
  • tracking_id is a trk_… id when you use tracking_options, otherwise null.
  • The Sent copy syncs a moment later, and you receive an email.new event with the full email and origin: "api".
If a send request times out on your side, don’t retry blindly: the email may already be on its way. Check the Sent folder (GET /api/v1/emails?account_id=acc_…&role=SENT) for the message_id first.