Chats API

API is ideal for building collaborative or real-time messaging platforms with rich interaction capabilities.

circle-exclamation

The Chats API offers a comprehensive set of endpoints designed to manage conversations and user interactions within a chat environment.

It supports key features:

  1. Chat Management: Create, retrieve, and manage chat messages.

  2. Reaction Management: Add, view, and track emoji or custom reactions on messages.

  3. Pinning Management: Pin important messages.

For real time events, look at Real Time Events

circle-info

Notable limitations in beta phase:

  • Chat message length is capped to 280 characters.

  • Reactions are limited to [:thumbs_up:,:thumbs_down:]

  • Paged chat result can return a maximum of 20 messages in a single page.

  • Destructive actions can only performed by the owner of the resource or privileged users in a session, as of now, it is only the Host of the session.

  • Pinning a message can only be done by privileged users in a session, as of now, it is only the Host of the session.

Chat Management


Retrieve paginated list of chat messages

get

Fetches a list of chat messages in a paginated format. Supports sorting by creation time, pinned status, or specific reaction types.

Authorizations
AuthorizationstringRequired

Bearer schema token issued by session credentials

Query parameters
Skipinteger · int32Optional

The number of items to skip before starting to return results. Useful for paginating through results.

Default: 0Example: 10
Takeinteger · int32 · min: 1 · max: 20Optional

The number of items to return. Used for paginating results. Limits the size of the result set.

Default: 20Example: 20
SortBystring · enumOptional

The field by which to sort the results. Supported values include 'CreatedAt', 'Pinned', and reaction types like ':thumbsup:' or ':thumbsdown:'.

Default: CreatedAtExample: PinnedPossible values:
AscendingbooleanOptional

Determines whether the sorting should be in ascending order. Set to 'false' for descending order.

Default: trueExample: false
Responses
chevron-right
200

Success

get
/chats
200

Success

Send a new chat message

post

Creates and stores a new chat message within a session. This is typically used when a user sends a message in a conversation.

Authorizations
AuthorizationstringRequired

Bearer schema token issued by session credentials

Body
messagestring · nullableOptional
Responses
chevron-right
200

Success

post
/chats
200

Success

Delete a specific chat message

delete

Deletes a chat message by its unique identifier.

Authorizations
AuthorizationstringRequired

Bearer schema token issued by session credentials

Path parameters
chatIdstringRequired
Responses
chevron-right
200

Success

No content

delete
/chats/{chatId}

No content

Add a reaction to a chat message

post

Adds a reaction (e.g., emoji in shortcodes format) to a specific chat message identified by its chatId.

Authorizations
AuthorizationstringRequired

Bearer schema token issued by session credentials

Path parameters
chatIdstringRequired
Body
reactionstring · nullableOptional
Responses
chevron-right
200

Success

post
/chats/{chatId}/reactions

Reactions Management


Fetch reactions for multiple messages

get

Retrieves a list of reactions associated with multiple chat messages using their chat IDs.

Authorizations
AuthorizationstringRequired

Bearer schema token issued by session credentials

Query parameters
chatIdstring[]Optional
Responses
chevron-right
200

Success

get
/chats/reactions
200

Success

Remove a reaction from a chat message

delete

Removes a specific reaction from a chat message. Requires both the chatId and reactionId.

Authorizations
AuthorizationstringRequired

Bearer schema token issued by session credentials

Path parameters
chatIdstringRequired
reactionIdstringRequired
Responses
chevron-right
200

Success

No content

delete
/chats/{chatId}/reactions/{reactionId}
200

Success

No content

Pinning Management


Pin a chat message

post

Pins a specific message in a chat.

Authorizations
AuthorizationstringRequired

Bearer schema token issued by session credentials

Path parameters
chatIdstringRequired
Responses
chevron-right
200

Success

No content

post
/chats/{chatId}/pins

No content

Unpin a chat message

delete

Removes a previously pinned message in a chat, using the chatId and pinId.

Authorizations
AuthorizationstringRequired

Bearer schema token issued by session credentials

Path parameters
chatIdstringRequired
pinIdstringRequired
Responses
chevron-right
200

Success

No content

delete
/chats/{chatId}/pins/{pinId}
200

Success

No content

Last updated