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

# entities.emailEvent

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

REST: [EmailEvents](https://developers.coevera.com/reference/rest/email-events.md).

## Queries

- `getById(entityId: ID!): EmailEventEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [EmailEventEntity!]!` 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: EmailEventFilterInput, orderBy: [EmailEventOrderByInput!], includeDeleted: Boolean): [EmailEventEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: EmailEventFilterInput, orderBy: [EmailEventOrderByInput!], includeDeleted: Boolean): [EmailEventEntity!]!` 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

- `createEmailEvent(input: CreateEmailEventInput!, validationLevel: [ValidationLevel!]): CreateEmailEventPayload` Create one record.
- `updateEmailEvent(input: UpdateEmailEventInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateEmailEventPayload` Update fields.
- `bulkUpdateEmailEvent(input: [CreateOrUpdateEmailEventInput!]!, deleteInput: [DeleteEmailEventInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateEmailEventPayload` Create or update many; per-item results.
- `deleteEmailEvent(input: DeleteEmailEventInput!): DeleteEmailEventPayload` Soft-delete.

## Types

### EmailEventEntity (object)

Tracking event reported for a sent email, such as an open, a link click, a reply or an unsubscribe.

- `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.
- `email: EmailEntity` Email message the event was reported for.
- `additionalData: JSONString` Provider-specific extra data captured with the event (e.g. user agent, ip), as a JSON document.
- `emailId: ID!` Id of the email message.
- `type: EmailEventTypeEnum` Kind of tracking event reported for the email, such as an open, a link click, a reply, an unsubscribe or a bounce.
- `url: String` URL the recipient interacted with. Set for click events; empty for other event types.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### EmailEventFilterInput (input)

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

- `OR: [EmailEventFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [EmailEventFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: EmailEventFilterInput` 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.
- `emailId: EntityFilterStringField` Id of the email message.
- `type: EmailEventTypeEnumFilterInput` Kind of tracking event reported for the email, such as an open, a link click, a reply, an unsubscribe or a bounce.
- `url: EntityFilterStringField` URL the recipient interacted with. Set for click events; empty for other event types.
- `email: EmailFilterInput` Email message the event was reported for. Matches records where a related record meets these conditions.

### EmailEventOrderByInput (input)

Sorting of EmailEvent 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.
- `email: [EmailOrderByNestedInput!]` Email message the event was reported for. Sorts by fields of the related record, listed in order of priority.
- `emailId: OrderByEnum` Id of the email message.
- `type: OrderByEnum` Kind of tracking event reported for the email, such as an open, a link click, a reply, an unsubscribe or a bounce.
- `url: OrderByEnum` URL the recipient interacted with. Set for click events; empty for other event types.

### EmailEventTypeEnumFilterInput (input)

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

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

### CreateEmailEventInput (input)

Field values of a new EmailEvent 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.
- `additionalData: JSONString` Provider-specific extra data captured with the event (e.g. user agent, ip), as a JSON document.
- `emailId: ID!` Id of the email message.
- `type: EmailEventTypeEnum` Kind of tracking event reported for the email, such as an open, a link click, a reply, an unsubscribe or a bounce.
- `url: String` URL the recipient interacted with. Set for click events; empty for other event types.

### CreateOrUpdateEmailEventInput (input)

Field values of an EmailEvent 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.
- `additionalData: JSONString` Provider-specific extra data captured with the event (e.g. user agent, ip), as a JSON document.
- `emailId: ID` Id of the email message.
- `type: EmailEventTypeEnum` Kind of tracking event reported for the email, such as an open, a link click, a reply, an unsubscribe or a bounce.
- `url: String` URL the recipient interacted with. Set for click events; empty for other event types.

### DeleteEmailEventInput (input)

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

### UpdateEmailEventInput (input)

Id of an EmailEvent 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.
- `additionalData: JSONString` Provider-specific extra data captured with the event (e.g. user agent, ip), as a JSON document.
- `emailId: ID` Id of the email message.
- `type: EmailEventTypeEnum` Kind of tracking event reported for the email, such as an open, a link click, a reply, an unsubscribe or a bounce.
- `url: String` URL the recipient interacted with. Set for click events; empty for other event types.

### BulkUpdateEmailEventPayload (object)

Result of the bulkUpdateEmailEvent mutation.

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

### CreateEmailEventPayload (object)

Result of the createEmailEvent mutation.

- `emailEvent: EmailEventEntity` 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).

### DeleteEmailEventPayload (object)

Result of the deleteEmailEvent mutation.

- `emailEvent: EmailEventEntity` 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).

### UpdateEmailEventPayload (object)

Result of the updateEmailEvent mutation.

- `emailEvent: EmailEventEntity` 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).

### EmailEventTypeEnum (enum)

Type of a tracked event on a sent email.

- `Open` The recipient opened the email.
- `Click` The recipient clicked a link in the email.
- `Unsubscribe` The recipient unsubscribed through the email.
- `Bounce` The email bounced permanently (hard bounce).
- `Reply` The recipient replied to the email.
- `BounceSoft` Delivery failed temporarily or was delayed (soft bounce).

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