v56

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014121451.1 MB
Policies

Chat with AI about a policy

Ask policy-specific questions and request draft improvements while preserving human review before policy changes are applied.

post/v1/policies/{id}/ai-chat

Path parameters

idstring required
Example:pol_abc123def456

Policy ID

Headers

X-Organization-Idstring

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

Request body

instructionsstring required

User instructions about what changes to make to the policy

Example request

{
  "instructions": "Update the data retention section to specify a 7-year retention period",
  "chatHistory": [
    {
      "role": "user",
      "content": "Update the data retention policy"
    },
    {
      "role": "assistant",
      "content": "I can help with that..."
    }
  ]
}

Response

Streaming AI response