Skip to main content
PUT
/
agents
/
{agentId}
/
policy
cURL
curl --request PUT \
  --url https://api.useanima.sh/v1/agents/{agentId}/policy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "policy": {
    "email": {
      "allowedRecipientDomains": [],
      "blockedRecipientDomains": [],
      "maxPerHour": 1
    },
    "vault": {
      "readOnly": false,
      "blocked": false
    },
    "phone": {
      "allowedCountries": [],
      "maxSmsPerHour": 1,
      "blocked": false
    }
  }
}
'
{
  "agentId": "<string>",
  "policy": {
    "email": {
      "allowedRecipientDomains": [],
      "blockedRecipientDomains": [],
      "maxPerHour": 1
    },
    "vault": {
      "readOnly": false,
      "blocked": false
    },
    "phone": {
      "allowedCountries": [],
      "maxSmsPerHour": 1,
      "blocked": false
    }
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Path Parameters

agentId
string
required

Agent identifier to update policy for

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$

Body

application/json

Input for updating an agent's capability policy

policy
object
required

New policy to apply

Response

200 - application/json

OK

Agent policy response

agentId
string
required

Agent identifier

policy
object
required

Current capability policy