curl --request PUT \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"name": "Updated Policy Name",
"description": "Updated policy description"
}'
curl --request PATCH \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"description": "Only updating the description"
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Policy Name",
"description": "Updated policy description",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-21T09:00:00Z"
}
{
"name": ["This field is required."]
}
Policies
Update Policy
Retrieve, update, or delete a single policy by ID
PUT
/
policies
/
{id}
/
curl --request PUT \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"name": "Updated Policy Name",
"description": "Updated policy description"
}'
curl --request PATCH \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"description": "Only updating the description"
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Policy Name",
"description": "Updated policy description",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-21T09:00:00Z"
}
{
"name": ["This field is required."]
}
Update metadata (name and description) of an existing policy. This does not modify the policy versions or content - use the Create Policy Version endpoint to add new content.
This endpoint supports both
PUT (full update) and PATCH (partial update) methods.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | UUID of the policy to update |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | uuid | Yes | UUID of the organization for access control |
Request Body
| Field | Type | Required (PUT) | Required (PATCH) | Description |
|---|---|---|---|---|
name | string | Yes | No | New name for the policy (max 255 characters) |
description | string | No | No | New description for the policy |
curl --request PUT \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"name": "Updated Policy Name",
"description": "Updated policy description"
}'
curl --request PATCH \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"description": "Only updating the description"
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Policy Name",
"description": "Updated policy description",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-21T09:00:00Z"
}
{
"name": ["This field is required."]
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Organization ID. This is required for access control. It can be provided via query or request body depending on the endpoint.
Body
application/json
Response
Policy updated successfully.
Serializer for updating policy metadata (name, description)