Create Chat
Chats
Create Chat
POST
Create Chat
Create Chat
This endpoint creates a new chat session for a user. The chat session can then be used for real-time messaging via WebSocket connections.Authentication
Authentication header with your tenant’s API key
Request Body
The ID of the user creating the chat session
Optional custom title for the chat. If not provided, a title will be auto-generated.
Optional metadata object to store additional information about the chat
Response
Unique identifier for the chat session (UUID format)
The ID of the user who owns this chat
The tenant identifier (automatically determined from API key)
The title of the chat session
Configuration object containing metadata and other chat settings
Timestamp when the chat was created
Timestamp when the chat was last updated
Timestamp of the last message in this chat (null for new chats)
Error Responses
400: Bad Request
400: Bad Request
Invalid request body or missing required fields
401: Unauthorized
401: Unauthorized
500: Internal Server Error
500: Internal Server Error
Server error processing the request
Example Usage
cURL
JavaScript
Python
Notes
- Only
user_idis required in the request body - If
titleis not provided, the system will auto-generate one - The
tenant_idis automatically determined from the API key - If the user doesn’t exist, a user entity will be auto-created
- The chat ID returned should be used for subsequent WebSocket connections
- Metadata can contain any custom key-value pairs for your application needs