curl --request POST \
--url http://localhost:3333/v1/policies/{id}/ai-chat \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"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..."
}
]
}
'"<string>"Stream AI responses for policy editing assistance. Returns a text/event-stream with AI-generated suggestions.
curl --request POST \
--url http://localhost:3333/v1/policies/{id}/ai-chat \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"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..."
}
]
}
'"<string>"API key for authentication
Organization ID (required for session auth, optional for API key auth)
Policy ID
"pol_abc123def456"
User instructions about what changes to make to the policy
"Update the data retention section to specify a 7-year retention period"
Chat history for context (array of messages with role and content)
[
{
"role": "user",
"content": "Update the data retention policy"
},
{
"role": "assistant",
"content": "I can help with that..."
}
]Streaming AI response
The response is of type string.
Was this page helpful?