Send message
Requires authentication via
roomId query parameter and x-auth-token cookie.Query parameters
The unique identifier of the room where the message will be sent
Body parameters
The name of the message sender. Maximum length: 100 characters.
The message content. Maximum length: 1000 characters.
Response
Returns an empty response with status200 on success.
Validation rules
sendermust be a string with maximum 100 characterstextmust be a string with maximum 1000 characters- The room must exist (returns error if room does not exist)
Error responses
Message structure
When a message is successfully sent, it’s stored with the following structure:Unique message identifier (generated using nanoid)
The sender name from the request
The message content from the request
Unix timestamp in milliseconds when the message was created
The room identifier
The sender’s auth token (only visible to the sender)
Get messages
Requires authentication via
roomId query parameter and x-auth-token cookie.Query parameters
The unique identifier of the room to retrieve messages from
Response
An array of message objects in chronological order
Privacy note
The
token field is only included in messages that were sent by the requesting user. This allows the client to identify which messages belong to the current user without exposing other users’ tokens.