Skip to main content
POST
/
api
/
sessions
/
{sessionId}
/
chats
Create session chat
curl --request POST \
  --url https://api.recoupable.com/api/sessions/{sessionId}/chats \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "id": "<string>"
}
'
{
  "chat": {
    "id": "<string>",
    "sessionId": "<string>",
    "title": "<string>",
    "modelId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "activeStreamId": "<string>",
    "lastAssistantMessageAt": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Path Parameters

sessionId
string
required

The id of the parent session.

Body

application/json

Body for POST /api/sessions/{sessionId}/chats. Both an empty body and an omitted body are valid.

id
string

Optional client-supplied chat id (used for optimistic UI flows). When omitted, the server generates a UUID. When supplied, must be a non-empty string.

Minimum string length: 1

Response

Chat created, or existing chat returned (idempotent on same-session reuse).

chat
object
required