Fields
Recipients as
[{ "email": "ana@example.com", "display_name": "Ana" }]. display_name is optional. At least one recipient is required (except for replies).{ "display_name", "email" }. display_name changes the sender’s name. email sends from an alias; the provider must allow it (a Gmail “Send mail as” address, for example). See Which addresses can send.The email you answer: its
Message-ID (from its headers), or its email_… id. See Replies and threads.[{ "name": "X-Campaign", "value": "q4" }]. Allowed: any X-… header, List-Unsubscribe, List-Unsubscribe-Post, Auto-Submitted, and Reply-To. Content-Type is accepted and ignored. Auto-Submitted marks an automatic email (RFC 3834): auto-replied for an auto-reply, auto-generated for other automatic mail; other values are refused. Mail servers and auto-responders don’t answer such mail, so two auto-responders can’t email each other forever.{ "opens": true, "links": true, "label": "…" }. See Tracking.Your own note about this email, up to 1000 characters, for example which user or rule sent it. It’s never put in the email. It comes back on the email’s Sent copy as
sent_by.metadata (in email.new), so you can tell your own sends apart, like Messenger’s echo metadata.Multipart: files in fields named
attachments. JSON: [{ "filename", "content_type", "content" }] with content in base64.to[0][email], to[0][display_name], to[1][email] and so on (the same for cc, bcc and reply_to). Send 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.
Which addresses can send
GET /api/v1/{account_id}/email-senders lists the addresses you can put in from. For an IMAP account that’s its own address: the one it connected with.
Response
display_name is there when the account has a name. verification_status is verified, pending or unknown; an IMAP account’s own address is always verified.
Response
201 Created
message_ididentifies the email in every mailbox it reaches. Its Sent copy has the sameMessage-IDheader.provider_idisnull: SMTP doesn’t return an id when sending. The Sent copy gets itsemail_…id when it syncs.tracking_idis atrk_…id when you usetracking_options, otherwisenull.- The Sent copy syncs a moment later, and you receive an
email.newevent with the full email,origin: "api",is_echo: falseandsent_by(the API key it was sent with and yourmetadata).