---
title: "Replace an owned agent's spending policy wholesale"
method: PUT
path: "/api/v1/agents/{id}/spending_policy"
tags: ["Agents"]
---

# Replace an owned agent's spending policy wholesale

`PUT /api/v1/agents/{id}/spending_policy`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/agents/{id}/spending_policy`
- Auth: API key in header `api-key`

Chain-root only (or an `agent.spending` delegate acting for it). Last-write-wins (no CAS); every write lands in the event stream. A delegate may lower caps, remove rules and freeze freely; RAISING anything is refused 403 (`cap_exceeded`) above the mandate's `max_cap` (a per-MONTH ceiling in one currency; a rule counts as raised unless it is provably no looser than the same chain's current rule) and a delegate can never lift a freeze here (use POST /agents/{id}/resume).

## Path parameters

- `id` string, required

## Request body

- object
  - `frozen` boolean
  - `rules` object[]

## Response `200`

OK. Same shape as the GET.

- object

## Other responses

- `401`: Missing or invalid credentials.
- `403`: Forbidden.
- `422`: Validation failure (joined sentence).

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a3910bbaf26a?raw)
