Create Draft
Create a draft on an inbox, either as a new conversation or as a reply.
POST
A draft is an unsent message. Omit
thread_id and reply_to_email_id for a
draft that starts a new thread. Pass both together for a reply draft in an
existing thread.
A reply draft without to is addressed to the sender of the email it replies
to, or to its Reply-To when set. For an email the inbox sent, it defaults to
that email’s to recipients. Send to: [] to leave it empty. cc, bcc, and
subject are never filled in.
At least one of to, cc, bcc, subject, text, html, or attachments
must be non-empty. The combined recipients of to, cc, and bcc cannot
exceed 50.
Returns 201 for a new draft. Only one unsent reply draft can target an email,
so a reply draft request for an email that already has one returns 200 with
the ID of the existing draft. That request ignores every other field, except
attachments, which replaces the attachments of the existing draft.
A reply draft created without subject stores an empty subject and gets no
Re: prefix. Set a subject before you send it.
Path Parameters
Body Parameters
string | string[] | null
Recipients. For multiple addresses, send an array of strings. Each value can
include a friendly name, for example
Ada Lovelace <ada@example.org>.string | string[] | null
CC recipients. For multiple addresses, send an array of strings.
string | string[] | null
BCC recipients. For multiple addresses, send an array of strings.
string | null
The subject. Max 2000 characters. A string that is only whitespace, or that
contains a line break, is rejected.
string | null
The HTML body.
string | null
The plain-text body.
array
Files to store on the draft. Each one needs
content, filename, and
content_type. path and content_id return 422. An empty file or a
blocked file type, such as .exe, returns 422. The files on a draft can
total at most 25 MB. A file counts as
draft content.Headers
string
Add an idempotency key to prevent duplicated drafts.
- Should be unique per API request
- Idempotency keys expire after 24 hours
- Have a maximum length of 256 characters
- A retry with the same key returns the first successful response, with the
idempotent-replayed: trueheader - A failed request is not stored, so you can retry it with the same key
- Reusing the key with a different body, or while the first request is still
running, returns a
409
Response Fields
string
Always
inbox_draft.string
The ID of the draft.