> ## 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 Contact Events

> Bulk, incremental export of contact events: email, page visit, form submission, campaign member, workflow, audience, field change, and Salesforce lead conversion events. Custom events export from `POST /v2/exports/custom-events`.

Send filters on the first call, then pass `pagination.nextCursor` back as `cursor` until it is `null`. 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/contact-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/contact-events:
    post:
      summary: Export Contact Events
      description: >-
        Bulk, incremental export of contact events: email, page visit, form
        submission, campaign member, workflow, audience, field change, and
        Salesforce lead conversion events. Custom events export from `POST
        /v2/exports/custom-events`.


        Send filters on the first call, then pass `pagination.nextCursor` back
        as `cursor` until it is `null`. 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: exportContactEvents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contactIds:
                  type: array
                  description: Only these contacts' events. At most 100.
                  items:
                    type: string
                    format: uuid
                types:
                  type: array
                  description: Only these event types.
                  items:
                    type: string
                    enum:
                      - EMAIL_SEND
                      - EMAIL_DELIVERY
                      - EMAIL_OPEN
                      - EMAIL_CLICK
                      - EMAIL_BOUNCE
                      - EMAIL_SOFT_BOUNCE
                      - EMAIL_COMPLAINT
                      - EMAIL_UNSUBSCRIBE_ALL
                      - EMAIL_TOPIC_UNSUBSCRIBE
                      - PAGE_VISIT
                      - FORM_SUBMISSION
                      - CAMPAIGN_MEMBER_ADDED
                      - CAMPAIGN_MEMBER_REMOVED
                      - CAMPAIGN_MEMBER_STATUS_CHANGED
                      - CAMPAIGN_MEMBER_FIELD_CHANGED
                      - WORKFLOW_ENTERED
                      - WORKFLOW_EXITED
                      - WORKFLOW_ERROR
                      - AUDIENCE_ADDED
                      - AUDIENCE_REMOVED
                      - FIELD_CHANGE
                      - SFDC_LEAD_CONVERTED
                parentTypes:
                  type: array
                  description: >-
                    Only these event families. With `types`, an event must match
                    both.
                  items:
                    type: string
                    enum:
                      - EMAIL
                      - PAGE_VISIT
                      - FORM_SUBMISSION
                      - CAMPAIGN_MEMBER
                      - WORKFLOW
                      - AUDIENCE
                      - FIELD_CHANGE
                      - SFDC_LEAD_CONVERTED
                occurredAt:
                  type: object
                  description: Only events that occurred in this half-open range.
                  required:
                    - start
                  properties:
                    start:
                      type: string
                      format: date-time
                      description: Events that occurred at or after this time.
                    end:
                      type: string
                      format: date-time
                      description: >-
                        Events that occurred before this time. Must be after
                        `start`.
                cursor:
                  type: string
                  description: >-
                    The opaque cursor returned as `pagination.nextCursor` by a
                    previous call. Omit it on the first page. Send it without
                    filters, because the cursor carries them; sending both
                    returns `invalid_filter`.
                  examples:
                    - eyJ2IjoxLCJmIjp7fSwiayI6ImFiYyJ9
                emailEventsCursor:
                  type: string
                  description: >-
                    Moves a walk over from the deprecated [Export Email
                    Events](/api-reference/export-email-events) endpoint without
                    re-reading it. Send that endpoint's last
                    `pagination.nextCursor` on the first page, with exactly one
                    `EMAIL_*` type in `types` (the type that walk exported) and
                    no other filters. The export resumes where the email events
                    walk stopped. Other filters, or a `cursor`, return
                    `invalid_filter`.
                limit:
                  type: integer
                  minimum: 1
                  maximum: 5000
                  default: 1000
                  description: >-
                    The maximum number of rows per page. Defaults to 1000.
                    Values are clamped to [1, 5000].
            examples:
              workflow-events:
                summary: Workflow events since a date
                value:
                  parentTypes:
                    - WORKFLOW
                  occurredAt:
                    start: '2026-01-01T00:00:00Z'
                  limit: 1000
              one-contact:
                summary: One contact's email opens and clicks
                value:
                  contactIds:
                    - 3f2b6c1e-8d4a-4f7e-9a1b-2c3d4e5f6a7b
                  types:
                    - EMAIL_OPEN
                    - EMAIL_CLICK
              next-page:
                summary: Resume from a cursor
                value:
                  cursor: eyJ2IjoxLCJmIjp7fSwiayI6ImFiYyJ9
      responses:
        '200':
          description: A page of contact events retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - events
                    properties:
                      events:
                        type: array
                        description: The current page of contact events.
                        items:
                          type: object
                          required:
                            - eventId
                            - contactId
                            - eventType
                            - parentType
                            - occurredAt
                            - createdAt
                          properties:
                            eventId:
                              type: string
                              format: uuid
                              description: >-
                                The Conversion ID for this event. Stable primary
                                key for warehouse upserts.
                            contactId:
                              type: string
                              format: uuid
                              description: >-
                                The contact the event belongs to (joins
                                `contacts.id`).
                            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
                                - PAGE_VISIT
                                - FORM_SUBMISSION
                                - CAMPAIGN_MEMBER_ADDED
                                - CAMPAIGN_MEMBER_REMOVED
                                - CAMPAIGN_MEMBER_STATUS_CHANGED
                                - CAMPAIGN_MEMBER_FIELD_CHANGED
                                - WORKFLOW_ENTERED
                                - WORKFLOW_EXITED
                                - WORKFLOW_ERROR
                                - AUDIENCE_ADDED
                                - AUDIENCE_REMOVED
                                - FIELD_CHANGE
                                - SFDC_LEAD_CONVERTED
                              description: The specific event.
                            parentType:
                              type: string
                              enum:
                                - EMAIL
                                - PAGE_VISIT
                                - FORM_SUBMISSION
                                - CAMPAIGN_MEMBER
                                - WORKFLOW
                                - AUDIENCE
                                - FIELD_CHANGE
                                - SFDC_LEAD_CONVERTED
                              description: >-
                                The event family. Exactly one family object
                                below is set, matching it.
                            occurredAt:
                              type: string
                              format: date-time
                              description: When the event occurred.
                            createdAt:
                              type: string
                              format: date-time
                              description: >-
                                When Conversion recorded the event. The export
                                is ordered by it, so events recorded late still
                                arrive on a later page.
                            sourceType:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The flow that caused the event, such as
                                `WORKFLOW` or `BLAST`.
                            sourceId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: The ID of that flow.
                            email:
                              type: object
                              description: Set on `EMAIL` events.
                              properties:
                                emailId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The email asset.
                                emailName:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Name of the email asset, resolved
                                    best-effort. `null` if it cannot be
                                    resolved.
                                sentEmailId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The individual send.
                                isBot:
                                  type: boolean
                                  description: >-
                                    Whether the engagement was classified as bot
                                    activity.
                                link:
                                  type:
                                    - string
                                    - 'null'
                                  description: The clicked URL, on `EMAIL_CLICK`.
                                topicIds:
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: string
                                    format: uuid
                                  description: The topics, on `EMAIL_TOPIC_UNSUBSCRIBE`.
                                bounceType:
                                  type:
                                    - string
                                    - 'null'
                                  description: The bounce classification, on bounces.
                                errorMessage:
                                  type:
                                    - string
                                    - 'null'
                                  description: The SMTP diagnostic, on bounces.
                            pageVisit:
                              type: object
                              description: Set on `PAGE_VISIT` events.
                              properties:
                                pageUrl:
                                  type:
                                    - string
                                    - 'null'
                                  description: The visited URL.
                                pageVisitType:
                                  type:
                                    - string
                                    - 'null'
                                  description: The kind of page visited.
                                sentEmailId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: >-
                                    The send, when the visit came from an email
                                    link.
                                sessionId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The visitor's session.
                                trackingId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The visitor's tracking ID.
                                referrer:
                                  type:
                                    - string
                                    - 'null'
                                  description: The referring URL.
                                utmSource:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_source` from the page URL.'
                                utmMedium:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_medium` from the page URL.'
                                utmCampaign:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_campaign` from the page URL.'
                                utmTerm:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_term` from the page URL.'
                                utmContent:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_content` from the page URL.'
                                utmExtra:
                                  type:
                                    - object
                                    - 'null'
                                  description: Any other UTM parameters, keyed by name.
                                landingPageId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: >-
                                    The Conversion landing page, when the page
                                    is one.
                                landingPageRouteId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The landing page route.
                                landingPageVersionId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The landing page version.
                                adId:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The ad that brought the visitor, from ad
                                    click parameters or a lead gen form.
                                adGroupId:
                                  type:
                                    - string
                                    - 'null'
                                  description: The ad group (or ad set).
                                adCampaignId:
                                  type:
                                    - string
                                    - 'null'
                                  description: The ad platform's campaign.
                                adAccountId:
                                  type:
                                    - string
                                    - 'null'
                                  description: The ad account.
                                adKeyword:
                                  type:
                                    - string
                                    - 'null'
                                  description: The paid search keyword.
                            formSubmission:
                              type: object
                              description: Set on `FORM_SUBMISSION` events.
                              properties:
                                formId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The form.
                                pageUrl:
                                  type:
                                    - string
                                    - 'null'
                                  description: The page the form was submitted on.
                                fields:
                                  type:
                                    - object
                                    - 'null'
                                  description: The submitted values.
                                sessionId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The visitor's session.
                                trackingId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The visitor's tracking ID.
                                referrer:
                                  type:
                                    - string
                                    - 'null'
                                  description: The referring URL.
                                utmSource:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_source` from the page URL.'
                                utmMedium:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_medium` from the page URL.'
                                utmCampaign:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_campaign` from the page URL.'
                                utmTerm:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_term` from the page URL.'
                                utmContent:
                                  type:
                                    - string
                                    - 'null'
                                  description: '`utm_content` from the page URL.'
                                utmExtra:
                                  type:
                                    - object
                                    - 'null'
                                  description: Any other UTM parameters, keyed by name.
                                landingPageId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: >-
                                    The Conversion landing page, when the page
                                    is one.
                                landingPageRouteId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The landing page route.
                                landingPageVersionId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The landing page version.
                                adId:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The ad that brought the visitor, from ad
                                    click parameters or a lead gen form.
                                adGroupId:
                                  type:
                                    - string
                                    - 'null'
                                  description: The ad group (or ad set).
                                adCampaignId:
                                  type:
                                    - string
                                    - 'null'
                                  description: The ad platform's campaign.
                                adAccountId:
                                  type:
                                    - string
                                    - 'null'
                                  description: The ad account.
                                adKeyword:
                                  type:
                                    - string
                                    - 'null'
                                  description: The paid search keyword.
                            campaignMember:
                              type: object
                              description: Set on `CAMPAIGN_MEMBER` events.
                              properties:
                                campaignId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: >-
                                    The campaign (joins `POST
                                    /v2/exports/campaigns`).
                                campaignMemberId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The campaign membership.
                                campaignTypeId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The campaign's type.
                                campaignCategory:
                                  type:
                                    - string
                                    - 'null'
                                  description: The campaign's category.
                                statusId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: >-
                                    The member status after the event (joins the
                                    campaign type's `statuses`).
                                oldStatusId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The member status before a status change.
                                isSuccess:
                                  type:
                                    - boolean
                                    - 'null'
                                  description: Whether the new status counts as success.
                                oldIsSuccess:
                                  type:
                                    - boolean
                                    - 'null'
                                  description: Whether the old status counted as success.
                                fieldKey:
                                  type:
                                    - string
                                    - 'null'
                                  description: The field's key, as in `GET /v2/fields`.
                                oldValue:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The previous value, on
                                    `CAMPAIGN_MEMBER_FIELD_CHANGED`.
                                newValue:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The new value, on
                                    `CAMPAIGN_MEMBER_FIELD_CHANGED`.
                            workflow:
                              type: object
                              description: Set on `WORKFLOW` events.
                              properties:
                                workflowId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The workflow.
                                workflowRunId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: >-
                                    Ties one run's entered, exited, and error
                                    events together.
                                workflowNodeId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: >-
                                    The trigger node on entry, the exit node on
                                    exit, and the failed node on error.
                            audience:
                              type: object
                              description: Set on `AUDIENCE` events.
                              properties:
                                audienceId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  description: The audience.
                            fieldChange:
                              type: object
                              description: Set on `FIELD_CHANGE` events.
                              properties:
                                fieldKey:
                                  type:
                                    - string
                                    - 'null'
                                  description: The field's key, as in `GET /v2/fields`.
                                oldValue:
                                  type:
                                    - string
                                    - 'null'
                                  description: The previous value.
                                newValue:
                                  type:
                                    - string
                                    - 'null'
                                  description: The new value.
                            leadConversion:
                              type: object
                              description: Set on `SFDC_LEAD_CONVERTED` events.
                              properties:
                                oldSalesforceLeadId:
                                  type:
                                    - string
                                    - 'null'
                                  description: The Salesforce Lead that was converted.
                                newSalesforceContactId:
                                  type:
                                    - string
                                    - 'null'
                                  description: The Salesforce Contact it became.
                  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. A page can be short or empty
                          while the cursor is non-null.
        '400':
          description: The request was malformed or contained invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid-cursor:
                  summary: Malformed cursor
                  value:
                    error:
                      code: invalid_cursor
                      message: invalid pagination cursor
                cursor-with-filters:
                  summary: Filters sent with a cursor
                  value:
                    error:
                      code: invalid_filter
                      message: >-
                        filters go on the first page only; the cursor carries
                        them
                invalid-event-type:
                  summary: Unknown event type
                  value:
                    error:
                      code: invalid_event_type
                      message: invalid event type "ENTER_AUTOMATION"
                inverted-range:
                  summary: End before start
                  value:
                    error:
                      code: invalid_window
                      message: occurredAt.end must be after occurredAt.start
        '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 contact 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>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.