Batch

POST
/i/v1/batch

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

events*array<>
Items1 <= items
sent_at*string
token*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/i/v1/batch" \  -H "Content-Type: application/json" \  -d '{    "events": [      {        "uuid": "string",        "event": "string",        "context": {          "property1": "string",          "property2": "string"        },        "properties": {          "property1": "string",          "property2": "string"        },        "distinct_id": "string"      }    ],    "sent_at": "string",    "token": "string"  }'
{  "accepted": 0,  "rejected": 0}
{  "_tag": "CaptureInvalidRequestError",  "error": "string",  "code": "invalid_request"}
{  "_tag": "CaptureUnauthorizedError",  "error": "string",  "code": "unauthorized"}
{  "_tag": "CapturePayloadTooLargeError",  "error": "string",  "code": "payload_too_large"}
{  "_tag": "CaptureRateLimitedError",  "error": "string",  "code": "rate_limited",  "retry_after_ms": 0}
{  "_tag": "CaptureInternalServerError",  "error": "string",  "code": "internal_error"}
{  "_tag": "CaptureDependencyUnavailableError",  "error": "string",  "code": "dependency_unavailable"}