Emails

Send an email

POST/emails

Accepts the email and answers at once with its id; it is sent within seconds (or at scheduled_at). The From address must be on a verified sending domain of the account. Follow what happens with GET /api/v1/emails/{id} or the email.* webhooks. Send an Idempotency-Key to retry safely: a repeat returns the same email and sends nothing twice. The answer carries scheduled_at when the email is scheduled. Instead of html / text you can send a template made in the app: template_id plus variables (subject then defaults to the template's own). It is filled in when the email is accepted; a template that cannot be filled in is refused with 422 and nothing is sent.

Permission: emails:send · on the API key screen: Transactional email → Full access · All permissions

Body parameters

  • fromstringrequired

    The sender: you@yourdomain.com or Your Name <you@yourdomain.com>. Its domain must be a verified sending domain of the account or a subdomain of one. The name may not contain an email address.

    At least 3 characters. At most 320 characters.

  • tostring | string[]required

    Recipient address(es), at most 50: plain addresses (no names). To, cc and bcc together: at most 50. Addresses are lower-cased and repeats dropped (an address already in to is left out of cc and bcc).

  • ccstring | string[]

    Cc address(es), at most 50.

  • bccstring | string[]

    Bcc address(es), at most 50.

  • reply_tostring | string[]

    Reply-To address(es), at most 10.

  • subjectstring

    The subject line: one line, no control characters. Required, unless you send a template_id: then it defaults to the template's subject (filled in with variables).

    At least 1 characters. At most 998 characters.

  • htmlstring

    The HTML body. Sent as given (no templating). At least one of html and text is required (whitespace alone does not count), unless you send a template_id instead. Its length is counted in UTF-16 code units, as JavaScript's .length counts (most emoji count as 2).

    At most 1,048,576 characters.

  • textstring

    The plain-text body. Generated from the HTML when omitted. Its length is counted in UTF-16 code units, as JavaScript's .length counts (most emoji count as 2).

    At most 1,048,576 characters.

  • template_idstring

    Send a transactional template made in the app (Templates → Transactional) instead of html / text: its id, from GET /api/v1/templates. A marketing template is refused (422 template_not_transactional). Filled in with variables when the email is accepted; no unsubscribe footer is added (this is transactional email). Give either template_id or html / text, not both.

    At most 2,000 characters.

  • variablesobject

    Values for the template's tags: {{ name }} reads variables.name, {{ order.total }} reads variables.order.total, and {% for item in items %} repeats over a list. Text, numbers, true / false, null, lists and objects. At most 5 levels, 2000 keys and values in all, keys of at most 100 characters, text values of at most 5000 characters and 200000 characters of keys and text together. Values are written as text, escaped for where they land: a value can never add HTML to the email.

    At most 2000 keys.

  • headersobject

    Extra headers: X-… headers and List-Unsubscribe, List-Unsubscribe-Post, List-Id, In-Reply-To, References, Auto-Submitted, Precedence. At most 15. Name (at most 76 characters) and value together at most 996 characters; the value one line and not empty. Non-ASCII text is allowed in X-… values (sent MIME-encoded); the list and threading headers must be plain ASCII.

    At most 15 keys.

  • tagsobject[]

    Labels for your own use: they come back on the email, in webhooks, and group emails on the Groups screen.

    At most 10 items.

    Show properties
    • namestringrequired

      Letters, digits, _ and -.

      At least 1 characters. At most 64 characters.

    • valuestringrequired

      Letters, digits, _ and -.

      At least 1 characters. At most 256 characters.

  • scheduled_atstring

    Send later: an ISO 8601 date and time WITH its offset (2026-01-31T12:00:00Z or 2026-01-31T07:00:00-05:00), at most 30 days ahead. A time in the past sends now.

    At most 40 characters.

  • attachmentsobject[]

    Files, at most 10 and 10 MB together.

    At most 10 items.

    Show properties
    • filenamestringrequired

      The file name shown to the recipient, e.g. invoice.pdf. No slashes or control characters; executable types (.exe, .bat, .js …) are refused because mail providers reject them.

      At least 1 characters. At most 255 characters.

    • contentstringrequired

      The file's bytes, base64-encoded (standard alphabet, padded, no line breaks).

      At least 1 characters. At most 13,981,016 characters.

    • content_typestring

      MIME type, e.g. application/pdf; parameters such as "; charset=utf-8" are accepted and dropped. The type/subtype is at most 78 characters. Guessed from the file name when omitted.

      At most 127 characters.

    • content_idstring

      Set to embed the file as an inline image: reference it in the HTML as cid:<content_id>. Visible ASCII without spaces, quotes or < >.

      At most 78 characters.

Response

  • objectstring

    One of: email

    At most 2,000 characters.

  • idstring

    At most 2,000 characters.

  • statusstring

    One of: scheduled queued sending sent failed cancelled

    At most 2,000 characters.

  • scheduled_atstring | null

    When it will be sent, while it is scheduled; null when it goes now.

    At most 2,000 characters.