Analysis groups
Creates a new analysis group together with its data collections and returns the full group, including the generated id. Each data collection describes one piece of information to extract or evaluate from a call — a name, a type, a human-readable description, and optional constraints. After creating a group, link it to one or more agents (via POST /api/ext/agent/{agent_id}/analysis_groups or POST /api/ext/analysis/{analysis_group_id}/agent(s)) so it runs after those agents' calls.
curl --request POST \
--url 'https://api.nabrah.ai/api/ext/analysis' \
--header 'X-API-Key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Call Outcome",
"data_collections": [
{
"name": "resolved",
"type": "boolean",
"description": "Whether the caller'\''s issue was resolved during the call.",
"constraints": {}
}
]
}'{
"name": "string",
"id": "00000000-0000-4000-8000-000000000000",
"project_id": "00000000-0000-4000-8000-000000000000",
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z",
"data_collections": [
{
"name": "string",
"type": "string",
"id": "00000000-0000-4000-8000-000000000000",
"analysis_group_id": "00000000-0000-4000-8000-000000000000",
"description": "string",
"constraints": {}
}
]
}name labels the group. data_collections is the list of items to capture; each has a name (the field key), a type (the expected data type, e.g. "string", "number", "boolean"), a description guiding what to extract/evaluate, and an optional constraints object for additional rules.
namedata_collectionsCreating a group does not attach it to any agent. After capturing the returned id, link it using the agent or analysis linking endpoints.
A 422 response means the body failed validation; inspect detail for the offending field path.
X-API-KeystringheaderrequiredYour workspace API key. Create one in the dashboard under API keys.
A group with a single extraction field.
{
"name": "Call Outcome",
"data_collections": [
{
"name": "resolved",
"type": "boolean",
"description": "Whether the caller's issue was resolved during the call.",
"constraints": {}
}
]
}Successful Response
application/json
Validation Error
application/json