Skip to main content
GET
/
workers
/
{id}
/
chats
Get Chats
curl --request GET \
  --url https://api.roostedhr.com/api/1_12/workers/{id}/chats \
  --header 'X-API-KEY: <api-key>'
{
  "chats": [
    {
      "id": "<string>",
      "auto_add_workers": 0,
      "event_id": "<string>",
      "chat_admin": 0,
      "silenced": 0,
      "on_chat": 0,
      "date_created": "<string>",
      "name": "<string>",
      "most_recent_message_id": "<string>",
      "locked": 0,
      "last_message_timestamp": "<string>",
      "message": "<string>",
      "name_first": "<string>",
      "selected_picture_location": "<string>",
      "chats_order": "<string>",
      "unread_count": 1
    }
  ],
  "has_more": true
}
This endpoint uses cursor-based pagination for infinite scroll. Pass last_seen_id with the ID of the last chat from the previous page to fetch the next set of results. Omit it for the first page.
Use search_term to filter chats by title, or set all_chats to true to include inactive chats.

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string
required

Worker ID

Query Parameters

all_chats
boolean

Fetches all chats if true

search_term
string

Title search query for chats

last_seen_id
string

ID of the last chat from the previous page. Omit for the first page.

limit
integer
default:20

Maximum number of chats to return per page.

Response

OK

chats
object[]
has_more
boolean

Whether there are more chats available beyond this page.