Skip to main content
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"
}
Create a new policy with an initial version. The initial version is automatically set as the current version.

Query Parameters

ParameterTypeRequiredDescription
organization_iduuidYesUUID of the organization to create the policy in

Request Body

FieldTypeRequiredDescription
namestringYesName of the policy (max 255 characters)
descriptionstringNoDescription of the policy
contentobjectYesPolicy content structure (see below)
version_namestringNoName for the initial version (default: “version 1”)

Content Object

The content field accepts a JSON object with the following optional sections:
FieldTypeDescription
guidelinesobjectHierarchical structure with categories, rules, and sub-rules
instructionsstringFree-form text instructions for the agent
dispositionsobjectClassification options for agent outputs
summary_templateobjectHandlebars-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"
}

Authorizations

Authorization
string
header
required

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

Query Parameters

organization_id
string<uuid>
required

UUID of the organization for access control. Required.

Body

Serializer for creating a new policy with initial version

name
string
required
Required string length: 1 - 255
content
any
required

Content for the initial policy version

description
string
version_name
string
default:version 1

Name for the initial version (defaults to 'version 1')

Required string length: 1 - 255

Response

201 - application/json

Serializer for creating a new policy with initial version

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