Skip to main content
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

ParameterTypeRequiredDescription
policy_iduuidYesUUID of the policy to list versions for

Query Parameters

ParameterTypeRequiredDescription
organization_iduuidYesUUID of the organization for access control
pageintegerNoPage number for pagination (default: 1)
page_sizeintegerNoNumber 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"
      }
    }
  ]
}

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

Query Parameters

page
integer

A page number within the paginated result set.

page_size
integer

Number of results to return per page.

organization_id
string<uuid>

Organization ID. This is required for access control. It can be provided via query or request body depending on the endpoint.

Response

Successfully retrieved list of policy versions.

count
integer
required
Example:

123

results
object[]
required
next
string<uri> | null
Example:

"http://api.example.org/accounts/?page=4"

previous
string<uri> | null
Example:

"http://api.example.org/accounts/?page=2"