Logo
Search
API Docs

Chat API: Get, List, Delete

Chat Agents

Chat API: Get, List, Delete

Overview

Beyond sending a message and getting a reply, the Chat API includes three endpoints for managing chat resources directly: Get a single chat by ID, List chats with filters and pagination, and Delete a chat. All three require a Bearer token passed in the Authorization header.

This page is the CRUD/lifecycle reference for chat resources. For the conceptual mechanics of how previousChatId and sessionId maintain conversation context across requests, see Chat API & Session Management.


Get Chat

Retrieves a single chat by its ID.

GET https://api.sulus.ai/chat/{id}
ParameterLocationRequiredDescription
idpathYesThe unique identifier of the chat.
AuthorizationheaderYesBearer token: Bearer <your-api-key>
curl -X GET https://api.sulus.ai/chat/{id} \
  -H "Authorization: Bearer <your-api-key>"

Returns a Chat object on 200 OK.


List Chats

Retrieves a paginated list of chats, with optional filters.

GET https://api.sulus.ai/chat
ParameterRequiredDescription
idNoFilter by a specific chat ID.
assistantIdNoFilter by a single assistant ID.
assistantIdAnyNoFilter by multiple assistant IDs (comma-separated).
squadIdNoFilter by squad ID.
sessionIdNoFilter by session ID.
previousChatIdNoFilter by previous chat ID.
pageNoPage number to return. Defaults to 1.
sortOrderNoASC or DESC. Defaults to DESC.
limitNoMax items to return. Defaults to 100.
createdAtGt / createdAtLt / createdAtGe / createdAtLeNoFilter by chat creation timestamp (after / before / at-or-after / at-or-before).
updatedAtGt / updatedAtLt / updatedAtGe / updatedAtLeNoFilter by chat update timestamp (after / before / at-or-after / at-or-before).
AuthorizationYesBearer token: Bearer <your-api-key>
curl -X GET "https://api.sulus.ai/chat?assistantId=<assistant-id>&limit=50&sortOrder=DESC" \
  -H "Authorization: Bearer <your-api-key>"

Returns a paginated response containing the matching Chat objects.


Delete Chat

Permanently deletes a chat by its ID.

DELETE https://api.sulus.ai/chat/{id}
ParameterLocationRequiredDescription
idpathYesThe unique identifier of the chat to delete.
AuthorizationheaderYesBearer token: Bearer <your-api-key>
curl -X DELETE https://api.sulus.ai/chat/{id} \
  -H "Authorization: Bearer <your-api-key>"

Returns the deleted Chat object on 200 OK. This is irreversible.