Save a draft, creating or replacing it. Idempotent.

put/v1/mailboxes/{mailboxId}/drafts/{draftId}

Request

  • The document declares no server URL.
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL /authorize, token URL /oauth/token, scopes: email.write)
    • HTTP bearer

Path parameters

mailboxIdstring required
draftIdstring required

The writer's own id for it: letters, digits and hyphens, up to 64.

Request body

threadIdstring

The conversation this answers, when it is a reply — that thread's reply draft.

inReplyTostring

A threading header value that still fits one RFC 5322 §2.1.1 line.

fromstring

The address it will go from, as chosen.

tostring

The To line as typed.

ccstring
bccstring
subjectstring

RFC 5322 caps a subject line at 998 characters.

textstring

The words so far. 200,000 characters fit the mailbox's 2 MB row however they encode.

Response

The request has succeeded.

idstring required

Chosen by the writer's client — a UUID — so saving is a PUT and a retried save is harmless.

threadIdstring

The conversation this answers, when it is a reply — that thread's reply draft.

inReplyTostring

A threading header value that still fits one RFC 5322 §2.1.1 line.

fromstring

The address it will go from, as chosen.

tostring

The To line as typed.

ccstring
bccstring
subjectstring

RFC 5322 caps a subject line at 998 characters.

textstring

The words so far. 200,000 characters fit the mailbox's 2 MB row however they encode.

updatedAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.