Email

Emails.batch_create_or_update

Creates or updates Email records in one request: an item with an id updates that record, an item without one creates a new record.

post/entities/Emails/batch-modify

Request

Query parameters

validation-levelinteger

Bit mask that relaxes validation on this write. 0 (the default) validates everything. Bits: 2 skip unchanged fields, 4 skip admin-defined validations, 8 allow read-only fields, 16 skip relation checks, 32 skip value checks, 64 skip invalid recalculations, 128 skip step-checklist gates, 256 add conditional field requirements, 512 skip uniqueness checks. Add bits together (20 = 4 + 16); member names and comma lists such as 4,16 work too. A value with an internal-only bit is refused with HTTP 400, code 117.

rollback-method0 | 1

0, the default: one failed item fails the whole batch (HTTP 422, or 404 for an unknown id) and nothing is written. 1: the valid items are written and the call answers 200 with success false and one result per item, an id or an error, in input order. Check every item.

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.

bccstring

Comma-separated list of blind-carbon-copy recipients.

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 used as the From / Reply-To. Empty when sent from the user mailbox.

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

draft_parent_email_idstring uuid

Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.

draft_settingsobject

Serialised state of the Create Email dialogue for a draft, as a JSON object, so the composer can be re-opened verbatim. Empty for non-draft emails.

error_codeinteger

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

is_draftboolean

True when this email is an unsent draft. Drafts have no date_sent/send_at and are excluded from the sent/scheduled streams.

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.

sender_email_account_idstring uuid

Id of the personal email-integration account that sent this email.

sentiment0 | 1 | 2

Tone of the email (Negative, Neutral or Positive) as assessed by AI from its content; empty until assessed. Returned only to users with read permission on the email content.

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

Whether the email is an individual email (Standard) or part of a mass email (Mass).

Integer enum value: 1 - Standard, 2 - Mass

uidstring

IMAP UID of the email on the source mailbox.

revisioninteger

Revision when entity was lastly changed.

idstring uuid

ID of object to update.

Example request

[
  {
    "bcc": "string",
    "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,
    "draft_parent_email_id": "01234567-abcd-dcba-ffff-000000000000",
    "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",
    "sender_email_account_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

Result per item, in request order: the id of the created or updated record, or the error.

successboolean

True when the request succeeded; false on error.

Example response

{
  "success": true,
  "data": [
    {
      "http_status": 400,
      "code": 117,
      "name": "ERROR_PARAMETER_INVALID"
    }
  ]
}

Changes

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