> ## Documentation Index
> Fetch the complete documentation index at: https://docs.conversion.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Email Events

> Bulk, incremental export of raw email engagement events of a single type, keyed by `occurredAt`. The email asset name is resolved per row on a best-effort basis (`emailName` may be `null` if it cannot be resolved).

Results are paginated with an opaque cursor returned as `pagination.nextCursor`. Pass it back as `cursor` to fetch the next page; a `null` cursor means there are no more results. Persist the last non-null cursor between syncs to resume.

> **Request Access.** This endpoint is not enabled by default, contact the Conversion team to request access. Calls from accounts without it return `403 export_not_enabled`.



## OpenAPI

````yaml /openapi.json post /v2/exports/email-events
openapi: 3.1.0
info:
  title: Conversion API
  version: 2.0.0
  description: >-
    The Conversion API lets you programmatically manage contacts, track custom
    events, and manage their associated data.
servers:
  - url: https://pub-api.conversion.ai/api
security:
  - apiKey: []
paths:
  /v2/exports/email-events:
    post:
      summary: Export Email Events
      description: >-
        Bulk, incremental export of raw email engagement events of a single
        type, keyed by `occurredAt`. The email asset name is resolved per row on
        a best-effort basis (`emailName` may be `null` if it cannot be
        resolved).


        Results are paginated with an opaque cursor returned as
        `pagination.nextCursor`. Pass it back as `cursor` to fetch the next
        page; a `null` cursor means there are no more results. Persist the last
        non-null cursor between syncs to resume.


        > **Request Access.** This endpoint is not enabled by default, contact
        the Conversion team to request access. Calls from accounts without it
        return `403 export_not_enabled`.
      operationId: exportEmailEvents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - eventType
              properties:
                eventType:
                  type: string
                  enum:
                    - EMAIL_SEND
                    - EMAIL_DELIVERY
                    - EMAIL_OPEN
                    - EMAIL_CLICK
                    - EMAIL_BOUNCE
                    - EMAIL_SOFT_BOUNCE
                    - EMAIL_COMPLAINT
                    - EMAIL_UNSUBSCRIBE_ALL
                    - EMAIL_TOPIC_UNSUBSCRIBE
                  description: >-
                    The email event type to export. Each call exports a single
                    event type, matched 1:1 against the underlying email event
                    type. Case-insensitive; an unsupported value returns an
                    `invalid_field` error.
                  examples:
                    - EMAIL_OPEN
                cursor:
                  type: string
                  description: >-
                    The opaque pagination cursor returned as
                    `pagination.nextCursor` by a previous call. Omit (or pass an
                    empty string) to fetch the first page. An invalid or
                    malformed cursor returns an `invalid_cursor` error.
                  examples:
                    - eyJjcmVhdGVkQXQiOiIyMDI2LTA2LTAxVDEwOjAwOjAwWiJ9
                limit:
                  type: integer
                  minimum: 1
                  maximum: 5000
                  default: 1000
                  description: >-
                    The maximum number of events to return per page. Defaults to
                    1000. Values are clamped to the range [1, 5000] rather than
                    rejected; values above 5000 return 5000 results.
            examples:
              first-page:
                summary: First page of opens
                value:
                  eventType: EMAIL_OPEN
                  limit: 1000
              next-page:
                summary: Resume from a cursor
                value:
                  eventType: EMAIL_OPEN
                  cursor: eyJjcmVhdGVkQXQiOiIyMDI2LTA2LTAxVDEwOjAwOjAwWiJ9
                  limit: 1000
      responses:
        '200':
          description: A page of email events retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - events
                    properties:
                      events:
                        type: array
                        description: The current page of exported email events.
                        items:
                          type: object
                          required:
                            - eventId
                            - contactId
                            - occurredAt
                            - eventType
                            - isBot
                          properties:
                            eventId:
                              type: string
                              format: uuid
                              description: >-
                                The Conversion engagement ID for this event.
                                Stable primary key for warehouse upserts.
                            contactId:
                              type: string
                              format: uuid
                              description: >-
                                The Conversion contact ID the event belongs to
                                (joins `contacts.id`).
                            occurredAt:
                              type: string
                              format: date-time
                              description: When the event occurred.
                            eventType:
                              type: string
                              description: The underlying email event type.
                              examples:
                                - EMAIL_OPEN
                            sourceType:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The kind of flow that sent the email —
                                `WORKFLOW` or `BLAST` — or `null` if unknown.
                            sourceId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                The id of the workflow or blast that sent the
                                email, or `null`.
                            emailId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: The id of the email asset, or `null`.
                            emailName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The resolved name of the email asset.
                                Best-effort: `null` if it could not be resolved.
                            sentEmailId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: The per-send instance id, or `null`.
                            isBot:
                              type: boolean
                              description: >-
                                `true` if the engagement was classified as bot
                                activity. Filter in the warehouse as needed.
                            link:
                              type:
                                - string
                                - 'null'
                              description: >-
                                For `EMAIL_CLICK` events, the clicked URL;
                                otherwise `null`.
                            topicIds:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Stringified array of topic ids the recipient
                                unsubscribed from. Only populated for
                                `EMAIL_TOPIC_UNSUBSCRIBE` events, otherwise
                                `null`.
                            bounceType:
                              type:
                                - string
                                - 'null'
                              enum:
                                - Permanent
                                - Transient
                                - Undetermined
                                - null
                              description: >-
                                Bounce classification for `EMAIL_BOUNCE` and
                                `EMAIL_SOFT_BOUNCE` events, or `null`. Possible
                                values: `Permanent`, `Transient`,
                                `Undetermined`.
                            errorMessage:
                              type:
                                - string
                                - 'null'
                              description: >-
                                SMTP diagnostic code (e.g. `smtp; 550 5.1.1 user
                                unknown`); only populated for `EMAIL_BOUNCE` and
                                `EMAIL_SOFT_BOUNCE`, otherwise `null`.
                  pagination:
                    type: object
                    required:
                      - nextCursor
                    properties:
                      nextCursor:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Opaque cursor for the next page, or `null` when there
                          are no more results. This is the single source of
                          truth for whether more results exist.
              examples:
                with-more-pages:
                  summary: More pages available
                  value:
                    data:
                      events:
                        - eventId: b2c3d4e5-f6a7-8901-bcde-f12345678901
                          contactId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                          occurredAt: '2026-06-01T10:00:00Z'
                          eventType: EMAIL_OPEN
                          sourceType: BLAST
                          sourceId: d4e5f6a7-b8c9-0123-def0-456789abcdef
                          emailId: c3d4e5f6-a7b8-9012-cdef-123456789012
                          emailName: June Newsletter
                          sentEmailId: e5f6a7b8-c9d0-1234-ef01-56789abcdef0
                          isBot: false
                          link: null
                          topicIds: null
                          bounceType: null
                          errorMessage: null
                    pagination:
                      nextCursor: eyJjcmVhdGVkQXQiOiIyMDI2LTA2LTAxVDEwOjAwOjAwWiJ9
                last-page:
                  summary: Last page
                  value:
                    data:
                      events: []
                    pagination:
                      nextCursor: null
        '400':
          description: The request was malformed or contained invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid-event-type:
                  summary: Invalid event type
                  value:
                    error:
                      code: invalid_field
                      message: >-
                        invalid eventType; must be one of EMAIL_BOUNCE,
                        EMAIL_SOFT_BOUNCE, EMAIL_COMPLAINT, EMAIL_DELIVERY,
                        EMAIL_OPEN, EMAIL_CLICK, EMAIL_SEND,
                        EMAIL_UNSUBSCRIBE_ALL, EMAIL_TOPIC_UNSUBSCRIBE
                invalid-cursor:
                  summary: Invalid cursor
                  value:
                    error:
                      code: invalid_cursor
                      message: invalid pagination cursor
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  summary: Missing or invalid API key
                  value:
                    error:
                      code: unauthorized
                      message: API key is required
        '403':
          description: The export API is not enabled for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                export-not-enabled:
                  summary: Export not enabled
                  value:
                    error:
                      code: export_not_enabled
                      message: business is not authorized to use the export API
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                internal:
                  summary: Internal error
                  value:
                    error:
                      code: internal_error
                      message: failed to list email events
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: A machine-readable error code.
              examples:
                - invalid_email
            message:
              type: string
              description: A human-readable error description.
              examples:
                - 'invalid email format: not-an-email'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your Conversion API key. Found in **Settings > Integrations** in the
        dashboard. Format: `sk_live_<key_id>_<secret>`.

````