Overview
The Chat REST API enables you to:- Send messages to chat rooms
- Query message history
- Manage room metadata
- Retrieve room occupancy
- Perform moderation actions
Base URL
All Chat REST API requests use:Authentication
The Chat REST API uses the same authentication as the standard REST API:Basic Authentication
Token Authentication
Rooms
Rooms are the primary organizational unit in Chat.Get Room
Retrieve room metadata:Unique identifier for the room.
Room display name.
Custom room metadata.
List Rooms
List all active rooms:Messages
Send and retrieve chat messages.Send Message
Send a message to a room:The message text content.
Custom message metadata.
Message headers for filtering and routing.
Get Message History
Retrieve message history for a room:Start time in milliseconds since epoch.
End time in milliseconds since epoch.
Maximum number of messages to return (max 1000).
Query direction:
forwards or backwards.Occupancy
Query room occupancy information.Get Occupancy
Retrieve current room occupancy:Number of active connections to the room.
Number of members present in the room.
Typing Indicators
Manage typing indicators (typically used by server-side bots).Send Typing Indicator
Reactions
Send reactions to messages.Send Reaction
Add a reaction to a message:Get Reactions
Retrieve reactions for a message:Moderation
Perform moderation actions on messages.Delete Message
Delete a message from a room:Update Message
Update a message in a room:Error Handling
The Chat REST API uses standard HTTP status codes: Common errors:400- Invalid request parameters401- Authentication failed403- Insufficient permissions404- Room or message not found429- Rate limit exceeded
Rate Limits
The Chat REST API shares rate limits with the standard REST API:- Message sending: Up to 2,000 messages per second
- History queries: Up to 50 requests per second
