# Set budget

Creates or sets the limit of an organization, team or agent budget. Console session or API key with budget:edit; a team or agent limit must fit under its parent.

`POST /v1/budgets`

Creates or sets the limit of an organization, team or agent budget. Console session or API key with budget:edit; a team or agent limit must fit under its parent.

Requires permission `budget:edit`.

## Request body

```json
{
  "scope_type": "string",
  "scope_id": "sco_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "limit_base_units": "50000"
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).
- **403**: Authenticated but not allowed: missing permission, passkey step-up required, or denied by policy.
- **404**: The resource does not exist or belongs to another organization.

Example 200 response:

```json
{
  "budget": {
    "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "scope_type": "string",
    "scope_id": "sco_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "asset": "USDC",
    "limit": "string",
    "committed": "string",
    "spent": "50000",
    "reserved": "50000",
    "available": "50000",
    "pct": 1,
    "alert_80": true,
    "alert_80_enabled": true,
    "alert_80_sent_at": "2026-11-16T12:00:00Z"
  }
}
```
