CDPGuidesSupport

Batch Events

POST
/batch
*object
array<object>

Request Body

application/json

A token plus an array of /track-compatible events.

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/batch" \  -H "Content-Type: application/json" \  -d '{    "token": "string",    "events": [      {        "event": "string",        "distinctId": "string"      }    ]  }'
{  "success": true,  "accepted": 0,  "failed": 0,  "results": [    {      "index": 0,      "success": true    }  ]}
{  "success": true,  "accepted": 0,  "failed": 0,  "results": [    {      "index": 0,      "success": true    }  ]}
{  "success": false,  "error": "string"}
{  "success": false,  "error": "string"}
{  "success": false,  "error": "string",  "limit": 0}
{  "success": false,  "error": "string"}
{  "success": false,  "error": "string",  "retryable": true,  "results": [    {      "index": 0,      "success": false,      "code": "invalid_event",      "message": "string"    }  ]}

How is this guide?