Skip to content

Search API reference

Find an endpoint or a guide of the Sovgate API reference and jump straight to it.

Record usage

Send one reading of usage.

POST/v1/telemetry_events

Records usage for a customer. The answer says whether it was counted: a refused event comes back with status rejected and an error. Send an identifier with every event so a retry is never counted twice: it's the event's idempotency key, kept until its month closes.

Endpoint

http
POST /v1/telemetry_events

Request body

NameTypeRequiredDescription
event_namestringRequiredA telemetry's event name.
payloadobjectRequiredThe telemetry's customer key and value key, with string values.
identifierstringOptionalYour own ID for the reading. Default: one is made for you.
timestamptimestampOptionalWhen it happened. Default: now.

Example request

bash
curl -X POST https://api.sovgate.com/v1/telemetry_events \  -H "Authorization: Bearer sov_sk_test_your_key" \  -H "Idempotency-Key: e6d429ee-4b2a-4c1d-9e3f-b9fb33dc8a97" \  -H "Content-Type: application/json" \  -d '{  "event_name": "llm_input_tokens",  "payload": {    "customer": "cust_13ed3f69adfcfcb6289a5491",    "tokens": "1200"  },  "identifier": "req_7f3a-0042",  "timestamp": "2026-11-27T08:59:58Z"}'

Example response

json
{  "id": "uev_ea13ec2163a908c495853f4b",  "object": "telemetry_event",  "livemode": false,  "identifier": "req_7f3a-0042",  "event_name": "llm_input_tokens",  "payload": {    "customer": "cust_13ed3f69adfcfcb6289a5491",    "tokens": "1200"  },  "telemetry": "tlm_b05e39ad8f80e03f25cf2d2a",  "customer": "cust_13ed3f69adfcfcb6289a5491",  "timestamp": "2026-11-27T08:59:58Z",  "source": "api",  "status": "accepted",  "error": null,  "created": "2026-11-27T09:00:01Z"}