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
| Key | Value |
|---|---|
Content-Type | application/json |
x-distinct-api-key | Your shared API key |
Request Body
| Key | Type | Required | Description |
|---|---|---|---|
type | String | Yes | User event type to be captured (see Event Capture Types) |
eventValue | String | Yes | Unique event identifier mapping the user event to the event |
email | String | Conditional | Email address of the registered user linked to the current session (required for non-registration events) |
recordCapturedAt | ISOTimestamp | Yes | Timestamp of when the user event was captured |
sessionId | String | Conditional | The current user session (required for registration page visit events) |
registrationPageValue | String | Conditional | Unique 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
| Value | Description |
|---|---|
REGISTRATION_PAGE_VISIT | User visits a registration page |
PHOTO_ASSIGNED_TO_USER | User captures and is assigned a photo |
PHOTO_DOWNLOADED_BY_USER | User downloads a photo |
PHOTO_VIEWED_BY_USER | User views a photo |
Notes
- The
x-distinct-api-keywill be shared with you by the Distinct team and must be included in every API request. - Certain user event types require different fields in the request body — refer to the example requests above.
- The
REGISTRATION_PAGE_VISITtype requiressessionIdandregistrationPageValueinstead ofemail. - All other event types require
emailto identify the registered user.