Skip to main content
PATCH
/
policies
/
{policy_id}
/
set-current-version
/
{version_id}
curl --request PATCH \
  --url "https://api.roe-ai.com/v1/policies/POLICY_ID/set-current-version/VERSION_ID/?organization_id=YOUR_ORG_ID" \
  --header "Authorization: Bearer YOUR_API_KEY"
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Compliance Review Policy",
  "description": "Policy for reviewing documents against compliance requirements",
  "organization_id": "org-12345678-1234-1234-1234-123456789012",
  "current_version_id": "456e7890-e89b-12d3-a456-426614174002",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-21T09:15:00Z"
}
Change which version is the current (active) version for a policy. This is useful for rolling back to a previous version or promoting a specific version.
Agents that reference this policy will automatically use the new current version on their next job run.

Path Parameters

ParameterTypeRequiredDescription
policy_iduuidYesUUID of the policy to update
version_iduuidYesUUID of the version to set as current

Query Parameters

ParameterTypeRequiredDescription
organization_iduuidYesUUID of the organization for access control
curl --request PATCH \
  --url "https://api.roe-ai.com/v1/policies/POLICY_ID/set-current-version/VERSION_ID/?organization_id=YOUR_ORG_ID" \
  --header "Authorization: Bearer YOUR_API_KEY"
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Compliance Review Policy",
  "description": "Policy for reviewing documents against compliance requirements",
  "organization_id": "org-12345678-1234-1234-1234-123456789012",
  "current_version_id": "456e7890-e89b-12d3-a456-426614174002",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-21T09:15:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

policy_id
string<uuid>
required
version_id
string<uuid>
required

Query Parameters

organization_id
string<uuid>
required

UUID of the organization for access control. Required.

Body

Policy serializer

name
string
Required string length: 1 - 255
description
string

Response

200 - application/json

Policy serializer

id
string<uuid>
required
name
string
required
Maximum string length: 255
organization_id
string<uuid>
required
current_version_id
string<uuid> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
description
string