JavaScript SDK: swarmhit.inbox.chats.setFavorite(chatId, params)
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/inbox/chats/string/favorite" \ -H "Content-Type: application/json" \ -d '{ "favorite": true }'{ "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" }}Send a message in a chat POST
**JavaScript SDK:** [`swarmhit.inbox.chats.messages.send(chatId, params)`](/smart-api/sdk/methods#inbox.chats.messages) Sends as the chat's sender account, or from the mailbox on an email chat (a reply in the same thread, to the address that last wrote). Email chats take `text` only for now: `attachments` or a `voiceMessage` on one is a `400`.
Pull a chat's latest messages from LinkedIn POST
**JavaScript SDK:** [`swarmhit.inbox.chats.sync(chatId, params?)`](/smart-api/sdk/methods#inbox.chats) New messages normally arrive on their own; this pulls the latest page of the thread now. `limit` 1–250, default 50. `notFound` when LinkedIn no longer has the thread; email chats answer `skipped: email` and WhatsApp chats `skipped: whatsapp`.