---
title: entities.email
description: Read email records with the email repository, and change them with the email mutations. Same records as the REST Emails entity.
canonical: https://developers.coevera.com/reference/graphql/email/
section: graphql
verification: schema
generatedFrom: schema f155746 (2026-10-20)
publisher: Coevera
---

# entities.email

Read email records with the email repository, and change them with the email mutations. Same records as the REST Emails entity.

REST: [Emails](https://developers.coevera.com/reference/rest/emails.md).

## Queries

- `getById(entityId: ID!): EmailEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [EmailEntity!]!` Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
- `getAll(limit: Int, offset: Int, filter: EmailFilterInput, orderBy: [EmailOrderByInput!], includeDeleted: Boolean): [EmailEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: EmailFilterInput, orderBy: [EmailOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): EmailEntityConnection` Returns the records that match the filter as a cursor-paginated connection.
- `getChangedFieldsSinceRevision(id: UUID!, revision: Int!): [UUID!]!` Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.
- `checkForUnsubscribed(recipients: [SendEmailRecipientParams!]!): [SendEmailRecipient!]!` Returns the recipients from the given list who have unsubscribed from emails, so they can be removed before sending.
- `getDraftByParentAndMailbox(parentId: UUID!, mailboxId: UUID!): EmailEntity` Returns the saved draft replying to the given email in the given mailbox, or null when there is none.
- `getLinkedItems(emailId: UUID!, mailboxId: UUID): [EmailLinkedItem!]!` Returns the records (accounts, contacts, opportunities, projects, quotes, custom entities) linked to the email's conversation thread.

## Mutations

- `manageSharingEmail(input: ManageSharingEmailInput!): ManageSharingEmailPayload` Change who it is shared with. GraphQL only.
- `manageContentSharingEmail(input: ManageContentSharingEmailInput!): ManageContentSharingEmailPayload` Sets who can read the body of the email. For a mass email the setting is also applied to every individual email sent from it. GraphQL only.
- `createEmail(input: CreateEmailInput!, validationLevel: [ValidationLevel!]): CreateEmailPayload` Create one record.
- `updateEmail(input: UpdateEmailInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateEmailPayload` Update fields.
- `bulkUpdateEmail(input: [CreateOrUpdateEmailInput!]!, deleteInput: [DeleteEmailInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateEmailPayload` Create or update many; per-item results.
- `deleteEmail(input: DeleteEmailInput!): DeleteEmailPayload` Soft-delete.
- `updateLinkedItemsEmail(input: UpdateLinkedItemsEmailInput!): UpdateLinkedItemsEmailPayload` Replaces the records linked to the e-mail and to every other e-mail in its conversation. Linked records missing from linkedItems are unlinked. GraphQL only.

## Types

### EmailEntity (object)

Email message sent or received by users of the space, linked to the contacts, accounts and other records it concerns.

- `isDeleteProtected: Boolean!` 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: ID!` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `companyEmail: CompanyEmailEntity` Configured company email used as the From / Reply-To. Empty when sent from the user mailbox.
- `draftParentEmail: EmailEntity` The original email a draft was started from (reply/forward source), or empty for a standalone draft.
- `owner: ClientEntity` Sales user who owns this email. May be empty for unassigned emails.
- `parentEmail: EmailEntity` For mass emails: the master email this copy was generated from. Empty for the master and for non-mass emails.
- `senderAccount: AccountEntity` Account record matched as the sender, or empty when the sender does not match an existing Account.
- `senderClient: ClientEntity` Internal user matched as the sender, or empty when the sender is external.
- `senderContact: ContactEntity` Contact record matched as the sender, or empty when the sender does not match an existing Contact.
- `template: EmailTemplateEntity` Email template used to compose this email, or empty when none was used.
- `additionalHeaders: JSONString` 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! (1 args)` HTML body of the email, or a localized "Private content" label when the caller cannot read its content.
- `bodySummary: String! (1 args)` Plain-text summary of the body, or a localized "Private content" label when the caller cannot read the email content.
- `cc: String` Comma-separated list of carbon-copy recipients.
- `companyEmailId: ID` Id of the company email used as the From / Reply-To. Empty when sent from the user mailbox.
- `contentShareMode: ContentShareModeEnum` 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).
- `contentType: String` MIME content type of the body (e.g. text/html, text/plain).
- `dateSent: DateTime` Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.
- `direction: EmailDirectionEnum!` Direction of the email (Incoming, Outgoing).
- `draftParentEmailId: ID` Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.
- `draftSettings: EmailDraftSettings` Saved state of an email draft (recipients, subject, body, attachments, template, sharing) used to reopen it for editing. Empty for emails that are not drafts.
- `errorCode: Int` Numeric error code recorded when the email failed to send. Zero when no error occurred.
- `isDraft: Boolean` True when this email is an unsent draft. Drafts have no dateSent/sendAt and are excluded from the sent/scheduled streams.
- `isTracked: Boolean` True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.
- `originalId: String` External identifier of the email on the source mailbox (e.g. IMAP Message-ID). Used to deduplicate when re-syncing.
- `ownerId: ID` Id of the email owner.
- `parentEmailId: ID` Id of the parent (master) email.
- `scheduleSettings: EmailScheduleSettings` Sending configuration of a scheduled email (sending account, recipients, linked records, follow-up options). Empty when the email is not scheduled.
- `sendAt: DateTime` 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).
- `senderAccountId: ID` Id of the matched sender account.
- `senderClientId: ID` Id of the matched sender user.
- `senderContactId: ID` Id of the matched sender contact.
- `senderEmailAccountId: ID` Id of the personal email-integration account that sent this email.
- `sentiment: EmailSentimentEnum (1 args)` Sentiment of the email. Null without access to the email content.
- `shareMode: ShareModeEnum` Sharing model for the email envelope (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `subject: String! (1 args)` Subject line of the email, or a localized "Private content" label when the caller cannot read its content.
- `tableName: String!` Discriminator identifying the concrete record type — always "email" for Email records. Read-only; useful when consuming polymorphic Message results.
- `templateId: ID` Id of the email template.
- `threadId: ID` Identifier grouping emails belonging to the same conversation thread.
- `to: String` Comma-separated list of primary recipients.
- `type: EmailTypeEnum` Whether the email is an individual email (Standard) or part of a mass email (Mass).
- `uid: String!` IMAP UID of the email on the source mailbox.
- `revision: Int` Revision when entity was lastly changed.
- `isFavorite: Boolean!` True when the current authenticated user has marked this email as favorite. Per-user.
- `sharingUnits: MessageSharingSalesUnitRelationEntityConnection (8 args)` Sales units that have been granted shared access to this email envelope.
- `sharingClients: MessageSharingClientRelationEntityConnection (8 args)` Users that have been granted shared access to this email envelope.
- `contentSharingUnits: EmailContentSharingSalesUnitRelationEntityConnection (8 args)` Sales units that have been granted access to the email body when contentShareMode is restricted.
- `contentSharingClients: EmailContentSharingClientRelationEntityConnection (8 args)` Users that have been granted access to the email body when contentShareMode is restricted.
- `accountRelations: MessageRelationEntityConnection (8 args)` Accounts this email is linked to.
- `contactRelations: MessageRelationEntityConnection (8 args)` Contacts this email is linked to.
- `projectRelations: MessageRelationEntityConnection (8 args)` Projects this email is linked to.
- `customEntityRelations: MessageRelationEntityConnection (8 args)` Custom entity records this email is linked to.
- `leadRelations: MessageRelationEntityConnection (8 args)` Leads this email is linked to.
- `opportunityRelations: MessageRelationEntityConnection (8 args)` Opportunities this email is linked to.
- `quoteRelations: MessageRelationEntityConnection (8 args)` Quotes this email is linked to.
- `tags: TagRelationEntityConnection (8 args)` Tag labels applied to this email. Visible only to users that can read the email body.
- `documents: CloudObjectRelationEntityConnection (9 args)` Attachments and other documents linked to this email.
- `mailboxIds: [UUID!]!` Ids of the mailboxes (company or personal) the email envelope belongs to, aggregated from the active emailMailboxRelation rows.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.
- `massTrackingInfo: MassEmailTrackingInfo!` Tracking statistics (sent, opened, clicked, replied, bounced, unsubscribed) of the individual emails sent from this mass email.
- `trackingHistory: [EmailTrackingEvent]!` Tracking events of the email, newest first: up to the 20 latest opens, clicks and unsubscribes, followed by the send event.
- `massEmailRelations: MassEmailRelationItemConnection (7 args)` Recipients of this mass email in the selected category, with their delivery and engagement state.
- `hasTrackingEvent: Boolean!` True when a tracking event other than a bounce (such as an open or a click) was recorded for the email.
- `hasAnyAttachment: Boolean!` True when at least one file is attached to the email.
- `wasBounced: Boolean!` True when the email bounced; for a mass email, when any email sent from it bounced. Soft bounces are not counted.
- `conversationSubject: String (1 args)` Subject of the latest sent email in this conversation whose content the caller can read, or a localized "Private content" label when there is none.
- `isConversationSubjectAvailable: Boolean! (1 args)` True when the caller can read the content of at least one sent email in this conversation, so `conversationSubject` returns a real subject.
- `isContentAvailable: Boolean! (1 args)` True when the caller can read the content of this email; otherwise `subject`, `body` and `bodySummary` return a localized "Private content" label.
- `canChangeConversationContentShareMode: Boolean! (1 args)` True when the caller can change who can read the content of at least one email in this conversation (see `updateEmailThreadContentShareModeEmail`).
- `conversationItems: EmailConversationItemConnection (6 args)` Paged conversation this email is in, optionally scoped to one mailbox. Deprecated in favour of `conversation`, which returns the whole thread in one payload.
- `conversation: [EmailConversationItem!]! (2 args)` All emails of the conversation this email belongs to in one unpaged list, ordered like `conversationItems`.
- `oldestConversationItem: EmailEntity (1 args)` Earliest sent email of this conversation; empty when this email is the only one in it.
- `newestReadableConversationItem: EmailEntity (1 args)` Latest sent email of this conversation whose content the caller can read; empty when this email is the only one in it.
- `replyBody: String (1 args)` HTML body prefilled for a reply: an "On <date> <sender> wrote:" line followed by the quoted original message. Null when the caller cannot read the email content.
- `forwardBody: String (1 args)` HTML body prefilled for forwarding: a forwarded-message header (From, Date, Subject, To, Cc) followed by the quoted original message. Null when the caller cannot read the email content.
- `isDifferentActor: Boolean! (1 args)` True when another user created this email and the given mailbox is not a company mailbox the caller can use.
- `linkedRecords: [EmailEntityLinkedRecord!]! (1 args)` Records the email is linked to in the given mailbox, such as its sender and recipients. An item without `id` is an address not matched to any record, and `isAvailable` is false for a record the caller cannot see.
- `labels: EmailLabelRelationEntityConnection (5 args)` Labels the caller applied to this email's conversation, oldest first. Labels applied by other users and deleted labels are not returned.

### EmailConversationItemConnection (object)

Paginated list of Email records.

- `pageInfo: PageInfo!` Pagination data for this connection.
- `edges: [EmailConversationItemEdge]!` Contains the nodes in this connection.
- `totalCount: Int!` Total number of results.

### EmailConversationItemEdge (object)

A Relay edge containing a `EmailConversationItem` and its cursor.

- `node: EmailEntity` The item at the end of the edge
- `cursor: String!` A cursor for use in pagination

### EmailEntityConnection (object)

Paginated list of Email records.

- `pageInfo: PageInfo!` Pagination data for this connection.
- `edges: [EmailEntityEdge]!` Contains the nodes in this connection.
- `totalCount: Int` Total number of items in the connection.

### EmailEntityEdge (object)

A Relay edge containing a `EmailEntity` and its cursor.

- `node: EmailEntity` The item at the end of the edge
- `cursor: String!` A cursor for use in pagination

### MassEmailRelationItemConnection (object)

Paginated list of MassEmailRelation items.

- `pageInfo: PageInfo!` Pagination data for this connection.
- `edges: [MassEmailRelationItemEdge]!` Contains the nodes in this connection.
- `totalCount: Int!` Total number of results in the view

### MassEmailRelationItemEdge (object)

A Relay edge containing a `MassEmailRelationItem` and its cursor.

- `node: MassEmailRelation` The item at the end of the edge
- `cursor: String!` A cursor for use in pagination

### ContentShareModeEnumFilterInput (input)

Conditions on an enumeration field. Several conditions given together must all match.

- `eq: [ContentShareModeEnum!]` Matches any of the listed values.
- `NOT: ContentShareModeEnumFilterInput` Matches values that do not meet this condition.

### EmailFilterInput (input)

Filter conditions for Email records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.

- `OR: [EmailFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [EmailFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: EmailFilterInput` Matches records that do not meet this filter.
- `globalSearchQuery: String` Search term matched against the fields that the global search covers for this entity.
- `id: EntityFilterStringField` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: EntityFilterDateTimeField` Last modification time.
- `created: EntityFilterDateTimeField` Creation time.
- `bcc: EntityFilterStringField` Comma-separated list of blind-carbon-copy recipients.
- `body: EntityFilterStringField` HTML body of the email. Returned only to users with read permission on the email content; otherwise empty.
- `bodySummary: EntityFilterStringField` Plain-text summary of the email body. Returned only to users with read permission on the email content; otherwise empty.
- `cc: EntityFilterStringField` Comma-separated list of carbon-copy recipients.
- `companyEmailId: EntityFilterStringField` Id of the company email used as the From / Reply-To. Empty when sent from the user mailbox.
- `contentShareMode: ContentShareModeEnumFilterInput` 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).
- `contentType: EntityFilterStringField` MIME content type of the body (e.g. text/html, text/plain).
- `dateSent: EntityFilterDateTimeField` Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.
- `direction: EmailDirectionEnumFilterInput` Direction of the email (Incoming, Outgoing).
- `draftParentEmailId: EntityFilterStringField` Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.
- `errorCode: EntityFilterNumberField` Numeric error code recorded when the email failed to send. Zero when no error occurred.
- `isDraft: Boolean` True when this email is an unsent draft. Drafts have no dateSent/sendAt and are excluded from the sent/scheduled streams.
- `isTracked: Boolean` True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.
- `originalId: EntityFilterStringField` External identifier of the email on the source mailbox (e.g. IMAP Message-ID). Used to deduplicate when re-syncing.
- `ownerId: EntityFilterStringField` Id of the email owner.
- `parentEmailId: EntityFilterStringField` Id of the parent (master) email.
- `sendAt: EntityFilterDateTimeField` Timestamp at which a scheduled email is queued to be sent. Empty for immediately-sent emails.
- `sender: EntityFilterStringField` Sender address as it appeared on the email (free-text "From" header).
- `senderAccountId: EntityFilterStringField` Id of the matched sender account.
- `senderClientId: EntityFilterStringField` Id of the matched sender user.
- `senderContactId: EntityFilterStringField` Id of the matched sender contact.
- `senderEmailAccountId: EntityFilterStringField` Id of the personal email-integration account that sent this email.
- `sentiment: EmailSentimentEnumFilterInput` 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.
- `shareMode: ShareModeEnumFilterInput` Sharing model for the email envelope (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `subject: EntityFilterStringField` Name of the entity and its default text representation.
- `tableName: EntityFilterStringField` Discriminator identifying the concrete record type — always "email" for Email records. Read-only; useful when consuming polymorphic Message results.
- `templateId: EntityFilterStringField` Id of the email template.
- `threadId: EntityFilterStringField` Identifier grouping emails belonging to the same conversation thread.
- `to: EntityFilterStringField` Comma-separated list of primary recipients.
- `type: EmailTypeEnumFilterInput` Whether the email is an individual email (Standard) or part of a mass email (Mass).
- `uid: EntityFilterStringField` IMAP UID of the email on the source mailbox.
- `revision: EntityFilterNumberField` Revision when entity was lastly changed.
- `mailboxIds: [UUID!]` Ids of the mailboxes (company or personal) the email envelope belongs to, aggregated from the active emailMailboxRelation rows.
- `companyEmail: CompanyEmailFilterInput` Configured company email used as the From / Reply-To. Empty when sent from the user mailbox. Matches records where a related record meets these conditions.
- `draftParentEmail: EmailFilterInput` The original email a draft was started from (reply/forward source), or empty for a standalone draft. Matches records where a related record meets these conditions.
- `owner: ClientFilterInput` Sales user who owns this email. May be empty for unassigned emails. Matches records where a related record meets these conditions.
- `parentEmail: EmailFilterInput` For mass emails: the master email this copy was generated from. Empty for the master and for non-mass emails. Matches records where a related record meets these conditions.
- `senderAccount: AccountFilterInput` Account record matched as the sender, or empty when the sender does not match an existing Account. Matches records where a related record meets these conditions.
- `senderClient: ClientFilterInput` Internal user matched as the sender, or empty when the sender is external. Matches records where a related record meets these conditions.
- `senderContact: ContactFilterInput` Contact record matched as the sender, or empty when the sender does not match an existing Contact. Matches records where a related record meets these conditions.
- `template: EmailTemplateFilterInput` Email template used to compose this email, or empty when none was used. Matches records where a related record meets these conditions.
- `sharingUnits: MessageSharingSalesUnitRelationFilterInput` Sales units that have been granted shared access to this email envelope. Matches records where a related record meets these conditions.
- `sharingClients: MessageSharingClientRelationFilterInput` Users that have been granted shared access to this email envelope. Matches records where a related record meets these conditions.
- `contentSharingUnits: EmailContentSharingSalesUnitRelationFilterInput` Sales units that have been granted access to the email body when contentShareMode is restricted. Matches records where a related record meets these conditions.
- `contentSharingClients: EmailContentSharingClientRelationFilterInput` Users that have been granted access to the email body when contentShareMode is restricted. Matches records where a related record meets these conditions.
- `accountRelations: MessageRelationFilterInput` Accounts this email is linked to. Matches records where a related record meets these conditions.
- `contactRelations: MessageRelationFilterInput` Contacts this email is linked to. Matches records where a related record meets these conditions.
- `projectRelations: MessageRelationFilterInput` Projects this email is linked to. Matches records where a related record meets these conditions.
- `customEntityRelations: MessageRelationFilterInput` Custom entity records this email is linked to. Matches records where a related record meets these conditions.
- `leadRelations: MessageRelationFilterInput` Leads this email is linked to. Matches records where a related record meets these conditions.
- `opportunityRelations: MessageRelationFilterInput` Opportunities this email is linked to. Matches records where a related record meets these conditions.
- `quoteRelations: MessageRelationFilterInput` Quotes this email is linked to. Matches records where a related record meets these conditions.
- `tags: TagRelationFilterInput` Tag labels applied to this email. Visible only to users that can read the email body. Matches records where a related record meets these conditions.
- `documents: CloudObjectRelationFilterInput` Attachments and other documents linked to this email. Matches records where a related record meets these conditions.

### EmailOrderByInput (input)

Sorting of Email records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.

- `id: OrderByEnum` Unique identifier of entity.
- `isDeleted: OrderByEnum` Specifies if the entity is considered deleted.
- `modified: OrderByEnum` Last modification time.
- `created: OrderByEnum` Creation time.
- `companyEmail: [CompanyEmailOrderByNestedInput!]` Configured company email used as the From / Reply-To. Empty when sent from the user mailbox. Sorts by fields of the related record, listed in order of priority.
- `draftParentEmail: [EmailOrderByNestedInput!]` The original email a draft was started from (reply/forward source), or empty for a standalone draft. Sorts by fields of the related record, listed in order of priority.
- `owner: [ClientOrderByNestedInput!]` Sales user who owns this email. May be empty for unassigned emails. Sorts by fields of the related record, listed in order of priority.
- `parentEmail: [EmailOrderByNestedInput!]` For mass emails: the master email this copy was generated from. Empty for the master and for non-mass emails. Sorts by fields of the related record, listed in order of priority.
- `senderAccount: [AccountOrderByNestedInput!]` Account record matched as the sender, or empty when the sender does not match an existing Account. Sorts by fields of the related record, listed in order of priority.
- `senderClient: [ClientOrderByNestedInput!]` Internal user matched as the sender, or empty when the sender is external. Sorts by fields of the related record, listed in order of priority.
- `senderContact: [ContactOrderByNestedInput!]` Contact record matched as the sender, or empty when the sender does not match an existing Contact. Sorts by fields of the related record, listed in order of priority.
- `template: [EmailTemplateOrderByNestedInput!]` Email template used to compose this email, or empty when none was used. Sorts by fields of the related record, listed in order of priority.
- `bcc: OrderByEnum` Comma-separated list of blind-carbon-copy recipients.
- `bodySummary: OrderByEnum` Plain-text summary of the email body. Returned only to users with read permission on the email content; otherwise empty.
- `cc: OrderByEnum` Comma-separated list of carbon-copy recipients.
- `companyEmailId: OrderByEnum` Id of the company email used as the From / Reply-To. Empty when sent from the user mailbox.
- `contentShareMode: OrderByEnum` 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).
- `contentType: OrderByEnum` MIME content type of the body (e.g. text/html, text/plain).
- `dateSent: OrderByEnum` Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.
- `direction: OrderByEnum` Direction of the email (Incoming, Outgoing).
- `draftParentEmailId: OrderByEnum` Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.
- `errorCode: OrderByEnum` Numeric error code recorded when the email failed to send. Zero when no error occurred.
- `isDraft: OrderByEnum` True when this email is an unsent draft. Drafts have no dateSent/sendAt and are excluded from the sent/scheduled streams.
- `isTracked: OrderByEnum` True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.
- `ownerId: OrderByEnum` Id of the email owner.
- `parentEmailId: OrderByEnum` Id of the parent (master) email.
- `sendAt: OrderByEnum` Timestamp at which a scheduled email is queued to be sent. Empty for immediately-sent emails.
- `sender: OrderByEnum` Sender address as it appeared on the email (free-text "From" header).
- `senderAccountId: OrderByEnum` Id of the matched sender account.
- `senderClientId: OrderByEnum` Id of the matched sender user.
- `senderContactId: OrderByEnum` Id of the matched sender contact.
- `sentiment: OrderByEnum` 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.
- `shareMode: OrderByEnum` Sharing model for the email envelope (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `subject: OrderByEnum` Name of the entity and its default text representation.
- `templateId: OrderByEnum` Id of the email template.
- `to: OrderByEnum` Comma-separated list of primary recipients.
- `type: OrderByEnum` Whether the email is an individual email (Standard) or part of a mass email (Mass).
- `revision: OrderByEnum` Revision when entity was lastly changed.

### EmailSentimentEnumFilterInput (input)

Conditions on an enumeration field. Several conditions given together must all match.

- `eq: [EmailSentimentEnum!]` Matches any of the listed values.
- `NOT: EmailSentimentEnumFilterInput` Matches values that do not meet this condition.

### CreateEmailContentSharingClientRelationNoEmailBackrefInput (input)

Field values of a new EmailContentSharingClientRelation record, created together with the record it belongs to.

- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `clientId: ID!` Id of the user.
- `revision: Int` Revision when entity was lastly changed.

### CreateEmailContentSharingSalesUnitRelationNoEmailBackrefInput (input)

Field values of a new EmailContentSharingSalesUnitRelation record, created together with the record it belongs to.

- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `unitId: ID!` Id of the sales unit.
- `revision: Int` Revision when entity was lastly changed.

### CreateEmailInput (input)

Field values of a new Email record.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `additionalHeaders: JSONString` 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.
- `bodySummary: 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.
- `companyEmailId: ID` Id of the company email used as the From / Reply-To. Empty when sent from the user mailbox.
- `contentShareMode: ContentShareModeEnum` 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).
- `contentType: String` MIME content type of the body (e.g. text/html, text/plain).
- `dateSent: DateTime` Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.
- `direction: EmailDirectionEnum!` Direction of the email (Incoming, Outgoing).
- `draftParentEmailId: ID` Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.
- `draftSettings: JSONString` 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.
- `errorCode: Int` Numeric error code recorded when the email failed to send. Zero when no error occurred.
- `isDraft: Boolean` True when this email is an unsent draft. Drafts have no dateSent/sendAt and are excluded from the sent/scheduled streams.
- `isTracked: Boolean` True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.
- `originalId: String` External identifier of the email on the source mailbox (e.g. IMAP Message-ID). Used to deduplicate when re-syncing.
- `ownerId: ID` Id of the email owner.
- `parentEmailId: ID` Id of the parent (master) email.
- `scheduleSettings: JSONString` Scheduling configuration for delayed sending, as a JSON object; next_schedule is a numeric timestamp and recipients/cc/bcc are lists.
- `sendAt: DateTime` 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).
- `senderAccountId: ID` Id of the matched sender account.
- `senderClientId: ID` Id of the matched sender user.
- `senderContactId: ID` Id of the matched sender contact.
- `senderEmailAccountId: ID` Id of the personal email-integration account that sent this email.
- `sentiment: EmailSentimentEnum` 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.
- `shareMode: ShareModeEnum` Sharing model for the email envelope (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `subject: String` Name of the entity and its default text representation.
- `templateId: ID` Id of the email template.
- `threadId: ID` Identifier grouping emails belonging to the same conversation thread.
- `to: String` Comma-separated list of primary recipients.
- `type: EmailTypeEnum` Whether the email is an individual email (Standard) or part of a mass email (Mass).
- `uid: String!` IMAP UID of the email on the source mailbox.
- `revision: Int` Revision when entity was lastly changed.
- `sharingUnits: [CreateMessageSharingSalesUnitRelationNoMessageBackrefInput!]` Sales units that have been granted shared access to this email envelope.
- `sharingClients: [CreateMessageSharingClientRelationNoMessageBackrefInput!]` Users that have been granted shared access to this email envelope.
- `contentSharingUnits: [CreateEmailContentSharingSalesUnitRelationNoEmailBackrefInput!]` Sales units that have been granted access to the email body when contentShareMode is restricted.
- `contentSharingClients: [CreateEmailContentSharingClientRelationNoEmailBackrefInput!]` Users that have been granted access to the email body when contentShareMode is restricted.
- `accountRelations: [CreateMessageRelationNoMessageBackrefInput!]` Accounts this email is linked to.
- `contactRelations: [CreateMessageRelationNoMessageBackrefInput!]` Contacts this email is linked to.
- `projectRelations: [CreateMessageRelationNoMessageBackrefInput!]` Projects this email is linked to.
- `customEntityRelations: [CreateMessageRelationNoMessageBackrefInput!]` Custom entity records this email is linked to.
- `leadRelations: [CreateMessageRelationNoMessageBackrefInput!]` Leads this email is linked to.
- `opportunityRelations: [CreateMessageRelationNoMessageBackrefInput!]` Opportunities this email is linked to.
- `quoteRelations: [CreateMessageRelationNoMessageBackrefInput!]` Quotes this email is linked to.
- `tags: [CreateTagRelationNoEmailBackrefInput!]` Tag labels applied to this email. Visible only to users that can read the email body.
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Attachments and other documents linked to this email.

### CreateOrUpdateEmailInput (input)

Field values of an Email record to create, or to update when its id is set.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `additionalHeaders: JSONString` 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.
- `bodySummary: 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.
- `companyEmailId: ID` Id of the company email used as the From / Reply-To. Empty when sent from the user mailbox.
- `contentShareMode: ContentShareModeEnum` 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).
- `contentType: String` MIME content type of the body (e.g. text/html, text/plain).
- `dateSent: DateTime` Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.
- `direction: EmailDirectionEnum` Direction of the email (Incoming, Outgoing).
- `draftParentEmailId: ID` Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.
- `draftSettings: JSONString` 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.
- `errorCode: Int` Numeric error code recorded when the email failed to send. Zero when no error occurred.
- `isDraft: Boolean` True when this email is an unsent draft. Drafts have no dateSent/sendAt and are excluded from the sent/scheduled streams.
- `isTracked: Boolean` True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.
- `originalId: String` External identifier of the email on the source mailbox (e.g. IMAP Message-ID). Used to deduplicate when re-syncing.
- `ownerId: ID` Id of the email owner.
- `parentEmailId: ID` Id of the parent (master) email.
- `scheduleSettings: JSONString` Scheduling configuration for delayed sending, as a JSON object; next_schedule is a numeric timestamp and recipients/cc/bcc are lists.
- `sendAt: DateTime` 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).
- `senderAccountId: ID` Id of the matched sender account.
- `senderClientId: ID` Id of the matched sender user.
- `senderContactId: ID` Id of the matched sender contact.
- `senderEmailAccountId: ID` Id of the personal email-integration account that sent this email.
- `sentiment: EmailSentimentEnum` 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.
- `shareMode: ShareModeEnum` Sharing model for the email envelope (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `subject: String` Name of the entity and its default text representation.
- `templateId: ID` Id of the email template.
- `threadId: ID` Identifier grouping emails belonging to the same conversation thread.
- `to: String` Comma-separated list of primary recipients.
- `type: EmailTypeEnum` Whether the email is an individual email (Standard) or part of a mass email (Mass).
- `uid: String` IMAP UID of the email on the source mailbox.
- `revision: Int` Revision when entity was lastly changed.
- `sharingUnits: [CreateMessageSharingSalesUnitRelationNoMessageBackrefInput!]` Sales units that have been granted shared access to this email envelope.
- `sharingClients: [CreateMessageSharingClientRelationNoMessageBackrefInput!]` Users that have been granted shared access to this email envelope.
- `contentSharingUnits: [CreateEmailContentSharingSalesUnitRelationNoEmailBackrefInput!]` Sales units that have been granted access to the email body when contentShareMode is restricted.
- `contentSharingClients: [CreateEmailContentSharingClientRelationNoEmailBackrefInput!]` Users that have been granted access to the email body when contentShareMode is restricted.
- `accountRelations: [CreateMessageRelationNoMessageBackrefInput!]` Accounts this email is linked to.
- `contactRelations: [CreateMessageRelationNoMessageBackrefInput!]` Contacts this email is linked to.
- `projectRelations: [CreateMessageRelationNoMessageBackrefInput!]` Projects this email is linked to.
- `customEntityRelations: [CreateMessageRelationNoMessageBackrefInput!]` Custom entity records this email is linked to.
- `leadRelations: [CreateMessageRelationNoMessageBackrefInput!]` Leads this email is linked to.
- `opportunityRelations: [CreateMessageRelationNoMessageBackrefInput!]` Opportunities this email is linked to.
- `quoteRelations: [CreateMessageRelationNoMessageBackrefInput!]` Quotes this email is linked to.
- `tags: [CreateTagRelationNoEmailBackrefInput!]` Tag labels applied to this email. Visible only to users that can read the email body.
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Attachments and other documents linked to this email.

### CreateTagRelationNoEmailBackrefInput (input)

Field values of a new TagRelation record, created together with the record it belongs to.

- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `accountId: ID` Id of the linked account.
- `appointmentId: ID` Id of the linked appointment.
- `contactId: ID` Id of the linked contact.
- `customEntityId: ID` Id of the linked custom entity record.
- `leadId: ID` Id of the linked lead.
- `opptyId: ID` Id of the linked opportunity.
- `processId: ID` Id of the linked sales process.
- `projectId: ID` Id of the linked project.
- `quoteId: ID` Id of the linked quote.
- `solutionId: ID` Id of the linked solution.
- `tagId: ID!` Id of the tag attached to the record.
- `taskId: ID` Id of the linked task.
- `revision: Int` Revision when entity was lastly changed.

### DeleteEmailInput (input)

Id of the Email record to delete.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID!` Unique identifier of entity.

### ManageContentSharingEmailInput (input)

Parameters of the manageContentSharingEmail mutation.

- `shareMode: ContentShareModeEnum!` Public shows the body to everyone who can see the email; Private only to its owner, its sender and the users the email is shared with; Custom additionally to the users and sales units listed here.
- `sharingClients: [CreateEmailContentSharingClientRelationNoEmailBackrefInput!]` Users who can read the body when the mode is Custom. Replaces the current list when sent; an omitted list is left unchanged.
- `sharingUnits: [CreateEmailContentSharingSalesUnitRelationNoEmailBackrefInput!]` Sales units whose members can read the body when the mode is Custom. Replaces the current list when sent; an omitted list is left unchanged.
- `id: ID!` Identifier of the EmailEntity to perform the action on.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### ManageSharingEmailInput (input)

Parameters of the manageSharingEmail mutation.

- `shareMode: ShareModeEnum!` Sharing mode of the email: Standard, Private, AllView or AllEdit.
- `sharingClients: [CreateMessageSharingClientRelationNoMessageBackrefInput!]` Users the email is shared with, each with the Watcher or Editor role. Replaces the current list when sent; an omitted list is left unchanged.
- `sharingUnits: [CreateMessageSharingSalesUnitRelationNoMessageBackrefInput!]` Sales units the email is shared with, each with the Watcher or Editor role. Replaces the current list when sent; an omitted list is left unchanged.
- `id: ID!` Identifier of the EmailEntity to perform the action on.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### SendEmailLinkedEntityParams (input)

Record a sent email or text message is linked to; set one of the ids.

- `leadOpptyId: UUID` Lead or opportunity the email is linked to.
- `projectId: UUID` Project the email is linked to.
- `accountId: UUID` Account the email is linked to.
- `contactId: UUID` Contact the email is linked to.
- `quoteId: UUID` Quote the email is linked to.
- `customEntityId: CustomEntityIDParams` Custom entity record the email is linked to.

### SendEmailRecipientParams (input)

Recipient of an email: the address and the records it represents, which the sent email is linked to and whose data fill its placeholders.

- `primary: EntityLacotaType` Which linked record (e.g. Contact or Account) this recipient primarily represents, used when linking the sent email to a record.
- `opportunityId: UUID` Opportunity this recipient is associated with, when sending in the context of an opportunity.
- `contactId: UUID` Contact this recipient corresponds to, when known.
- `accountId: UUID` Account this recipient corresponds to, when known.
- `leadId: UUID` Lead this recipient is associated with, when sending in the context of a lead.
- `projectId: UUID` Project this recipient is associated with, when sending in the context of a project.
- `quoteId: UUID` Quote this recipient is associated with, when sending in the context of a quote.
- `customEntityIds: [CustomEntityIDParams]` Custom entity records this recipient is associated with, each given as a `CustomEntityID`.
- `address: String!` Email address the message is sent to.

### UpdateEmailInput (input)

Id of an Email record and the field values to change.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID!` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `additionalHeaders: JSONString` 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.
- `bodySummary: 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.
- `companyEmailId: ID` Id of the company email used as the From / Reply-To. Empty when sent from the user mailbox.
- `contentShareMode: ContentShareModeEnum` 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).
- `contentType: String` MIME content type of the body (e.g. text/html, text/plain).
- `dateSent: DateTime` Timestamp the email was sent. Empty for drafts and scheduled emails not yet sent.
- `direction: EmailDirectionEnum` Direction of the email (Incoming, Outgoing).
- `draftParentEmailId: ID` Id of the original email a draft was started from (reply/forward source), or empty for a standalone draft.
- `draftSettings: JSONString` 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.
- `errorCode: Int` Numeric error code recorded when the email failed to send. Zero when no error occurred.
- `isDraft: Boolean` True when this email is an unsent draft. Drafts have no dateSent/sendAt and are excluded from the sent/scheduled streams.
- `isTracked: Boolean` True when delivery tracking is enabled. Tracked emails generate EmailEvent records on open/click.
- `originalId: String` External identifier of the email on the source mailbox (e.g. IMAP Message-ID). Used to deduplicate when re-syncing.
- `ownerId: ID` Id of the email owner.
- `parentEmailId: ID` Id of the parent (master) email.
- `scheduleSettings: JSONString` Scheduling configuration for delayed sending, as a JSON object; next_schedule is a numeric timestamp and recipients/cc/bcc are lists.
- `sendAt: DateTime` 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).
- `senderAccountId: ID` Id of the matched sender account.
- `senderClientId: ID` Id of the matched sender user.
- `senderContactId: ID` Id of the matched sender contact.
- `senderEmailAccountId: ID` Id of the personal email-integration account that sent this email.
- `sentiment: EmailSentimentEnum` 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.
- `shareMode: ShareModeEnum` Sharing model for the email envelope (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `subject: String` Name of the entity and its default text representation.
- `templateId: ID` Id of the email template.
- `threadId: ID` Identifier grouping emails belonging to the same conversation thread.
- `to: String` Comma-separated list of primary recipients.
- `type: EmailTypeEnum` Whether the email is an individual email (Standard) or part of a mass email (Mass).
- `uid: String` IMAP UID of the email on the source mailbox.
- `revision: Int` Revision when entity was lastly changed.
- `sharingUnits: [CreateMessageSharingSalesUnitRelationNoMessageBackrefInput!]` Sales units that have been granted shared access to this email envelope.
- `sharingClients: [CreateMessageSharingClientRelationNoMessageBackrefInput!]` Users that have been granted shared access to this email envelope.
- `contentSharingUnits: [CreateEmailContentSharingSalesUnitRelationNoEmailBackrefInput!]` Sales units that have been granted access to the email body when contentShareMode is restricted.
- `contentSharingClients: [CreateEmailContentSharingClientRelationNoEmailBackrefInput!]` Users that have been granted access to the email body when contentShareMode is restricted.
- `accountRelations: [CreateMessageRelationNoMessageBackrefInput!]` Accounts this email is linked to.
- `contactRelations: [CreateMessageRelationNoMessageBackrefInput!]` Contacts this email is linked to.
- `projectRelations: [CreateMessageRelationNoMessageBackrefInput!]` Projects this email is linked to.
- `customEntityRelations: [CreateMessageRelationNoMessageBackrefInput!]` Custom entity records this email is linked to.
- `leadRelations: [CreateMessageRelationNoMessageBackrefInput!]` Leads this email is linked to.
- `opportunityRelations: [CreateMessageRelationNoMessageBackrefInput!]` Opportunities this email is linked to.
- `quoteRelations: [CreateMessageRelationNoMessageBackrefInput!]` Quotes this email is linked to.
- `tags: [CreateTagRelationNoEmailBackrefInput!]` Tag labels applied to this email. Visible only to users that can read the email body.
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Attachments and other documents linked to this email.

### UpdateLinkedItemsEmailInput (input)

Parameters of the updateLinkedItemsEmail mutation.

- `emailId: UUID!` Id of the e-mail.
- `linkedItems: [SendEmailLinkedEntityParams!]!` Records to link: accounts, contacts, leads or opportunities, projects, quotes and custom entities.
- `mailboxId: UUID` Limits the conversation to the e-mails in this mailbox. Leave empty to update the whole conversation.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### BulkUpdateEmailPayload (object)

Result of the bulkUpdateEmail mutation.

- `result: BulkUpdateResults!` Ids of the created, updated and deleted records, and the items that failed.

### CreateEmailPayload (object)

Result of the createEmail mutation.

- `email: EmailEntity` The created record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### DeleteEmailPayload (object)

Result of the deleteEmail mutation.

- `email: EmailEntity` The deleted record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### ManageContentSharingEmailPayload (object)

Result of the manageContentSharingEmail mutation.

- `result: EmailEntity` The email with its updated content sharing.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### ManageSharingEmailPayload (object)

Result of the manageSharingEmail mutation.

- `result: EmailEntity` The email with its updated sharing.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### UpdateEmailPayload (object)

Result of the updateEmail mutation.

- `email: EmailEntity` The updated record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### UpdateLinkedItemsEmailPayload (object)

Result of the updateLinkedItemsEmail mutation.

- `result: [EmailLinkedItem!]!` The records now linked to the e-mail.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### ContentShareModeEnum (enum)

Who can read the body of an email.

- `Custom` The owner, users the email is shared with, and the users and units listed in contentSharingClients and contentSharingUnits.
- `Private` Only the owner, the sender and users the email is shared with.
- `Public` Everyone who can see the email.

### EmailConversationItem (object)

One email of a conversation, as listed in the conversation of an email.

- `id: UUID!` Id of the email.
- `isContentAvailable: Boolean!` True when the caller can read the content of this email; otherwise `bodySummary` is empty.
- `bodySummary: String` Plain-text summary of the email body.
- `created: DateTime` Time the email was created.
- `dateSent: DateTime` Time the email was sent; empty for drafts and scheduled emails not yet sent.
- `sendAt: DateTime` Time a scheduled email is queued to be sent; empty for emails sent immediately.
- `hasAnyAttachment: Boolean!` True when at least one file is attached to the email.
- `isDraft: Boolean!` True when the email is an unsent draft.
- `draftParentEmailId: UUID` For a draft reply, the id of the email it replies to; the draft is listed right after that email.
- `isFavorite: Boolean!` True when the caller marked the email as a favorite.
- `isDifferentActor: Boolean!` True when another user created this email and the given mailbox is not a company mailbox the caller can use. Always false without `mailboxId`.
- `sender: String` Sender address as it appeared on the email.
- `senderClientId: UUID` Id of the user matched as the sender.
- `senderAccount: EmailConversationSenderAccount` Account matched as the sender; empty when there is none.
- `senderClient: EmailConversationSenderClient` User matched as the sender; empty when there is none.
- `senderContact: EmailConversationSenderContact` Contact matched as the sender; empty when there is none.

### EmailConversationPicture (object)

Picture of the sender of a conversation item.

- `url: String` URL of the picture; empty when there is none.

### EmailConversationSenderAccount (object)

Account recognized as the sender of a message in an email conversation.

- `name: String` Name of the account.
- `picture: EmailConversationPicture` Picture of the account.

### EmailConversationSenderClient (object)

User recognized as the sender of a message in an email conversation.

- `id: UUID` Id of the user.
- `email: String` Email address of the user.
- `firstName: String` First name of the user.
- `isDeleted: Boolean` True when the user has been deleted.
- `lastName: String` Last name of the user.
- `middleName: String` Middle name of the user.
- `pictureUrl: String` URL of the profile picture of the user.

### EmailConversationSenderContact (object)

Contact recognized as the sender of a message in an email conversation.

- `firstName: String` First name of the contact.
- `lastName: String` Last name of the contact.
- `middleName: String` Middle name of the contact.
- `title: String` Title of the contact.
- `picture: EmailConversationPicture` Picture of the contact.

### EmailDraftSettings (object)

Saved state of an email draft: recipients, subject, body, attachments, template and sharing, so the draft can be reopened for editing.

- `service: SendEmailService!` Email account the email is sent from (`SendEmailService`).
- `recipients: [SendEmailRecipient]!` Primary (To) recipients of the email.
- `bcc: [SendEmailRecipient]!` Blind-carbon-copy recipients of the email.
- `cc: [SendEmailRecipient]!` Carbon-copy recipients of the email.
- `replyTo: String` Id of the email this one replies to, which puts it in that conversation.
- `linkedItems: [SendEmailLinkedEntity]!` Records chosen to be linked to the email.
- `isLinkEntitiesEnabled: Boolean!` True when records could be chosen to be linked to the email while composing it; false, for example, for a mass email sent from the account or contact list.
- `isHtmlTemplate: Boolean!` True when the email is composed from an HTML email template.
- `sendToUnsubscribed: Boolean!` True to also send the email to recipients who have unsubscribed.
- `massMailWithLinkedRecords: Boolean!` For a mass email: true to also link each individual email to the lead or opportunity given for its recipient.
- `enrollEmailSequenceId: UUID` Email sequence the recipients are enrolled in once it is sent.
- `personifyBy: PersonificationEntityData` Records whose data fill the placeholders of the email.
- `logEmailAsTask: SendEmailFollowupTaskSettings` Task created to log the email once it has been sent.
- `logFollowUpTask: SendEmailFollowupTaskSettings` Follow-up task created once the email has been sent.
- `primaryEntity: EntityNameEnum` Type of the records the recipients were picked from, such as Contact or Account, which the email is primarily addressed to; empty when not known.
- `standardMailAdditionalLinkedItems: [SendEmailLinkedEntity]!` Records a standard (not mass) email is linked to in addition to its recipients.
- `massMail: Boolean!` True when the draft is a mass email.
- `subject: String!` Subject of the draft.
- `html: String!` HTML body of the draft.
- `attachments: [UUID]!` Ids of the files attached to the draft.
- `emailTemplateId: UUID` Email template the draft was composed from.
- `contentShareMode: ContentShareModeEnum` Who can read the content of the email once it is sent.
- `contentSharingClients: [UUID]!` Users who can read the content when `contentShareMode` is Custom.
- `contentSharingUnits: [UUID]!` Sales units whose members can read the content when `contentShareMode` is Custom.

### EmailEntityLinkedRecord (object)

Record an email is linked to in a mailbox, such as its sender or a recipient, or an email address not matched to any record.

- `id: UUID` Id of the linked record; empty for an email address not matched to any record.
- `entity: EntityNameEnum` Type of the linked record; empty for an unmatched email address.
- `entityApiName: String` API name of the custom entity when the record is a custom entity.
- `isAvailable: Boolean!` False when the caller cannot see the linked record.
- `name: String` Name of the linked record, or the email address when it is not matched.

### EmailLinkedItem (object)

Record an email is linked to, such as an account, contact, opportunity or project.

- `id: ID!` Id of the linked record.
- `name: String` Name of the linked record; empty when `isAvailable` is false.
- `entityType: EntityNameEnum!` Type of the linked record.
- `entityApiName: String` API name of the custom entity when the record is a custom entity.
- `isAvailable: Boolean!` False when the caller cannot see the linked record.
- `isDeleted: Boolean!` True when the linked record has been deleted.
- `isEditable: Boolean!` False for an account or contact linked to a mass email or to one of its individual emails; such a link cannot be removed.

### EmailScheduleSettings (object)

Sending settings of an email scheduled to be sent later: sending account, recipients, linked records and the tasks created once it is sent.

- `service: SendEmailService!` Email account the email is sent from (`SendEmailService`).
- `recipients: [SendEmailRecipient]!` Primary (To) recipients of the email.
- `bcc: [SendEmailRecipient]!` Blind-carbon-copy recipients of the email.
- `cc: [SendEmailRecipient]!` Carbon-copy recipients of the email.
- `replyTo: String` Id of the email this one replies to, which puts it in that conversation.
- `linkedItems: [SendEmailLinkedEntity]!` Records chosen to be linked to the email.
- `isLinkEntitiesEnabled: Boolean!` True when records could be chosen to be linked to the email while composing it; false, for example, for a mass email sent from the account or contact list.
- `isHtmlTemplate: Boolean!` True when the email is composed from an HTML email template.
- `sendToUnsubscribed: Boolean!` True to also send the email to recipients who have unsubscribed.
- `massMailWithLinkedRecords: Boolean!` For a mass email: true to also link each individual email to the lead or opportunity given for its recipient.
- `enrollEmailSequenceId: UUID` Email sequence the recipients are enrolled in once it is sent.
- `personifyBy: PersonificationEntityData` Records whose data fill the placeholders of the email.
- `logEmailAsTask: SendEmailFollowupTaskSettings` Task created to log the email once it has been sent.
- `logFollowUpTask: SendEmailFollowupTaskSettings` Follow-up task created once the email has been sent.
- `primaryEntity: EntityNameEnum` Type of the records the recipients were picked from, such as Contact or Account, which the email is primarily addressed to; empty when not known.

### EmailSentimentEnum (enum)

Tone of an email as assessed by AI.

- `Negative` The email has a negative tone.
- `Neutral` The email has a neutral tone.
- `Positive` The email has a positive tone.

### EmailTrackingEvent (object)

Tracking event of a sent email, such as an open, a link click or an unsubscribe.

- `type: EmailTrackingEventTypeEnum!` Kind of event: sent, opened, clicked or unsubscribed.
- `modified: DateTime!` Time the event happened.
- `url: String` Link the recipient clicked, for a click event.

### EmailTrackingEventTypeEnum (enum)

Type of an entry in an email's tracking history.

- `Sent` The email was sent.
- `Opened` The recipient opened the email.
- `Clicked` The recipient clicked a link in the email; url holds the link.
- `Unsubscribed` The recipient unsubscribed through the email.

### FeedTag (object)

Tag shown on a feed item, with its name and color.

- `id: ID!` Id of the tag.
- `name: String!` Name of the tag.
- `color: Int!` Display color of the tag, encoded as a 24-bit RGB integer: (red << 16) | (green << 8) | blue.

### MassEmailDetailGridSortyBy (enum)

Column by which the recipients of a mass email are sorted.

- `Name` Recipient name (default).
- `Email` Recipient email address.
- `Owner` Name of the owner of the recipient account or contact.
- `EmailCountInThread` Number of emails in the conversation thread with the recipient.

### MassEmailRelation (object)

Recipient of a mass email: the account or contact the individual email went to, and its delivery and reply state.

- `id: ID` Id of the account or contact the email was sent to; empty when the recipient is not linked to a record.
- `entityType: EntityNameEnum` Whether the recipient record is an Account or a Contact.
- `name: String` Name of the recipient record; empty when `isAvailable` is false.
- `pictureUrl: String` URL of the picture of the recipient record.
- `emailId: ID!` Id of the individual email sent to this recipient.
- `primaryEmail: String` Address the email was sent to; empty when `isAvailable` is false.
- `ownerName: String` Name of the owner of the recipient record; empty when `isAvailable` is false.
- `isAvailable: Boolean!` False when the caller cannot see the recipient record.
- `itemsInConversationCount: Int!` Number of emails in the conversation of this email.
- `errorCode: Int!` Error code recorded when the email failed to send; zero when it was sent.
- `wasSent: Boolean!` True when the email was sent.
- `wasBounced: Boolean!` True when the email bounced.
- `tags: [FeedTag]!` Tags of the latest reply received in the conversation.
- `sentiment: EmailSentimentEnum` Sentiment of the latest reply received in the conversation.

### MassEmailRelationCategory (enum)

Group of mass-email recipients to list, by what happened to their copy of the email.

- `All` All recipients.
- `Opened` Recipients who opened the email (or clicked or unsubscribed) and whose copy did not bounce.
- `Clicked` Recipients who clicked a link in the email and whose copy did not bounce.
- `Replied` Recipients who replied to the email.
- `NotOpened` Recipients whose email was sent but not opened.
- `NotSent` Recipients whose email has not been sent yet.
- `Unsubscribed` Recipients who unsubscribed through the email.
- `Bounced` Recipients whose email bounced permanently.

### PersonificationEntityData (object)

Records whose data fill the placeholders of an email or text message, such as its contact, account or opportunity.

- `primary: EntityLacotaType` Which of the given records, such as the Contact or the Account, the message is primarily addressed to.
- `opportunityId: UUID` Opportunity whose data fills the opportunity placeholders.
- `contactId: UUID` Contact whose data fills the contact placeholders.
- `accountId: UUID` Account whose data fills the account placeholders.
- `leadId: UUID` Lead whose data fills the lead placeholders.
- `projectId: UUID` Project whose data fills the project placeholders.
- `quoteId: UUID` Quote whose data fills the quote placeholders.
- `customEntityIds: [CustomEntityID]` Custom entity records whose data fill the custom entity placeholders, each given as a `CustomEntityID`.

### SendEmailFollowupTaskSettings (object)

Task created once an email has been sent, either to log the email or to follow it up.

- `taskTypeId: UUID!` Activity type of the task.
- `dueDate: DateTime!` Time the task is created; tasks are created only after the email has been sent.
- `status: TaskStatusEnum!` Status of the created task.
- `description: String!` Description of the task.
- `subject: String!` Subject of the task.

### SendEmailLinkedEntity (object)

Record a sent email or text message is linked to; set one of the ids.

- `leadOpptyId: UUID` Lead or opportunity the email is linked to.
- `projectId: UUID` Project the email is linked to.
- `accountId: UUID` Account the email is linked to.
- `contactId: UUID` Contact the email is linked to.
- `quoteId: UUID` Quote the email is linked to.
- `customEntityId: CustomEntityID` Custom entity record the email is linked to.

### SendEmailRecipient (object)

Recipient of an email: the address and the records it represents, which the sent email is linked to and whose data fill its placeholders.

- `primary: EntityLacotaType` Which linked record (e.g. Contact or Account) this recipient primarily represents, used when linking the sent email to a record.
- `opportunityId: UUID` Opportunity this recipient is associated with, when sending in the context of an opportunity.
- `contactId: UUID` Contact this recipient corresponds to, when known.
- `accountId: UUID` Account this recipient corresponds to, when known.
- `leadId: UUID` Lead this recipient is associated with, when sending in the context of a lead.
- `projectId: UUID` Project this recipient is associated with, when sending in the context of a project.
- `quoteId: UUID` Quote this recipient is associated with, when sending in the context of a quote.
- `customEntityIds: [CustomEntityID]` Custom entity records this recipient is associated with, each given as a `CustomEntityID`.
- `address: String!` Email address the message is sent to.

### SendEmailService (object)

Email account an email is sent from: the sender's own account, a shared company account or, for a mass email, a client personal email account.

- `personalAccountId: UUID` Identifier of the sender's own connected email account to send from. Exactly one of the account fields may be set.
- `companyAccountId: UUID` Identifier of a shared company email account to send from. Exactly one of the account fields may be set.
- `clientPersonalEmailAccountId: UUID` Identifier of a client personal email account to send from. Valid only for mass email. Exactly one of the account fields may be set.

Types several repositories share, such as `PageInfo` and the filter fields, are in the [types index](https://developers.coevera.com/reference/graphql/types.md). The [SDL](https://developers.coevera.com/graphql/schema.graphql) has the whole schema in one file.

## Example

```graphql
query FirstEmails {
  entities {
    email {
      getByCriteria(first: 3, orderBy: [{ modified: Desc }]) {
        totalCount
        edges { node { id subject modified } }
      }
    }
  }
}
```

```bash
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query FirstEmails { entities { email { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id subject modified } } } } } }"}'
```
