---
search:
  tags:
    - Owner
    - PATCH
seo:
  description: >-
    Updates per-transaction, daily and monthly microcredit caps and… Reference
    for the PATCH /v1/owner/agents/{id}/caps endpoint in the agentsub Gateway
    API.
sidebar:
  label: Update agent spending policy
  badge: PATCH
title: Update agent spending policy
type: openapi-operation
---
Updates per-transaction, daily and monthly microcredit caps and allowlists. Amounts are integer microcredit decimal strings.

`PATCH /v1/owner/agents/{id}/caps`

**Request body** (`application/json`, required)

- `perTxMaxUc` (Microcredits) — Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.
- `dailyMaxUc` (Microcredits) — Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.
- `monthlyMaxUc` (Microcredits) — Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.
- `allowedAcceptors` (string[])
- `allowedCategories` (string[])

Request body example:

```json
{
  "perTxMaxUc": "string",
  "dailyMaxUc": "string",
  "monthlyMaxUc": "string",
  "allowedAcceptors": [
    "string"
  ],
  "allowedCategories": [
    "email"
  ]
}
```

**Responses**

- `200` — Updated agent
- `400` — \`invalid\_input\` problem
- `401` — \`unauthorized\` problem; live 401s advertise \`WWW-Authenticate: Bearer resource\_metadata=...\`
- `403` — Identity, ownership, scope or policy denied (\`human\_required\`, \`owner\_claim\_required\`, \`scope\_required\`, \`FROZEN\`, \`CAP\_EXCEEDED\`, \`SCOPE\_FORBIDDEN\`)
- `503` — Runtime or provider configuration unavailable (\`runtime\_configuration\_required\`, \`signing\_configuration\_required\`, \`runtime\_unavailable\`, \`workspace\_unavailable\`, \`provider\_configuration\_required\`)

Response example, 200:

```json
{
  "agent": {
    "id": "string",
    "ownerId": "string",
    "name": "string",
    "status": "active",
    "caps": {
      "perTxMaxUc": "string",
      "dailyMaxUc": "string",
      "monthlyMaxUc": "string",
      "allowedAcceptors": [
        "string"
      ],
      "allowedCategories": [
        "string"
      ]
    },
    "profile": {
      "name": "string",
      "preset": "letter",
      "color": "string"
    }
  }
}
```
