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
string
required
Authentication header with your tenant’s API key
Request Body
string
required
The ID of the user creating the chat session
string
Optional custom title for the chat. If not provided, a title will be auto-generated.
object
Optional metadata object to store additional information about the chat
Response
string
Unique identifier for the chat session (UUID format)
string
The ID of the user who owns this chat
string
The tenant identifier (automatically determined from API key)
string
The title of the chat session
object
Configuration object containing metadata and other chat settings
string
Timestamp when the chat was created
string
Timestamp when the chat was last updated
string | null
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
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