curl --request POST \
--url https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/agents/{agent_id}/analyze \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_ids": [
"conv_123",
"conv_456"
]
}
'
{
"status": "queued",
"queue_id": "aq_8f2c1e",
"mode": "batch",
"message": "Analysis queued for processing"
}{
"error": "InvalidArgumentsError",
"message": "Invalid arguments",
"details": {
"errors": []
}
}{
"error": "UNAUTHORIZED",
"message": "Authentication required"
}{
"error": "FORBIDDEN",
"message": "Access denied: missing permission 'ai-insights-v2:analytics:read'"
}{
"error": "Agent not found or access denied"
}{
"error": "TooManyRequests",
"message": "Too many requests for 'Insights'",
"details": {
"name": "Insights",
"ok": false,
"retryAfter": 42.5,
"limit": 100,
"window": 60,
"remaining": 0
}
}Agents
Trigger analysis of an agent's conversations
Analyzes conversations of an agent against its evaluation criteria.
batch(default): the request is queued and each conversation is markedpending. Follow progress withGET /v1/insights/status.realtime: each conversation inconversation_idsis analyzed synchronously, and the response reports how many succeeded. Withoutconversation_ids, the request runs in batch mode.
Returns 404 when Agent Factory cannot return the agent to the caller (unknown agent or no access to it).
Requires ai-insights-v2:conversations (write). Rate limit: 10
requests per minute.
POST
/
v1
/
agents
/
{agent_id}
/
analyze
curl --request POST \
--url https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/agents/{agent_id}/analyze \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_ids": [
"conv_123",
"conv_456"
]
}
'
{
"status": "queued",
"queue_id": "aq_8f2c1e",
"mode": "batch",
"message": "Analysis queued for processing"
}{
"error": "InvalidArgumentsError",
"message": "Invalid arguments",
"details": {
"errors": []
}
}{
"error": "UNAUTHORIZED",
"message": "Authentication required"
}{
"error": "FORBIDDEN",
"message": "Access denied: missing permission 'ai-insights-v2:analytics:read'"
}{
"error": "Agent not found or access denied"
}{
"error": "TooManyRequests",
"message": "Too many requests for 'Insights'",
"details": {
"name": "Insights",
"ok": false,
"retryAfter": 42.5,
"limit": 100,
"window": 60,
"remaining": 0
}
}Authorizations
BearerAuthOrgApiKeyAuth
Path Parameters
Body
application/json
Was this page helpful?