API reference · Account
Replace the set of spend alerts
PUT/api/account/alertsSigned in session
Crossing a threshold fires the existing budget.threshold webhook event, once per window, on the edge. What you send is exactly what is armed.
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| orgId | integer or null | |
| alertsrequired | array of object | |
| alerts[] | string | One of "day", "month". |
| alerts[] | integer | Micro USD. |
Example
{
"orgId": 0,
"alerts": [
{
"period": "day",
"thresholdMicros": 0
}
]
}Answer 200
The alerts now armed.
The answer's fields are not named in the document.
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 403OpenAI 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.