JavaScript SDK: swarmhit.inbox.chats.list(params?)
Ordered by most recent activity. With replied=true, ordered by the lead's most recent reply instead. Each thread carries its lead's label in the campaign.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Query Parameters
Page size, 1–100.
1 <= value <= 10050Number of records to skip.
0 <= value0true returns only threads where the lead has sent at least one message (an automatic reply counts), false only those still awaiting a first reply. Omit for all.
Value in
- "true"
- "false"
Only leads with this label in their campaign, or none for those without one.
Value in
- "interested"
- "not_interested"
- "neutral"
- "out_of_office"
- "none"
Only this channel's chats. Omit (or all) for every channel.
Value in
- "all"
- "linkedin"
- "email"
- "whatsapp"
Only the chats of this sender's accounts. 400 when it is not a sender of the workspace.
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/inbox/chats"{ "data": [ { "id": "string", "accountId": "string", "senderId": "string", "channel": "linkedin", "subject": "string", "attendee": {}, "leadId": "string", "lastMessage": {}, "lastMessageAt": "2019-08-24T14:15:22Z", "lastReplyAt": "2019-08-24T14:15:22Z", "label": "interested", "labelBy": "manual", "unreadCount": 0, "favorite": true, "archived": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "paging": { "limit": 0, "offset": 0 }}List messages in a chat GET
**JavaScript SDK:** [`swarmhit.inbox.chats.messages.list(chatId, params?)`](/smart-api/sdk/methods#inbox.chats.messages)
Mark a chat read POST
**JavaScript SDK:** [`swarmhit.inbox.chats.markRead(chatId)`](/smart-api/sdk/methods#inbox.chats) Clears the unread count for the chat (and every sibling thread of the same person), locally and on LinkedIn.