API
POST /api/sessions
Create Session
POST /api/sessions
Create Session
Authentication: Authorization: Bearer <key> or X-API-Key: <key>. Create keys at developers.cognitivx.io/keys.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Org-ID | header | string | null | No | - |
Request body
A JSON request body is required.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | No | Defaults to "New Chat". |
Example request
curl -X POST https://api.cognitivx.io/api/sessions \
-H "Authorization: Bearer icog_..." \
-H "Content-Type: application/json" \
-d '{
"title": "New Chat"
}'Example response
200 application/json
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"provider": null,
"model": null,
"created_at": "2026-06-16T08:30:00Z",
"updated_at": "2026-06-16T08:30:00Z",
"message_count": 0,
"last_message_preview": null,
"category_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"category_name": "production",
"category_color": null,
"category_icon": null,
"is_pinned": false,
"is_archived": false,
"initiated_by": null,
"unread": false
}Responses
| Status | Description |
|---|---|
200 | Success. Returns the response body shown below. |
422 | Request validation failed. detail lists each offending field. |