---
title: "Emails.create"
method: POST
path: "/entities/Emails"
tags: ["Email"]
---

# Emails.create

`POST /entities/Emails`

## Request

- Base URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id`
- URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id/entities/Emails`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/coevera/apis/coevera-crm-api/docs/entities/Emails/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a Email record.

## Query parameters

- `validation-level` integer

## Request body

- CreateEmailInput: Field values of a new Email record.
  - `modified` string, date-time: Last modification time.
  - `created` string, date-time: Creation time.
  - `additional_headers` object: 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.
  - `bcc` string: Comma-separated list of blind-carbon-copy recipients.
  - `body` string: HTML body of the email. Returned only to users with read permission on the email content; otherwise empty.
  - `body_summary` string: Plain-text summary of the email body. Returned only to users with read permission on the email content; otherwise empty.
  - `cc` string: Comma-separated list of carbon-copy recipients.
  - `company_email_id` string, uuid: Id of the company email used as the From / Reply-To. Empty when sent from the user mailbox.
  - `content_share_mode` 0 | 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_type` string: MIME content type of the body (e.g. text/html, text/plain).
  - `date_sent` string, date-time: Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.
  - `direction` 1 | 2, required: Direction of the email (Incoming, Outgoing). Integer enum value: 1 - OutgoingEmail, 2 - IncomingEmail
  - `draft_parent_email_id` string, uuid: Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.
  - `draft_settings` object: 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_code` integer: Numeric error code recorded when the email failed to send. Zero when no error occurred.
  - `is_draft` boolean: True when this email is an unsent draft. Drafts have no date_sent/send_at and are excluded from the sent/scheduled streams.
  - `is_tracked` boolean: True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.
  - `original_id` string: External identifier of the email on the source mailbox (e.g. IMAP Message-ID). Used to deduplicate when re-syncing.
  - `owner_id` string, uuid: Id of the email owner.
  - `parent_email_id` string, uuid: Id of the parent (master) email.
  - `schedule_settings` object: Scheduling configuration for delayed sending, as a JSON object; next_schedule is a numeric timestamp and recipients/cc/bcc are lists.
  - `send_at` string, date-time: Timestamp at which a scheduled email is queued to be sent. Empty for immediately-sent emails.
  - `sender` string: Sender address as it appeared on the email (free-text "From" header).
  - `sender_account_id` string, uuid: Id of the matched sender account.
  - `sender_client_id` string, uuid: Id of the matched sender user.
  - `sender_contact_id` string, uuid: Id of the matched sender contact.
  - `sender_email_account_id` string, uuid: Id of the personal email-integration account that sent this email.
  - `sentiment` 0 | 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_mode` 0 | 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
  - `subject` string: Name of the entity and its default text representation.
  - `template_id` string, uuid: Id of the email template.
  - `thread_id` string, uuid: Identifier grouping emails belonging to the same conversation thread.
  - `to` string: Comma-separated list of primary recipients.
  - `type` 1 | 2: Whether the email is an individual email (Standard) or part of a mass email (Mass). Integer enum value: 1 - Standard, 2 - Mass
  - `uid` string, required: IMAP UID of the email on the source mailbox.
  - `revision` integer: Revision when entity was lastly changed.
  - `sharing_units` object[]: Sales units that have been granted shared access to this email envelope.
    - `id` string, uuid: Id of the related MessageSharingSalesUnitRelation record.
  - `sharing_clients` object[]: Users that have been granted shared access to this email envelope.
    - `id` string, uuid: Id of the related MessageSharingClientRelation record.
  - `content_sharing_units` object[]: Sales units that have been granted access to the email body when content_share_mode is restricted.
    - `id` string, uuid: Id of the related EmailContentSharingSalesUnitRelation record.
  - `content_sharing_clients` object[]: Users that have been granted access to the email body when content_share_mode is restricted.
    - `id` string, uuid: Id of the related EmailContentSharingClientRelation record.
  - `account_relations` object[]: Accounts this email is linked to.
    - `id` string, uuid: Id of the related MessageRelation record.
  - `contact_relations` object[]: Contacts this email is linked to.
    - `id` string, uuid: Id of the related MessageRelation record.
  - `project_relations` object[]: Projects this email is linked to.
    - `id` string, uuid: Id of the related MessageRelation record.
  - `custom_entity_relations` object[]: Custom entity records this email is linked to.
    - `id` string, uuid: Id of the related MessageRelation record.
  - `lead_relations` object[]: Leads this email is linked to.
    - `id` string, uuid: Id of the related MessageRelation record.
  - `opportunity_relations` object[]: Opportunities this email is linked to.
    - `id` string, uuid: Id of the related MessageRelation record.
  - `quote_relations` object[]: Quotes this email is linked to.
    - `id` string, uuid: Id of the related MessageRelation record.
  - `tags` object[]: Tag labels applied to this email. Visible only to users that can read the email body.
    - `id` string, uuid: Id of the related TagRelation record.
  - `documents` object[]: Attachments and other documents linked to this email.
    - `id` string, uuid: Id of the related CloudObjectRelation record.

## Response `201`

The created Email record.

- object
  - `success` boolean: True when the request succeeded; false on error.
  - `data` Email: Email message sent or received by users of the space, linked to the contacts, accounts and other records it concerns.
    - `is_delete_protected` boolean, required: True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only.
    - `id` string, uuid, required: Unique identifier of entity.
    - `is_deleted` boolean: Specifies if the entity is considered deleted.
    - `modified` string, date-time: Last modification time.
    - `created` string, date-time: Creation time.
    - `company_email` string, uri: Configured company email used as the From / Reply-To. Empty when sent from the user mailbox. Related CompanyEmail record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'CompanyEmail' for its fields.
    - `draft_parent_email` string, uri: The original email a draft was started from (reply/forward source), or empty for a standalone draft. Related Email record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'Email' for its fields.
    - `owner` string, uri: Sales user who owns this email. May be empty for unassigned emails. Related Client record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'Client' for its fields.
    - `parent_email` string, uri: For mass emails: the master email this copy was generated from. Empty for the master and for non-mass emails. Related Email record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'Email' for its fields.
    - `sender_account` string, uri: Account record matched as the sender, or empty when the sender does not match an existing Account. Related Account record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'Account' for its fields.
    - `sender_client` string, uri: Internal user matched as the sender, or empty when the sender is external. Related Client record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'Client' for its fields.
    - `sender_contact` string, uri: Contact record matched as the sender, or empty when the sender does not match an existing Contact. Related Contact record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'Contact' for its fields.
    - `template` string, uri: Email template used to compose this email, or empty when none was used. Related EmailTemplate record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'EmailTemplate' for its fields.
    - `additional_headers` object: 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.
    - `bcc` string: Comma-separated list of blind-carbon-copy recipients.
    - `body` string: HTML body of the email. Returned only to users with read permission on the email content; otherwise empty.
    - `body_summary` string: Plain-text summary of the email body. Returned only to users with read permission on the email content; otherwise empty.
    - `cc` string: Comma-separated list of carbon-copy recipients.
    - `company_email_id` string, uuid: Id of the company email used as the From / Reply-To. Empty when sent from the user mailbox.
    - `content_share_mode` 0 | 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_type` string: MIME content type of the body (e.g. text/html, text/plain).
    - `date_sent` string, date-time: Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.
    - `direction` 1 | 2, required: Direction of the email (Incoming, Outgoing). Integer enum value: 1 - OutgoingEmail, 2 - IncomingEmail
    - `draft_parent_email_id` string, uuid: Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.
    - `draft_settings` object: 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_code` integer: Numeric error code recorded when the email failed to send. Zero when no error occurred.
    - `is_draft` boolean: True when this email is an unsent draft. Drafts have no date_sent/send_at and are excluded from the sent/scheduled streams.
    - `is_tracked` boolean: True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.
    - `original_id` string: External identifier of the email on the source mailbox (e.g. IMAP Message-ID). Used to deduplicate when re-syncing.
    - `owner_id` string, uuid: Id of the email owner.
    - `parent_email_id` string, uuid: Id of the parent (master) email.
    - `schedule_settings` object: Scheduling configuration for delayed sending, as a JSON object; next_schedule is a numeric timestamp and recipients/cc/bcc are lists.
    - `send_at` string, date-time: Timestamp at which a scheduled email is queued to be sent. Empty for immediately-sent emails.
    - `sender` string: Sender address as it appeared on the email (free-text "From" header).
    - `sender_account_id` string, uuid: Id of the matched sender account.
    - `sender_client_id` string, uuid: Id of the matched sender user.
    - `sender_contact_id` string, uuid: Id of the matched sender contact.
    - `sender_email_account_id` string, uuid: Id of the personal email-integration account that sent this email.
    - `sentiment` 0 | 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_mode` 0 | 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
    - `subject` string: Name of the entity and its default text representation.
    - `table_name` string, required: Discriminator identifying the concrete record type — always "email" for Email records. Read-only; useful when consuming polymorphic Message results.
    - `template_id` string, uuid: Id of the email template.
    - `thread_id` string, uuid: Identifier grouping emails belonging to the same conversation thread.
    - `to` string: Comma-separated list of primary recipients.
    - `type` 1 | 2: Whether the email is an individual email (Standard) or part of a mass email (Mass). Integer enum value: 1 - Standard, 2 - Mass
    - `uid` string, required: IMAP UID of the email on the source mailbox.
    - `revision` integer: Revision when entity was lastly changed.
    - `is_favorite` boolean, required: True when the current authenticated user has marked this email as favorite. Per-user.
    - `sharing_units` string[]: Sales units that have been granted shared access to this email envelope.
    - `sharing_clients` string[]: Users that have been granted shared access to this email envelope.
    - `content_sharing_units` string[]: Sales units that have been granted access to the email body when content_share_mode is restricted.
    - `content_sharing_clients` string[]: Users that have been granted access to the email body when content_share_mode is restricted.
    - `account_relations` string[]: Accounts this email is linked to.
    - `contact_relations` string[]: Contacts this email is linked to.
    - `project_relations` string[]: Projects this email is linked to.
    - `custom_entity_relations` string[]: Custom entity records this email is linked to.
    - `lead_relations` string[]: Leads this email is linked to.
    - `opportunity_relations` string[]: Opportunities this email is linked to.
    - `quote_relations` string[]: Quotes this email is linked to.
    - `tags` string[]: Tag labels applied to this email. Visible only to users that can read the email body.
    - `documents` string[]: Attachments and other documents linked to this email.
    - `mailbox_ids` string[], required: Ids of the mailboxes (company or personal) the email envelope belongs to, aggregated from the active email_mailbox_relation rows.

## Other responses

- `400`: Bad request: a bad or unknown parameter (codes 117, 118), a missing permission (code 50), conflicting data (code 2002) or any other API error. The REST API answers 400 where others answer 403 or 409; check `code`.
- `401`: Not authenticated: missing or wrong credentials, a credential of another space, or an expired token (code 401, ERROR_UNAUTHORIZED).
- `422`: Validation failed (code 40000, with the failing fields) or a required parameter is missing (code 119). By default one failed item fails a whole batch and nothing is written.
- `429`: Too many requests (code 182). Wait for the seconds in Retry-After, then retry.
- `500`: Unexpected server error (code 1000, ERROR_UNKNOWN).

---

[API](https://skmtc.dev/coevera/apis/coevera-crm-api.md) - [All operations](https://skmtc.dev/coevera/apis/coevera-crm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coevera/apis/coevera-crm-api/revisions/40ebbc83f179?raw)
