v1

latestOpenAPI 3.1.02026-08-061,5107704.5 MB
Email

Emails.update

Modifies Email or Emails with given id(s)

patch/entities/Emails/{id}

Path parameters

idstring uuid required

ID of Email to update

Query parameters

validation-levelinteger

Specify validation level of Email on update. Use them as bit mask: 0 - validate each field on entity, 2 - validate only changed fields, 4 - validate only system fields, 8 - allows to override readonly fields, 16 - allows to set entity on deleted relationship.

Request body

additional_headersobject

Extra raw email headers preserved from the source message, as a JSON object mapping each header name to a string or a list of strings.

bodystring

HTML body of the email. Returned only to users with read permission on the email content; otherwise empty.

body_summarystring

Plain-text summary of the email body. Returned only to users with read permission on the email content; otherwise empty.

ccstring

Comma-separated list of carbon-copy recipients.

company_email_idstring uuid

Id of the company email.

content_share_mode0 | 1 | 2

How the email body is shared with non-owners (e.g. Private hides the body, Public makes it visible to anyone with read access on the email envelope).

Integer enum value: 0 - Custom, 1 - Private, 2 - Public

content_typestring

MIME content type of the body (e.g. text/html, text/plain).

date_sentstring date-time

Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.

direction1 | 2

Direction of the email (Incoming, Outgoing).

Integer enum value: 1 - OutgoingEmail, 2 - IncomingEmail

error_codeinteger

Numeric error code recorded when the email failed to send. Zero when no error occurred.

is_trackedboolean

True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.

original_idstring

External identifier of the email on the source mailbox (e.g. IMAP Message-ID). Used to deduplicate when re-syncing.

owner_idstring uuid

Id of the email owner.

parent_email_idstring uuid

Id of the parent (master) email.

schedule_settingsobject

Scheduling configuration for delayed sending, as a JSON object; next_schedule is a numeric timestamp and recipients/cc/bcc are lists.

send_atstring date-time

Timestamp at which a scheduled email is queued to be sent. Empty for immediately-sent emails.

senderstring

Sender address as it appeared on the email (free-text "From" header).

sender_account_idstring uuid

Id of the matched sender account.

sender_client_idstring uuid

Id of the matched sender user.

sender_contact_idstring uuid

Id of the matched sender contact.

sentiment0 | 1 | 2

Field whose values are strictly defined with an enumeration of values.

Integer enum value: 0 - Negative, 1 - Neutral, 2 - Positive

share_mode0 | 1 | 2 | 3

Sharing model for the email envelope (e.g. shared with selected sales units or selected users). The matching sharing_units / sharing_clients lists control who is granted access.

Integer enum value: 0 - Standard, 1 - Private, 2 - AllView, 3 - AllEdit

subjectstring

Name of the entity and its default text representation.

template_idstring uuid

Id of the email template.

thread_idstring uuid

Identifier grouping emails belonging to the same conversation thread.

tostring

Comma-separated list of primary recipients.

type1 | 2

Email category (e.g. regular email, mass email, calendar invitation).

Integer enum value: 1 - Standard, 2 - Mass

uidstring

IMAP UID of the email on the source mailbox.

revisioninteger

Revision when entity was lastly changed.

Example request

{
  "body": "string",
  "body_summary": "string",
  "cc": "string",
  "company_email_id": "01234567-abcd-dcba-ffff-000000000000",
  "content_type": "string",
  "date_sent": "2019-01-01T00:00:00",
  "direction": 1,
  "error_code": 1,
  "original_id": "string",
  "owner_id": "01234567-abcd-dcba-ffff-000000000000",
  "parent_email_id": "01234567-abcd-dcba-ffff-000000000000",
  "send_at": "2019-01-01T00:00:00",
  "sender": "string",
  "sender_account_id": "01234567-abcd-dcba-ffff-000000000000",
  "sender_client_id": "01234567-abcd-dcba-ffff-000000000000",
  "sender_contact_id": "01234567-abcd-dcba-ffff-000000000000",
  "subject": "string",
  "template_id": "01234567-abcd-dcba-ffff-000000000000",
  "thread_id": "01234567-abcd-dcba-ffff-000000000000",
  "to": "string",
  "type": 1,
  "uid": "string",
  "revision": 1
}

Response

Modification confirmation. Returns resulting Email

successboolean

True when response succeeded, false on error.

Example response

{
  "success": true,
  "data": {
    "id": "01234567-abcd-dcba-ffff-000000000000",
    "modified": "2019-01-01T00:00:00",
    "created": "2019-01-01T00:00:00",
    "body": "string",
    "body_summary": "string",
    "cc": "string",
    "company_email_id": "01234567-abcd-dcba-ffff-000000000000",
    "content_type": "string",
    "date_sent": "2019-01-01T00:00:00",
    "direction": 1,
    "error_code": 1,
    "original_id": "string",
    "owner_id": "01234567-abcd-dcba-ffff-000000000000",
    "parent_email_id": "01234567-abcd-dcba-ffff-000000000000",
    "send_at": "2019-01-01T00:00:00",
    "sender": "string",
    "sender_account_id": "01234567-abcd-dcba-ffff-000000000000",
    "sender_client_id": "01234567-abcd-dcba-ffff-000000000000",
    "sender_contact_id": "01234567-abcd-dcba-ffff-000000000000",
    "subject": "string",
    "table_name": "string",
    "template_id": "01234567-abcd-dcba-ffff-000000000000",
    "thread_id": "01234567-abcd-dcba-ffff-000000000000",
    "to": "string",
    "type": 1,
    "uid": "string",
    "revision": 1,
    "mailbox_ids": [
      "01234567-abcd-dcba-ffff-000000000000"
    ]
  }
}