Chat
The chat feature is organized by chat threads and messages in the chat threads.
Endpoints
Get Chat Threads
GET
https://cubicl.io/api/v1/chat/threads
Get Messages
GET
https://cubicl.io/api/v1/chat/threads/:threadId/messages
Gets messages in a chat thread.
Path Parameters
threadId*
string
Chat thread id
after
string
Message id. Messages sent after this message will be returned.
before
string
Message id. Latest messages sent before this message will be returned.
search
string
A text to be searched in message content.
limit
number
Send Message
POST
https://cubicl.io/api/v1/chat/messages
Messages are sent to threads or users. When there is not a thread between two users yet, you need to set to
parameter with the receiver user's id. After the first message, a thread will be created. You should set thread
parameter for existing threads.
Either thread
or to
parameter must be set.
Either content
or files
parameter must be set.
Request Body
thread
string
Thread id
to
string
User id
content
string
Message content
files
string[]
File id list
replyTo
string
Message id. If message is a reply to another message
Data
Chat Threads
Chat messages are sent in a thread. Threads have 3 types:
personal: Between 2 users. Created when a user sends a message to another user.
group: Created for each project. All project members are members of these threads.
custom: Created among a group of users by users themselves. This is a private chat group.
Chat Messages
Last updated