SpendCap
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
id * |
string | |
scope * |
object | |
amount * |
Money | |
on_cap * |
OnCapAction | |
warn_at * |
array of integer | Default [50,80]. |
state * |
ok, warning, reached |
|
month_to_date |
Money | |
forecast |
Money | |
source |
default, manual, manifest |
|
created_at * |
string (date-time) | |
updated_at |
string (date-time) |
* always present
Example
Section titled “Example”{ "id": "cap_01jbx2m9k7q4r8t5v6w3y0z1pr", "scope": { "type": "workspace", "project_id": "string", "environment_id": "string" }, "amount": { "amount": "7.42", "currency": "GBP", "display": "£7.42" }, "on_cap": "sleep_non_production", "warn_at": [ 50, 80 ], "state": "ok", "month_to_date": { "amount": "7.42", "currency": "GBP", "display": "£7.42" }, "forecast": { "amount": "7.42", "currency": "GBP", "display": "£7.42" }, "source": "default", "created_at": "2026-10-22T13:05:00Z", "updated_at": "2026-10-22T13:05:00Z"}