# SpendCap

> The SpendCap object in the Guv API.

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `id` * | string |  |
| `scope` * | object |  |
| `amount` * | [Money](/docs/api/objects/money/) |  |
| `on_cap` * | [OnCapAction](/docs/api/objects/on-cap-action/) |  |
| `warn_at` * | array of integer | Default `[50,80]`. |
| `state` * | `ok`, `warning`, `reached` |  |
| `month_to_date` | [Money](/docs/api/objects/money/) |  |
| `forecast` | [Money](/docs/api/objects/money/) |  |
| `source` | `default`, `manual`, `manifest` |  |
| `created_at` * | string (date-time) |  |
| `updated_at` | string (date-time) |  |

\* always present

## Example

```json
{
  "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"
}
```

## Used by

- [Create a spend cap](/docs/api/spend/#create-a-spend-cap)
- [Get a spend cap](/docs/api/spend/#get-a-spend-cap)
- [Change a spend cap](/docs/api/spend/#change-a-spend-cap)
