Skip to main content

Creates an email draft

POST/v2/users/:email/messages

Creates an email draft in the specified user's Drafts folder. Read-only fields in the request are not written.

Request​

Path parameters

    email stringrequired

    Email address of the user.

Query parameters

    $select string

Body parameters

    message object
    internetMessageId string

    Email message ID formatted per RFC 2822 (Optional field: returned when the $select=internetMessageId query parameter is included in the URL). To request multiple fields, separate them with commas.

    subject string

    Email subject.

    summary string

    Email summary information.

    priority enum

    The importance of the email. Possible values: HIGH, NORMAL, LOW. Defaults to NORMAL. - PRY_HIGH: - PRY_NORMAL:

    Possible values: [PRY_HIGH, PRY_NORMAL]

    isReadReceiptRequested boolean

    Indicates whether a read receipt is requested (Optional field: returned when the $select=isReadReceiptRequested query parameter is added to the URL. Use commas to separate multiple fields.).

    from object

    Owner of the mailbox from which the email is sent. In most cases, this value is the same as the "sender" attribute.

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    toRecipients object[]

    Recipients of the email (optional field: returned after adding the $select=toRecipients query parameter in the URL; use commas to separate multiple fields).

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    ccRecipients object[]

    CC recipients of the email. (Optional field: returned by adding the $select=ccRecipients query parameter in the URL. Separate multiple fields with commas.)

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    bccRecipients object[]

    Blind carbon copy (BCC) recipients of the email (Optional field: returned when the $select=bccRecipients query parameter is included in the URL). To request multiple fields, separate them with commas.

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    replyTo object[]

    The email address used for replies. (Optional field: returned when the $select=replyTo query parameter is added to the URL. For multiple fields, separate them with commas.)

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    body object

    Email body. Can be a combination of HTML and plain text. (Optional field: returned after adding the $select=body query parameter to the URL. Use commas to separate multiple fields.)

    bodyText string

    Email text body.

    bodyHtml string

    HTML-formatted email body.

    internetMessageHeaders object

    Set of email headers as defined by RFC 5322.

    property name* string

    Set of email headers as defined by RFC 5322.

    tags string[]

    List of email tags. (Optional field: Returns when the $select=tags query parameter is added to the URL. Use commas to separate multiple fields.)

Response

    message object

    The newly created email information.

    internetMessageId string

    Email message ID formatted per RFC 2822 (Optional field: returned when the $select=internetMessageId query parameter is included in the URL). To request multiple fields, separate them with commas.

    subject string

    Email subject.

    summary string

    Email summary information.

    priority enum

    The importance of the email. Possible values: HIGH, NORMAL, LOW. Defaults to NORMAL. - PRY_HIGH: - PRY_NORMAL:

    Possible values: [PRY_HIGH, PRY_NORMAL]

    isReadReceiptRequested boolean

    Indicates whether a read receipt is requested (Optional field: returned when the $select=isReadReceiptRequested query parameter is added to the URL. Use commas to separate multiple fields.).

    from object

    Owner of the mailbox from which the email is sent. In most cases, this value is the same as the "sender" attribute.

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    toRecipients object[]

    Recipients of the email (optional field: returned after adding the $select=toRecipients query parameter in the URL; use commas to separate multiple fields).

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    ccRecipients object[]

    CC recipients of the email. (Optional field: returned by adding the $select=ccRecipients query parameter in the URL. Separate multiple fields with commas.)

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    bccRecipients object[]

    Blind carbon copy (BCC) recipients of the email (Optional field: returned when the $select=bccRecipients query parameter is included in the URL). To request multiple fields, separate them with commas.

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    sender object

    The account actually used to generate the email. In most cases, this value is the same as the "from" attribute. Under any circumstances, this value must correspond to the actual mailbox used (Optional field: returned after adding the $select=sender query parameter in the URL. For multiple fields, separate them with commas).

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    replyTo object[]

    The email address used for replies. (Optional field: returned when the $select=replyTo query parameter is added to the URL. For multiple fields, separate them with commas.)

    email string

    Email address of the person or entity.

    name string

    Display name of the person or entity.

    body object

    Email body. Can be a combination of HTML and plain text. (Optional field: returned after adding the $select=body query parameter to the URL. Use commas to separate multiple fields.)

    bodyText string

    Email text body.

    bodyHtml string

    HTML-formatted email body.

    internetMessageHeaders object

    Set of email headers as defined by RFC 5322.

    property name* string

    Set of email headers as defined by RFC 5322.

    folderId string

    Unique identifier of the folder to which the email belongs.

    id string

    Unique email identifier.

    hasAttachments boolean

    Indicates whether the email contains attachments (excluding inline resources).

    isRead boolean

    Indicates whether the email is read.

    conversationId string

    Unique identifier of the conversation to which the email belongs.

    sentDateTime string<date-time>

    Email sending time.

    lastModifiedDateTime string<date-time>

    Last modification time of the message (Optional field: returned when the $select=lastModifiedDateTime query parameter is added to the URL; separate multiple fields with commas).

    receivedDateTime string<date-time>

    Time when the recipient received the email (Optional field: returned after adding the $select=receivedDateTime query parameter to the URL. Separate multiple fields with commas.)

    tags string[]

    List of email tags. (Optional field: Returns when the $select=tags query parameter is added to the URL. Use commas to separate multiple fields.)

    isReplied boolean

    Indicates whether the email has been replied to.

    isForwarded boolean

    Indicates whether the email has been forwarded.

    sendStatus enum

    Email sending status (optional field: returned when $select=sendStatus is added to the URL; use commas to separate multiple fields).

    • none:
    • posting:
    • partial_success:
    • success:
    • failed:
    • unknown:

    Possible values: [none, posting, partial_success, success, failed, unknown]

    size number<int64>

    Email size in bytes.

Errors

401

Access is unauthorized. Please check whether the correct authorization token is passed.

403

No API access permission. Please complete the relevant authorization on the application management page of the domain administrator.