/api/orgs/{org_id}/spend-alertsCreate a spend alert
org_monthly_spend emails when the organization's spend this month reaches threshold_nano_usd; budget_fraction emails when a budget reaches threshold_fraction of its limit. Each kind takes only its own fields. Org admin or the provisioning key.
Authentication: Bearer API key in the Authorization header
Path parameters
org_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.
Request body
kindenumrequiredthreshold_nano_usdinteger | nullInteger nano-USD.
budget_idstring | nullthreshold_fractionnumber | nullShare of the budget's limit; 0.8 is 80%.
notify_emailstringrequired
Responses
201The alert.
Response
alert_idstringrequiredkindenumrequiredthreshold_nano_usdinteger | nullrequiredbudget_idstring | nullrequiredthreshold_fractionnumber | nullrequirednotify_emailstringrequiredcreated_atstringrequiredlast_eventobject | nullrequiredOne of
object
periodstringrequiredYYYY-MM.fired_atstringrequiredmeasured_nano_usdintegerrequiredthreshold_nano_usdintegerrequireddelivered_atstring | nullrequireddelivery_errorstring | nullrequired
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is not a provisioning key (inference keys are refused, reads included), or it is a customer-plan key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404Unknown organization or budget.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
409An identical alert exists.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422Fields that do not match the kind, or body validation.
Request
curl -X POST 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/spend-alerts' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"kind": "budget_fraction",
"budget_id": "c4a2e8f1-7b3d-4e9a-8c15-3f0d6b2a9e71",
"threshold_fraction": 0.8,
"notify_email": "finance@acme.example"
}'Response
{
"alert_id": "3c5e7a9c-1e3b-4d5f-8a0c-2e4a6c8e0b69",
"kind": "budget_fraction",
"threshold_nano_usd": null,
"budget_id": "c4a2e8f1-7b3d-4e9a-8c15-3f0d6b2a9e71",
"threshold_fraction": 0.8,
"notify_email": "finance@acme.example",
"created_at": "2026-11-22T16:10:03Z",
"last_event": null
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/spend-alerts