Chat Bookmarks
List of valid attributes:
| Attribute | Description | Specifics |
|---|---|---|
| chat_id | ID of the chat for a bookmark | Cannot be set |
| user_id | ID of the author of a bookmark | Cannot be set |
| updated_at | Timestamp of a bookmark | Will be set automatically by using update endpoint |
Create
Section titled “Create”Creates a bookmark for a chat. No request body attributes are required.
HTTP Request
Section titled “HTTP Request”POST /api/v1/chats/:chat_id/bookmark
Request body
Section titled “Request body”{ "data": { "type": "chat_bookmark", "attributes": {} }}Example response:
{ "data": { "id": "8d0d9b6b-ae0a-4551-98ae-1d3eaca8d152", "type": "chat_bookmark", "attributes": { "chat_id": "033b586e-5f17-49a8-a420-c4336ba6fc38", "user_id": "412cc746-4ace-484a-95f3-f49951ab182f", "updated_at": "2021-01-01T00:00:00Z" } }}Update
Section titled “Update”Updates an existing chat bookmark. Only the updated_at field can be updated.
HTTP Request
Section titled “HTTP Request”PUT /api/v1/chats/:chat_id/bookmark
Request body
Section titled “Request body”{ "data": { "type": "chat_bookmark", "attributes": { "updated_at": "2021-01-01T00:00:00Z" } }}Example response:
{ "data": { "id": "8d0d9b6b-ae0a-4551-98ae-1d3eaca8d152", "type": "chat_bookmark", "attributes": { "chat_id": "033b586e-5f17-49a8-a420-c4336ba6fc38", "user_id": "412cc746-4ace-484a-95f3-f49951ab182f", "updated_at": "2021-01-01T00:00:00Z" } }}