Export Custom Events

Bulk export of custom events from a half-open occurredAt range, ordered by occurredAt ascending. Each event's own payload is returned as a JSON object under data. The contact's current email and user ID are resolved per row on a best-effort basis (contactEmail and userId may be null if the contact no longer exists).

Send occurredAt on the first call, then pass the opaque cursor returned as pagination.nextCursor back as cursor on every later call. A null cursor means there are no more results. Persist the last non-null cursor between syncs to resume. The range may be arbitrarily long and is walked in bounded segments internally, so an empty page with a non-null cursor means there are more results to come rather than the end of the export.

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.

post/v2/exports/custom-events

Request

  • Base URL
    https://pub-api.conversion.ai/api
  • Auth
    • API key in header X-API-Key
    • or API key in query parameter api_key

Request body

cursorstring

The opaque pagination cursor returned as pagination.nextCursor by a previous call. Omit (or pass an empty string) to fetch the first page. Send it on its own, with no occurredAt. An invalid or malformed cursor returns an invalid_cursor error.

limitinteger

The maximum number of events to return per page. Defaults to 1000. Values are clamped to the range [1, 1000] rather than rejected; values above 1000 return 1000 results.

Example request

{
  "occurredAt": {
    "start": "2026-08-01T00:00:00Z",
    "end": "2026-09-01T00:00:00Z"
  },
  "cursor": "eyJ2IjoxLCJjIjoiMjAyNi0wOC0wMVQwMDowMDowMFoifQ=="
}

Response

A page of custom events retrieved successfully.

Example response

{
  "data": {
    "events": [
      {
        "eventName": "order_completed",
        "source": "PUBLIC_API"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.