API reference · Webhooks
Register a webhook
POST/api/webhooksSigned in session
Deliveries carry x-antimatter-signature, a hex HMAC SHA-256 of the exact body under the whsec_ secret returned here once. Ten per account. Events: budget.threshold, key.created, key.revoked, price.change, alert.triggered, alert.resolved, credits.low_balance, plan.renewed, plan.ended, model.degraded, model.recovered, shadow.candidate_ready, shadow.auto_switched, shadow.savings_report, distill.completed, distill.proof_ready, studio.shot_finished, project.budget_threshold, spend.forecast_over_cap. credits.low_balance carries scope, thresholdMicros, balanceMicros, shortfallMicros and topUpUrl, once per fall below the account's line; plan.renewed and plan.ended (with reason cancelled, lapsed, withdrawn or frozen) carry the subscription's terms; model.degraded and model.recovered carry model, state, reason, since, the last hour's evidence and the thresholds, once per change of a model the account watches (PUT /api/account/model-watch).
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| urlrequired | string | |
| eventsrequired | array of string |
Example
{
"url": "https://example.com",
"events": [
"string"
]
}Answer 201
The endpoint and its signing secret.
| Field | Type | What it is |
|---|---|---|
| id | integer | |
| url | string | |
| events | array of string | |
| secret | string | Shown exactly once. |
Errors
- 400OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.