Skip to main content
GET
/
v1
/
policies
curl --request GET --url "https://api.trycomp.ai/v1/policies" --header "X-API-Key: $COMP_AI_API_KEY"
{
  "data": [
    {
      "id": "pol_abc123def456",
      "name": "Data Privacy Policy",
      "description": "This policy outlines how we handle and protect personal data",
      "status": "draft",
      "content": [
        {
          "type": "paragraph",
          "attrs": {
            "textAlign": null
          },
          "content": [
            {
              "type": "text",
              "text": "This policy outlines our commitment to protecting personal data."
            }
          ]
        }
      ],
      "frequency": "yearly",
      "department": "IT",
      "isRequiredToSign": true,
      "signedBy": [],
      "reviewDate": "2024-12-31T00:00:00.000Z",
      "isArchived": false,
      "archivedAt": null,
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-15T00:00:00.000Z",
      "lastArchivedAt": null,
      "lastPublishedAt": "2024-01-10T00:00:00.000Z",
      "organizationId": "org_abc123def456",
      "assigneeId": "usr_abc123def456",
      "approverId": "usr_xyz789abc123",
      "policyTemplateId": null
    }
  ],
  "authType": "session",
  "authenticatedUser": {
    "id": "usr_abc123def456",
    "email": "user@company.com"
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Headers

X-Organization-Id
string

Organization ID (required for session auth, optional for API key auth)

Query Parameters

excludeContent
boolean

When true, omits content and draftContent from each policy in the response. Use this when listing policies to find one by name/ID — fetch the full content via GET /v1/policies/{id} after.

includeArchived
boolean

When true, includes user-archived and framework-sync-archived policies in the response. Defaults to false.

Response

Policies retrieved successfully

data
object[]
required

Array of policies

authType
enum<string>
required

How the request was authenticated

Available options:
api-key,
session
authenticatedUser
object

Authenticated user information (only present for session auth)