LinkedIn inbox
Read the LinkedIn conversations of every account of your workspace in one inbox, reply to them and mark them read, from your own code.
The LinkedIn inbox gathers the conversations of every LinkedIn account of your workspace in one list. Each conversation says which account holds it (authId, accountName) and who is on the other side (attendee). A reply always leaves from the account that holds the conversation.
The flow
- List the conversations waiting for you, with
unread=true. - Read the messages of a conversation.
- Reply, then mark the conversation read.
Reading a list or a conversation never marks it read: only the read route does.
List the unread conversations
GET/linkedin-inbox/chats
curl "https://api.emelia.io/linkedin-inbox/chats?unread=true&limit=20" \
-H "Authorization: $EMELIA_API_KEY"{
"success": true,
"items": [
{
"id": "Hk3pX8vQTqOAb1sZ0mN4yw",
"authId": "6650f1a2b839d80011c5a0bb",
"accountName": "Claire Fontaine",
"attendee": {
"id": "aT9fK2mQRbyLw0Xc4ZpV1g",
"provider_id": "ACoAAB4kq9sBxL0m2vTnR8yZ7pQe1wXcD3fA6hU",
"name": "Julien Moreau",
"picture_url": "https://media.licdn.com/dms/image/v2/D4E03AQF8x9kQ2mT1bw/profile-displayphoto-shrink_100_100/0/1715000000000",
"headline": "Head of Sales at Nexora"
},
"timestamp": "2026-11-25T09:42:10.000Z",
"unread_count": 1,
"read_only": 0,
"content_type": null,
"folder": ["INBOX_LINKEDIN_CLASSIC"]
}
],
"cursor": "eyJvZmZzZXQiOjIwfQ"
}- The most recent conversation comes first. Send
cursorback to get the next page; it isnullon the last page. accountskeeps the conversations of some accounts only: theidof LinkedIn accounts, separated by commas.afterandbeforekeep the conversations whose last message is in a date range.
To find the conversation with one person, search by name:
GET/linkedin-inbox/search
curl "https://api.emelia.io/linkedin-inbox/search?q=moreau" \
-H "Authorization: $EMELIA_API_KEY"Read the messages
GET/linkedin-inbox/chats/{chatId}/messages
curl "https://api.emelia.io/linkedin-inbox/chats/Hk3pX8vQTqOAb1sZ0mN4yw/messages?limit=50" \
-H "Authorization: $EMELIA_API_KEY"{
"success": true,
"items": [
{
"id": "r7Tq2LmXSoW9cVbE5aJk0g",
"chat_id": "Hk3pX8vQTqOAb1sZ0mN4yw",
"text": "Thursday at 10 works for me. Can you send me a calendar invite?",
"timestamp": "2026-11-25T09:42:10.000Z",
"is_sender": 0,
"sender_id": "ACoAAB4kq9sBxL0m2vTnR8yZ7pQe1wXcD3fA6hU",
"message_type": "MESSAGE",
"attachments": [],
"reactions": [],
"deleted": 0,
"is_event": 0,
"hidden": 0
}
],
"cursor": null
}| Field | Meaning |
|---|---|
is_sender | 1: sent by your account. 0: sent by the other person. |
is_event | 1: an event of the conversation, such as a reaction, not a message. |
message_type | MESSAGE, or INMAIL, INMAIL_ACCEPT, INMAIL_DECLINE, INMAIL_REPLY for an InMail, INVITATION for the note of an invitation. |
attachments | Files of the message. Download one with its id. |
The most recent message comes first. Send cursor back to get older messages.
/linkedin-inbox/messages/{messageId}/attachments/{attachmentId}
Reply
POST/linkedin-inbox/chats/{chatId}/messages
curl -X POST "https://api.emelia.io/linkedin-inbox/chats/Hk3pX8vQTqOAb1sZ0mN4yw/messages" \
-H "Authorization: $EMELIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Great, I just sent you an invite for Thursday at 10. Talk soon!"}'The message leaves at once, from the account that holds the conversation, and cannot be taken back. To attach files, send multipart/form-data with text and up to 10 attachments of 20 MB each:
curl -X POST "https://api.emelia.io/linkedin-inbox/chats/Hk3pX8vQTqOAb1sZ0mN4yw/messages" \
-H "Authorization: $EMELIA_API_KEY" \
-F "text=Here is the deck we talked about." \
-F "attachments=@nexora-proposal.pdf"Conversations that accept no reply
LinkedIn accepts no reply to a sponsored message, for example. Such a conversation has read_only: 1, and a reply is refused with 422 CHAT_READ_ONLY: nothing is sent.
Mark the conversation read
PATCH/linkedin-inbox/chats/{chatId}/read
curl -X PATCH "https://api.emelia.io/linkedin-inbox/chats/Hk3pX8vQTqOAb1sZ0mN4yw/read" \
-H "Authorization: $EMELIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"value": true}'"value": false marks it unread again. The state changes on LinkedIn too.
Errors
| Status | code | What to do |
|---|---|---|
400 | LINKEDIN_INBOX_NO_ACCOUNT | No LinkedIn account of the workspace is connected to the inbox, or none of the accounts you sent. Connect one: see LinkedIn accounts. |
400 | INBOX_MESSAGE_EMPTY | The reply has no text and no file. |
404 | CONVERSATION_NOT_FOUND | Unknown conversation, or one of an account outside your workspace. |
409 | ACCOUNT_DISCONNECTED | The LinkedIn account must be reconnected: create a connection link with its authId. |
422 | CHAT_READ_ONLY | LinkedIn accepts no reply in this conversation. |
429 | RATE_LIMITED | LinkedIn is limiting the requests of the account. Wait a few minutes. |
Good to know
- The objects keep the field names of LinkedIn messaging (
snake_case), plusauthId,accountNameandattendeeadded by Emelia. They can carry more fields than this reference describes: do not rely on those, they can change without notice. picture_urlis a temporary LinkedIn link: store the picture if you need it later.- The search matches the names of the people of your conversations, refreshed every 10 minutes. It only covers one to one conversations.
- Starting a new conversation is not available through the API: send a first message with a campaign.