---
title: "PUT /agents/{agentId}/policy"
method: PUT
path: "/agents/{agentId}/policy"
---

# PUT /agents/{agentId}/policy

`PUT /agents/{agentId}/policy`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/agents/{agentId}/policy`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Path parameters

- `agentId` string, required: Agent identifier to update policy for

## Request body

- object: Input for updating an agent's capability policy
  - `policy` object, required: New policy to apply
    - `email` object: Email capability constraints
      - `allowedRecipientDomains` string[]: If non-empty, agent may ONLY send to these domains
      - `blockedRecipientDomains` string[]: Agent may NEVER send to these domains
      - `maxPerHour` integer: Override emails-per-hour rate limit for this agent
    - `contentSafety` object: Outbound content-safety constraints (formerly the separate Security Policy)
      - `scanLevel` 'off' | 'basic' | 'strict': Outbound content scanning intensity
      - `injectionScanEnabled` boolean: Whether prompt-injection detection runs on outgoing messages
      - `autoApproveBelow` 'none' | 'medium' | 'high': Auto-approve flagged messages at or below this risk threshold
      - `blockedPatterns` string[]: Regex patterns blocked in outgoing messages
    - `vault` object: Vault capability constraints
      - `readOnly` boolean: Agent can read vault items but cannot create, update, or delete
      - `blocked` boolean: Completely disable vault access for this agent
    - `phone` object: Phone/SMS capability constraints
      - `allowedCountries` string[]: ISO 3166-1 alpha-2 country codes. If non-empty, agent may only call/text these.
      - `maxSmsPerHour` integer: Override SMS-per-hour rate limit for this agent
      - `blocked` boolean: Completely disable phone/SMS capabilities for this agent
    - `voice` object: Voice-call capability constraints
      - `allowedCountries` string[]: ISO 3166-1 alpha-2 country codes. If non-empty, agent may only call these.
      - `blocked` boolean: Completely disable outbound voice calls for this agent

## Response `200`

OK

- object: Agent policy response
  - `agentId` string, required: Agent identifier
  - `policy` object, required: Current capability policy
    - `email` object: Email capability constraints
      - `allowedRecipientDomains` string[]: If non-empty, agent may ONLY send to these domains
      - `blockedRecipientDomains` string[]: Agent may NEVER send to these domains
      - `maxPerHour` integer: Override emails-per-hour rate limit for this agent
    - `contentSafety` object: Outbound content-safety constraints (formerly the separate Security Policy)
      - `scanLevel` 'off' | 'basic' | 'strict': Outbound content scanning intensity
      - `injectionScanEnabled` boolean: Whether prompt-injection detection runs on outgoing messages
      - `autoApproveBelow` 'none' | 'medium' | 'high': Auto-approve flagged messages at or below this risk threshold
      - `blockedPatterns` string[]: Regex patterns blocked in outgoing messages
    - `vault` object: Vault capability constraints
      - `readOnly` boolean: Agent can read vault items but cannot create, update, or delete
      - `blocked` boolean: Completely disable vault access for this agent
    - `phone` object: Phone/SMS capability constraints
      - `allowedCountries` string[]: ISO 3166-1 alpha-2 country codes. If non-empty, agent may only call/text these.
      - `maxSmsPerHour` integer: Override SMS-per-hour rate limit for this agent
      - `blocked` boolean: Completely disable phone/SMS capabilities for this agent
    - `voice` object: Voice-call capability constraints
      - `allowedCountries` string[]: ISO 3166-1 alpha-2 country codes. If non-empty, agent may only call these.
      - `blocked` boolean: Completely disable outbound voice calls for this agent

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
