Skip to main content

Capture Analytics

Capture user engagement events into the Distinct system via the analytics capture endpoint.

Endpoint

POST https://api.distinct.so/api/v1/analytics/capture/fifa-cwc-2025

Request Headers

KeyValue
Content-Typeapplication/json
x-distinct-api-keyYour shared API key

Request Body

KeyTypeRequiredDescription
typeStringYesUser event type to be captured (see Event Capture Types)
eventValueStringYesUnique event identifier mapping the user event to the event
emailStringConditionalEmail address of the registered user linked to the current session (required for non-registration events)
recordCapturedAtISOTimestampYesTimestamp of when the user event was captured
sessionIdStringConditionalThe current user session (required for registration page visit events)
registrationPageValueStringConditionalUnique registration page identifier mapping the user event to the registration page (required for registration page visit events)
info

Certain user event types require different fields in the request body. See the example requests below for the specific fields required per event type.

Response

Success (200)

{
"statusCode": 200,
"message": "Analytics captured successfully.",
"data": null
}

Example Requests

Registration Page Visit

Use this when capturing a REGISTRATION_PAGE_VISIT event.

curl -X POST 'https://api.distinct.so/api/v1/analytics/capture/fifa-cwc-2025' \
-H 'Content-Type: application/json' \
-H 'x-distinct-api-key: <shared-api-key>' \
-d '{
"type": "REGISTRATION_PAGE_VISIT",
"eventValue": "<event-value>",
"recordCapturedAt": "<current-iso-timestamp>",
"sessionId": "<session-id>",
"registrationPageValue": "<registration-page-value>"
}'

Replace the placeholders:

  • <shared-api-key> — your actual shared API key from Distinct
  • <session-id> — the unique session identifier of the user's visit to the registration page
  • <event-value> — the provided unique event identifier for the registration page
  • <registration-page-value> — the provided unique registration page identifier
  • <current-iso-timestamp> — the current timestamp of when the event is captured
note

All fields above are required for registration page visit capturing.

Other User Event Captures

Use this for events like photo assignment, download, or view.

curl -X POST 'https://api.distinct.so/api/v1/analytics/capture/fifa-cwc-2025' \
-H 'Content-Type: application/json' \
-H 'x-distinct-api-key: <shared-api-key>' \
-d '{
"type": "<event-capture-type>",
"eventValue": "<event-value>",
"recordCapturedAt": "<current-iso-timestamp>",
"email": "john.doe@example.com"
}'

Replace the placeholders:

  • <shared-api-key> — your actual shared API key from Distinct
  • <event-capture-type> — the event capture type based on the user's interaction (see table below)
  • <event-value> — the provided unique event identifier
  • <current-iso-timestamp> — the current timestamp of when the event is captured
  • Provide the user's registered email that is linked to the current session
note

All fields above are required for user event capturing.

Event Capture Types

ValueDescription
REGISTRATION_PAGE_VISITUser visits a registration page
PHOTO_ASSIGNED_TO_USERUser captures and is assigned a photo
PHOTO_DOWNLOADED_BY_USERUser downloads a photo
PHOTO_VIEWED_BY_USERUser views a photo

Notes

  1. The x-distinct-api-key will be shared with you by the Distinct team and must be included in every API request.
  2. Certain user event types require different fields in the request body — refer to the example requests above.
  3. The REGISTRATION_PAGE_VISIT type requires sessionId and registrationPageValue instead of email.
  4. All other event types require email to identify the registered user.