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

# entities.emailLabelRelation

Read email label relation records with the emailLabelRelation repository, and change them with the email label relation mutations. Same records as the REST EmailLabelRelations entity.

REST: [EmailLabelRelations](https://developers.coevera.com/reference/rest/email-label-relations.md).

## Queries

- `getById(entityId: ID!): EmailLabelRelationEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [EmailLabelRelationEntity!]!` 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: EmailLabelRelationFilterInput, orderBy: [EmailLabelRelationOrderByInput!], includeDeleted: Boolean): [EmailLabelRelationEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: EmailLabelRelationFilterInput, orderBy: [EmailLabelRelationOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): EmailLabelRelationEntityConnection` 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.

## Mutations

- `createEmailLabelRelation(input: CreateEmailLabelRelationInput!, validationLevel: [ValidationLevel!]): CreateEmailLabelRelationPayload` Create one record.
- `updateEmailLabelRelation(input: UpdateEmailLabelRelationInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateEmailLabelRelationPayload` Update fields.
- `bulkUpdateEmailLabelRelation(input: [CreateOrUpdateEmailLabelRelationInput!]!, deleteInput: [DeleteEmailLabelRelationInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateEmailLabelRelationPayload` Create or update many; per-item results.
- `deleteEmailLabelRelation(input: DeleteEmailLabelRelationInput!): DeleteEmailLabelRelationPayload` Soft-delete.

## Types

### EmailLabelRelationEntity (object)

Email label applied to a conversation in a mailbox.

- `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.
- `emailLabel: EmailLabelEntity` Label applied to the thread by this relation.
- `owner: ClientEntity` Sales user who owns this relation. Derived from the label's owner on write.
- `emailLabelId: ID!` Id of the applied label.
- `mailboxId: ID!` Id of the mailbox (connected email account) the label is applied in. A label applies to a thread per mailbox, so the same thread can be labelled differently in two mailboxes.
- `ownerId: ID` Id of the relation owner.
- `threadId: ID!` Identifier of the conversation thread the label is applied to, matching Email.threadId. Every email in the thread shows the label.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### EmailLabelRelationEntityConnection (object)

Paginated list of EmailLabelRelation records.

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

### EmailLabelRelationEntityEdge (object)

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

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

### EmailLabelRelationFilterInput (input)

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

- `OR: [EmailLabelRelationFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [EmailLabelRelationFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: EmailLabelRelationFilterInput` 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.
- `emailLabelId: EntityFilterStringField` Id of the applied label.
- `mailboxId: EntityFilterStringField` Id of the mailbox (connected email account) the label is applied in. A label applies to a thread per mailbox, so the same thread can be labelled differently in two mailboxes.
- `ownerId: EntityFilterStringField` Id of the relation owner.
- `threadId: EntityFilterStringField` Identifier of the conversation thread the label is applied to, matching Email.threadId. Every email in the thread shows the label.
- `emailLabel: EmailLabelFilterInput` Label applied to the thread by this relation. Matches records where a related record meets these conditions.
- `owner: ClientFilterInput` Sales user who owns this relation. Derived from the label's owner on write. Matches records where a related record meets these conditions.

### EmailLabelRelationOrderByInput (input)

Sorting of EmailLabelRelation 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.
- `emailLabel: [EmailLabelOrderByNestedInput!]` Label applied to the thread by this relation. Sorts by fields of the related record, listed in order of priority.
- `owner: [ClientOrderByNestedInput!]` Sales user who owns this relation. Derived from the label's owner on write. Sorts by fields of the related record, listed in order of priority.
- `emailLabelId: OrderByEnum` Id of the applied label.
- `ownerId: OrderByEnum` Id of the relation owner.

### CreateEmailLabelRelationInput (input)

Field values of a new EmailLabelRelation 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.
- `emailLabel: CreateEmailLabelInput!` Label applied to the thread by this relation.
- `emailLabelId: ID!` Id of the applied label.
- `mailboxId: ID!` Id of the mailbox (connected email account) the label is applied in. A label applies to a thread per mailbox, so the same thread can be labelled differently in two mailboxes.
- `ownerId: ID` Id of the relation owner.
- `threadId: ID!` Identifier of the conversation thread the label is applied to, matching Email.threadId. Every email in the thread shows the label.

### CreateOrUpdateEmailLabelRelationInput (input)

Field values of an EmailLabelRelation 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.
- `emailLabel: CreateEmailLabelInput` Label applied to the thread by this relation.
- `emailLabelId: ID` Id of the applied label.
- `mailboxId: ID` Id of the mailbox (connected email account) the label is applied in. A label applies to a thread per mailbox, so the same thread can be labelled differently in two mailboxes.
- `ownerId: ID` Id of the relation owner.
- `threadId: ID` Identifier of the conversation thread the label is applied to, matching Email.threadId. Every email in the thread shows the label.

### DeleteEmailLabelRelationInput (input)

Id of the EmailLabelRelation 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.

### UpdateEmailLabelRelationInput (input)

Id of an EmailLabelRelation 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.
- `emailLabel: CreateEmailLabelInput` Label applied to the thread by this relation.
- `emailLabelId: ID` Id of the applied label.
- `mailboxId: ID` Id of the mailbox (connected email account) the label is applied in. A label applies to a thread per mailbox, so the same thread can be labelled differently in two mailboxes.
- `ownerId: ID` Id of the relation owner.
- `threadId: ID` Identifier of the conversation thread the label is applied to, matching Email.threadId. Every email in the thread shows the label.

### BulkUpdateEmailLabelRelationPayload (object)

Result of the bulkUpdateEmailLabelRelation mutation.

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

### CreateEmailLabelRelationPayload (object)

Result of the createEmailLabelRelation mutation.

- `emailLabelRelation: EmailLabelRelationEntity` 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).

### DeleteEmailLabelRelationPayload (object)

Result of the deleteEmailLabelRelation mutation.

- `emailLabelRelation: EmailLabelRelationEntity` 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).

### UpdateEmailLabelRelationPayload (object)

Result of the updateEmailLabelRelation mutation.

- `emailLabelRelation: EmailLabelRelationEntity` 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).

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 FirstEmailLabelRelations {
  entities {
    emailLabelRelation {
      getByCriteria(first: 3, orderBy: [{ modified: Desc }]) {
        totalCount
        edges { node { id 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 FirstEmailLabelRelations { entities { emailLabelRelation { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id modified } } } } } }"}'
```
