curl --request GET \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/versions/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"id": "456e7890-e89b-12d3-a456-426614174003",
"version_name": "version 3",
"content": {
"guidelines": {
"categories": [
{
"title": "Enhanced Verification",
"rules": [
{
"title": "Verify all signatures",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures."
},
"updated_at": "2024-01-20T15:45:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174003",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
},
{
"id": "456e7890-e89b-12d3-a456-426614174002",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": []
},
"instructions": "Review documents."
},
"updated_at": "2024-01-18T12:00:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174003",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
}
]
}
Policies
List Policy Versions
Create a new policy version or list all versions of a specific policy
GET
/
policies
/
{policy_id}
/
versions
/
curl --request GET \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/versions/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"id": "456e7890-e89b-12d3-a456-426614174003",
"version_name": "version 3",
"content": {
"guidelines": {
"categories": [
{
"title": "Enhanced Verification",
"rules": [
{
"title": "Verify all signatures",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures."
},
"updated_at": "2024-01-20T15:45:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174003",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
},
{
"id": "456e7890-e89b-12d3-a456-426614174002",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": []
},
"instructions": "Review documents."
},
"updated_at": "2024-01-18T12:00:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174003",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
}
]
}
Retrieve a paginated list of all versions for a specific policy, ordered by most recently updated first.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
policy_id | uuid | Yes | UUID of the policy to list versions for |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | uuid | Yes | UUID of the organization for access control |
page | integer | No | Page number for pagination (default: 1) |
page_size | integer | No | Number of results per page (default: 10) |
curl --request GET \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/versions/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"id": "456e7890-e89b-12d3-a456-426614174003",
"version_name": "version 3",
"content": {
"guidelines": {
"categories": [
{
"title": "Enhanced Verification",
"rules": [
{
"title": "Verify all signatures",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures."
},
"updated_at": "2024-01-20T15:45:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174003",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
},
{
"id": "456e7890-e89b-12d3-a456-426614174002",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": []
},
"instructions": "Review documents."
},
"updated_at": "2024-01-18T12:00:00Z",
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents",
"organization_id": "org-12345678-1234-1234-1234-123456789012",
"current_version_id": "456e7890-e89b-12d3-a456-426614174003",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
}
]
}