API Reference / Cognis - Reasoning
Ask Cognis (blocking)
post
https://api.intelig.ai/api/v1/intelig/cognis/threads/{threadId}/ask
Auth: Authorization: ApiKey <key> (an API key sent as
Bearer is rejected) or Authorization: Bearer <jwt>
for a dashboard session. operationId: ask
Sends a question to the Cognis AI reasoning engine within a thread and returns the complete response. The reasoning loop parses intent, plans questions, fetches pillar data, builds evidence, and generates a response. Use the streaming variant for real-time token delivery.
Example request
curl -X POST "https://api.intelig.ai/api/v1/intelig/cognis/threads/1/ask" \
-H "Authorization: ApiKey $INTELIG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What is our deployment frequency this quarter?",
"mode": "ASK",
"scopeType": "ORGANIZATION",
"scopeId": 12
}' Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
threadId | integer (int64) | yes | — |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
question | string | yes | The question to ask Cognis Example: What is our deployment frequency this quarter? |
mode | string | yes | Intent mode for the question (GENERAL, ASK, or AGENT) One of: ASK, AGENT, GENERAL Example: ASK |
scopeType | string | no | Optional per-message scope type override (ORGANIZATION, TEAM, CONTRIBUTOR) Example: ORGANIZATION |
scopeId | integer (int64) | no | Optional per-message scope ID override Example: 12 |
dateFrom | string | no | Optional per-message date range start (ISO date) Example: 2026-01-01 |
dateTo | string | no | Optional per-message date range end (ISO date) Example: 2026-01-31 |
clientTimezone | string | no | Browser/client IANA timezone Example: America/New_York |
clientToday | string | no | Browser/client local date (ISO date) Example: 2026-05-29 |
modelKey | string | no | Optional model key for this ask. When omitted, the user's saved Cognis model preference is used, falling back to the system default. Example: anthropic:claude-opus-4-8 |
Response 200
application/json · AskCognisResponseDto
| Field | Type | Description |
|---|---|---|
message | CognisMessageDto | A single message in a Cognis conversation thread |
pillar | string | Pillar used to answer the question |
threadUpdated | boolean | Whether the thread was updated as a result |
followUpSuggestions | FollowUpSuggestion[] | Suggested follow-up questions |
Status codes
200— AI response returned successfully400— Invalid request or empty question401— Not authenticated403— Insufficient permissions for Cognis pillar404— Thread not found429— —
Every response is wrapped in { success, message, data }. A 4xx means the request
is wrong — do not retry it unchanged. A 429 carries Retry-After in seconds.