Chats
List of valid attributes:
Attribute | Description | Specifics |
---|---|---|
context_id | ID of the chat’s context | Cannot be set |
context_type | Type of the chat’s context | Cannot be set, Allowed values are 'contract' , 'offboarding' , 'onboarding' , 'support_ticket' , 'team' , or null |
discarded_at | Null or timestamp of removal | Cannot be set |
latest_message_id | ID of latest message of a chat | Cannot be set, Can be empty |
open | Whether chat is open or closed | Can only be set on update, can be true or false |
subject | Subject of a chat | Must be set |
The following relationships can be included in requests:
Relationship | Type |
---|---|
bookmark | has_one |
latest_message | belongs_to |
Meta data: Permissions
Group | Description |
---|---|
chat_membership | Contains permissions if you can manage members of a chat |
message | Contains 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
Parameter | Description |
---|---|
chat_id | The 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
Parameter | Desription |
---|---|
chat_id | The 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": { ... } }, { ... } ]}