Skip to content

Chats

List of valid attributes:

AttributeDescriptionSpecifics
context_idID of the chat’s contextCannot be set
context_typeType of the chat’s contextCannot be set, Allowed values are 'contract', 'offboarding', 'onboarding', 'support_ticket', 'team', or null
discarded_atNull or timestamp of removalCannot be set
latest_message_idID of latest message of a chatCannot be set, Can be empty
openWhether chat is open or closedCan only be set on update, can be true or false
subjectSubject of a chatMust be set

The following relationships can be included in requests:

RelationshipType
bookmarkhas_one
latest_messagebelongs_to

Meta data: Permissions

GroupDescription
chat_membershipContains permissions if you can manage members of a chat
messageContains permissions if you can read or create messages in a chat

Create

Example request:

{
"data": {
"type": "chat",
"attributes": {
...
}
}
}

Example response:

{
"data": {
"id": "556ed4f1-d99d-43da-ac2c-0317bd6b9b59",
"type": "chat",
"attributes": {
...
}
}
}

This endpoint creates a contextless chat.

HTTP Request

POST api/v1/chats

Update

Example response:

{
"data": {
"id": "6d500de8-afc5-4816-ad8d-1b191b97bfd3",
"type": "chat",
"attributes": {
...
}
}
}

This endpoint updates a chat.

HTTP Request

PUT api/v1/chats/:chat_id

URL Parameters

ParameterDescription
 chat_idThe ID of the chat to update

Show

This endpoint returns a chat.

Example response:

{
"data": {
"id": "6d500de8-afc5-4816-ad8d-1b191b97bfd3",
"type": "chat",
"attributes": {
...
}
}
}

HTTP Request

GET api/v1/chats/:chat_id

URL Parameters

ParameterDesription
 chat_idThe ID of the chat to get

List

This endpoint returns all chats where current user is member of.

HTTP Request

GET /api/v1/chats

Response

{
"data": [
{
"id": "ff96a49e-c57c-4a89-a910-ddbd2f85c8fe",
"type": "chat",
"attributes": {
...
}
},
{
...
}
]
}