Test Events
List and inspect debug-captured events from your website or server, send synthetic test events, and inspect recorded dispatches.
List and inspect debug-captured events from your website or server, send synthetic test events, and inspect recorded dispatches.
Events created through this API use the source’s live token with debug capture enabled. They follow your production event names, data governance rules, and mappings, and can deliver real data to configured destinations. Inspect the recorded dispatch payloads and results to verify delivery.
List and retrieve captured events
GET /rest/v1/test-events lists browser, server, and synthetic events captured with debug mode during the last 48 hours, newest received first. Events sent with a live token are included when debug capture is enabled. isTestEvent distinguishes test-token events from live-token events.
GET /rest/v1/test-events/{id} returns the captured event’s name, timestamp, visitor and event identifiers, source, event properties, user properties, default properties, request context, and raw data when available. Use the id returned by the create or list endpoint unchanged. An event that has not arrived yet returns 404 until it does.
Send and inspect dispatches
POST /rest/v1/test-events acknowledges the event and returns an id, visitorId, and distinctId. Processing results arrive on the dispatches endpoint.
GET /rest/v1/test-events/{id}/dispatches accepts an id from the create or list endpoint and returns { id, entities }. Each entity is a recorded dispatch with its destination, mapped payload, and recorded success or failure details. Browser and server events captured in debug mode are included.
Processing is asynchronous, so the collection fills as dispatch records arrive and stays empty when nothing dispatches.
Synthetic events sent through this API enable debug capture automatically and appear in Recent Events.
Context properties
defaultProperties uses the same known context fields as the ingest API. Use current_url for the page URL, referrer for the referring URL, and fields such as utm_source, user_agent, and screen_width for attribution and browser context. The request schema below lists all supported fields. Put custom event data in eventProperties.
Identity
visitorId and distinctId are optional; omitted values are generated and returned in the response. The list returns an encoded id when a browser or server identifier needs one, so treat returned IDs as opaque and pass them unchanged to the read endpoints.
Events created by POST /rest/v1/test-events use the source’s live token and have isTestEvent: false.
POST/rest/v1/test-events
Ours Privacy API key
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rest/v1/test-events" \ -H "Content-Type: application/json" \ -d '{ "eventName": "Purchase" }'{ "id": "a1b2c3d4:ck9x8y7z6w5v4u3t", "visitorId": "string", "distinctId": "string", "eventName": "string", "sourceId": "string", "acceptedAt": "string"}GET/rest/v1/test-events
Ours Privacy API key
In: header
Query Parameters
Maximum number of items to return. Defaults to 25; values below 1 are clamped to 1 and values above 100 are clamped to 100.
Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/test-events"{ "entities": [ { "id": "string", "visitorId": "string", "distinctId": "string", "eventName": "string", "time": "string", "sourceId": "string", "sourceName": "string", "sourceType": "string", "isTestEvent": true, "eventProperties": { "property1": "string", "property2": "string" }, "userProperties": { "property1": "string", "property2": "string" }, "defaultProperties": { "property1": "string", "property2": "string" }, "requestContext": { "property1": "string", "property2": "string" }, "rawData": "string" } ], "pagination": { "nextCursor": "string", "hasMore": true }}GET/rest/v1/test-events/{id}
Ours Privacy API key
In: header
Path Parameters
Event id returned by the create or list endpoint. Pass it unchanged; it may be an opaque encoded value.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/test-events/a1b2c3d4:ck9x8y7z6w5v4u3t"{ "id": "string", "visitorId": "string", "distinctId": "string", "eventName": "string", "time": "string", "sourceId": "string", "sourceName": "string", "sourceType": "string", "isTestEvent": true, "eventProperties": { "property1": "string", "property2": "string" }, "userProperties": { "property1": "string", "property2": "string" }, "defaultProperties": { "property1": "string", "property2": "string" }, "requestContext": { "property1": "string", "property2": "string" }, "rawData": "string"}GET/rest/v1/test-events/{id}/dispatches
Ours Privacy API key
In: header
Path Parameters
Event id returned by the create or list endpoint. Pass it unchanged; it may be an opaque encoded value.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/test-events/a1b2c3d4:ck9x8y7z6w5v4u3t/dispatches"{ "id": "string", "entities": [ { "destinationId": "string", "destinationName": "string", "destinationType": "string", "allowedEventId": "string", "allowedEventName": "string", "dispatchedAt": "string", "dispatchedSuccessAt": "string", "success": true, "message": "string", "payload": { "property1": "string", "property2": "string" } } ]}How is this guide?

