Skip to content

Search API reference

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

The usage alert object

Hear when a customer's usage in a month reaches a level you set.

A usage alert watches one telemetry, and fires usage_alert.triggered when a customer's usage in a month reaches its level. It can't change once created: archive it and create another.

Attributes

NameTypeDescription
idstringUnique identifier, starting alrt_.
objectstringAlways usage_alert.
livemodebooleantrue in live mode.
titlestringFor your team.
telemetrystringThe telemetry it watches.
thresholdstringThe level that fires it, in the telemetry's units.
customerstring or nullOne customer, or null for each customer on its own.
recurrenceenumonce per customer, or monthly.
statusenumactive, inactive or archived.
createdtimestampWhen it was created.

Example

json
{  "id": "alrt_833020e1d42270c789faabed",  "object": "usage_alert",  "livemode": false,  "title": "Over 500M tokens in a month",  "telemetry": "tlm_b05e39ad8f80e03f25cf2d2a",  "threshold": "500000000",  "customer": null,  "recurrence": "monthly",  "status": "active",  "created": "2026-11-27T09:00:00Z"}

Endpoints

EndpointWhat it does
POST /v1/usage_alertsWatch a telemetry for a level of usage.
GET /v1/usage_alerts/{id}Get a usage alert by its ID.
POST /v1/usage_alerts/{id}/deactivateStop checking it. Usage meanwhile isn't caught up later.
POST /v1/usage_alerts/{id}/reactivateCheck it again, from the next usage.
POST /v1/usage_alerts/{id}/archiveStop an alert for good.
GET /v1/usage_alertsList your usage alerts.