curl --request POST \
--url "https://api.roe-ai.com/v1/policies/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"content": {
"guidelines": {
"categories": [
{
"title": "Document Verification",
"rules": [
{
"title": "Check all signatures",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Review all documents carefully."
},
"version_name": "version 1"
}'
{
"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-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"name": ["This field is required."],
"content": ["This field is required."]
}
{
"content": ["Invalid new format content: guidelines.categories[0].title must be a non-empty string"]
}
Policies
Create Policy
List all policies and create a new policy
POST
/
policies
/
curl --request POST \
--url "https://api.roe-ai.com/v1/policies/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"content": {
"guidelines": {
"categories": [
{
"title": "Document Verification",
"rules": [
{
"title": "Check all signatures",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Review all documents carefully."
},
"version_name": "version 1"
}'
{
"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-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"name": ["This field is required."],
"content": ["This field is required."]
}
{
"content": ["Invalid new format content: guidelines.categories[0].title must be a non-empty string"]
}
Create a new policy with an initial version. The initial version is automatically set as the current version.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | uuid | Yes | UUID of the organization to create the policy in |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the policy (max 255 characters) |
description | string | No | Description of the policy |
content | object | Yes | Policy content structure (see below) |
version_name | string | No | Name for the initial version (default: “version 1”) |
Content Object
Thecontent field accepts a JSON object with the following optional sections:
| Field | Type | Description |
|---|---|---|
guidelines | object | Hierarchical structure with categories, rules, and sub-rules |
instructions | string | Free-form text instructions for the agent |
dispositions | object | Classification options for agent outputs |
summary_template | object | Handlebars-style template for generating summaries |
curl --request POST \
--url "https://api.roe-ai.com/v1/policies/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"name": "Compliance Review Policy",
"description": "Policy for reviewing documents against compliance requirements",
"content": {
"guidelines": {
"categories": [
{
"title": "Document Verification",
"rules": [
{
"title": "Check all signatures",
"flag": "RED_FLAG"
}
]
}
]
},
"instructions": "Review all documents carefully."
},
"version_name": "version 1"
}'
{
"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-426614174001",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"name": ["This field is required."],
"content": ["This field is required."]
}
{
"content": ["Invalid new format content: guidelines.categories[0].title must be a non-empty string"]
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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
Serializer for creating a new policy with initial version
Response
Policy created successfully.
Serializer for creating a new policy with initial version