Update a policy
PATCH/v1/directory/policies/{policy_id}
Renames a policy or changes its description. Send only what changes.
Permission: identity:UpdatePolicy. Changes need a sign-in that used a second factor.
Path parameters
| Parameter | Type | Description |
|---|---|---|
policy_id |
string | The policy's ID. |
Body
| Field | Type | Description |
|---|---|---|
name |
string | Up to 128 characters. |
description |
string | Up to 1,000 characters. |
Returns
200 OK
{
"id": "7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
"name": "Agent builders",
"description": "Create, edit and run agents",
"kind": "policy",
"policy_ids": [],
"role_ids": [
"5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"
],
"account_ids": [],
"permissions": [
"agents:CreateAgent",
"agents:UpdateAgent"
],
"managed": false,
"builtin": "",
"role": "",
"created_at": "2026-11-19T09:00:00Z",
"updated_at": "2026-11-19T09:00:00Z"
}Errors
Besides the errors every call can return:
| Status | When |
|---|---|
404 |
No such resource in your organization. |
409 |
A policy already has that name, or it is managed. |
Example
curl -X PATCH https://<company>.yotta.bot/v1/directory/policies/7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a \
-H "Authorization: Bearer $YOTTABOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"description": "Create, edit and run agents"}'With yottactl
yottactl org policies update 7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a \
--set description=Create, edit and run agents