curl --request POST \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/versions/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Updated Verification Rules",
"rules": [
{
"title": "Enhanced signature validation",
"description": "All signatures must be verified against the authorized signatory list",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures.",
"dispositions": {
"classifications": [
{"name": "Approved", "description": "Document passes all checks"},
{"name": "Rejected", "description": "Document fails one or more checks"}
]
}
}
}'
{
"id": "456e7890-e89b-12d3-a456-426614174002",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Updated Verification Rules",
"rules": [
{
"title": "Enhanced signature validation",
"description": "All signatures must be verified against the authorized signatory list",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures.",
"dispositions": {
"classifications": [
{"name": "Approved", "description": "Document passes all checks"},
{"name": "Rejected", "description": "Document fails one or more checks"}
]
}
}
}
{
"content": ["This field is required."]
}
{
"content": ["Invalid new format content: guidelines.categories[0].rules[0].title must be a non-empty string"]
}
Policies
Create Policy Version
Create a new policy version or list all versions of a specific policy
POST
/
policies
/
{policy_id}
/
versions
/
curl --request POST \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/versions/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Updated Verification Rules",
"rules": [
{
"title": "Enhanced signature validation",
"description": "All signatures must be verified against the authorized signatory list",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures.",
"dispositions": {
"classifications": [
{"name": "Approved", "description": "Document passes all checks"},
{"name": "Rejected", "description": "Document fails one or more checks"}
]
}
}
}'
{
"id": "456e7890-e89b-12d3-a456-426614174002",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Updated Verification Rules",
"rules": [
{
"title": "Enhanced signature validation",
"description": "All signatures must be verified against the authorized signatory list",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures.",
"dispositions": {
"classifications": [
{"name": "Approved", "description": "Document passes all checks"},
{"name": "Rejected", "description": "Document fails one or more checks"}
]
}
}
}
{
"content": ["This field is required."]
}
{
"content": ["Invalid new format content: guidelines.categories[0].rules[0].title must be a non-empty string"]
}
Create a new version of an existing policy. The new version is automatically set as the current version for the policy.
Creating a new version does not modify existing versions. All previous versions remain accessible and can be restored using the Set Current Version endpoint.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
policy_id | uuid | Yes | UUID of the policy to add a version to |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | uuid | Yes | UUID of the organization for access control |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
version_name | string | No | Name for this version (auto-generated if not provided, e.g., “version 2”) |
content | object | Yes | Policy content structure (see below) |
Content Object
Thecontent field accepts a JSON object with the following optional sections:
| Field | Type | Description |
|---|---|---|
guidelines | object | Hierarchical structure with categories array containing rules |
guidelines.categories[].title | string | Category title (required) |
guidelines.categories[].description | string | Category description (optional) |
guidelines.categories[].rules | array | List of rules in this category |
guidelines.categories[].rules[].title | string | Rule title (required) |
guidelines.categories[].rules[].description | string | Rule description (optional) |
guidelines.categories[].rules[].flag | string | GREEN_FLAG or RED_FLAG (optional) |
guidelines.categories[].rules[].sub_rules | array | Nested sub-rules (optional) |
instructions | string | Free-form text instructions for the agent |
dispositions | object | Classification options with classifications array |
dispositions.classifications[].name | string | Classification name (required) |
dispositions.classifications[].description | string | Classification description (optional) |
dispositions.classifications[].prompt | string | Prompt for when to use this classification (optional) |
summary_template | object | Template for generating summaries |
summary_template.template | string | Handlebars-style template string |
curl --request POST \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/versions/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Updated Verification Rules",
"rules": [
{
"title": "Enhanced signature validation",
"description": "All signatures must be verified against the authorized signatory list",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures.",
"dispositions": {
"classifications": [
{"name": "Approved", "description": "Document passes all checks"},
{"name": "Rejected", "description": "Document fails one or more checks"}
]
}
}
}'
{
"id": "456e7890-e89b-12d3-a456-426614174002",
"version_name": "version 2",
"content": {
"guidelines": {
"categories": [
{
"title": "Updated Verification Rules",
"rules": [
{
"title": "Enhanced signature validation",
"description": "All signatures must be verified against the authorized signatory list",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Apply enhanced review procedures.",
"dispositions": {
"classifications": [
{"name": "Approved", "description": "Document passes all checks"},
{"name": "Rejected", "description": "Document fails one or more checks"}
]
}
}
}
{
"content": ["This field is required."]
}
{
"content": ["Invalid new format content: guidelines.categories[0].rules[0].title must be a non-empty string"]
}
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