API Reference / Cognis - Threads

Create a thread

post https://api.intelig.ai/api/v1/intelig/cognis/threads

Auth: Authorization: ApiKey <key> (an API key sent as Bearer is rejected) or Authorization: Bearer <jwt> for a dashboard session. operationId: createThread

Creates a new Cognis AI conversation thread within a given scope (organization, team, contributor, or personal). An optional initial question can be provided to seed the thread.

Example request

curl -X POST "https://api.intelig.ai/api/v1/intelig/cognis/threads" \
  -H "Authorization: ApiKey $INTELIG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scopeType": "ORGANIZATION",
    "scopeId": 12,
    "scopeName": "intelig-backend",
    "initialQuestion": "What is our deployment frequency?"
  }'

Request body

application/json

FieldTypeRequiredDescription
scopeType string yes Scope type for the thread One of: CONTRIBUTOR, TEAM, ORGANIZATION, PERSONAL Example: ORGANIZATION
scopeId integer (int64) no Identifier of the scoped entity Example: 12
scopeName string no Display name of the scoped entity Example: intelig-backend
initialQuestion string no Optional initial question to ask Cognis Example: What is our deployment frequency?
dateFrom string (date) no Optional start date for time-scoped queries Example: 2026-01-01
dateTo string (date) no Optional end date for time-scoped queries Example: 2026-03-31

Response 201

application/json · CognisThreadDto

FieldTypeDescription
id string Unique thread identifier
scope CognisScopeDto Scope context for a Cognis thread
title string Thread title
createdAt string (date-time) Timestamp when thread was created
updatedAt string (date-time) Timestamp when thread was last updated
messageCount integer (int32) Total number of messages in the thread
lastMessage string Preview of the last message content
messages CognisMessageDto[] All messages in the thread

Status codes

  • 201 — Thread created successfully
  • 400 — Invalid request body
  • 401 — Not authenticated
  • 403 — Insufficient permissions for Cognis pillar
  • 429 — —

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.