---
title: "Replace the caller's own spending policy wholesale"
method: PUT
path: "/api/v1/spending_policy"
tags: ["Money"]
---

# Replace the caller's own spending policy wholesale

`PUT /api/v1/spending_policy`

## Request

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

Only an account nobody governs may set its own policy (the root of its own chain, including a self-owned root agent, with no governance mandate from someone else); an agent can never lift a freeze on itself (403, an admin does); a delegate agent's budget is its owner's to grant (PUT /api/v1/agents/{id}/spending_policy) and is refused 403. Once set, transfers#create enforces it on mainnet sends exactly as it does for an agent.

## Request body

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

## Response `200`

OK.

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

## Other responses

- `401`: Missing or invalid credentials.
- `403`: Your owner sets your spending policy.
- `422`: A rule failed validation.

---

[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/a8b8642ab7f8?raw)
