Capture

POST
/i/v1/capture

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

uuid*string
Length1 <= length
event*string
Length1 <= length
context*
properties*
distinct_id*string
Length1 <= length
session_id?|null
timestamp?string|null
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/capture" \  -H "Content-Type: application/json" \  -d '{    "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"}