Read messages in a conversation
Read messages in one thread, most-recent first.
URL-encode the path parameter
conversationUrn contains parens and colons — both are reserved characters in URL paths. Always wrap in encodeURIComponent() before constructing the URL:
const encoded = encodeURIComponent(conv.conversationUrn);
const r = await fetch(`/v1/linkedin/conversations/${encoded}/messages?sessionId=${sessionId}`);
Response shape
Unlike GET /linkedin/conversations, this endpoint does return senderName and senderSlug for most messages — LinkedIn embeds the sender's display data in the message payload. They're still nullable for system-generated messages (e.g. "X joined the conversation"), so guard before rendering.
Field map (exact names, camelCase):
- messageUrn — urn:li:msg_message:(…). Stable identifier for reaction / attachment lookups.
- text — Plain text body. Empty string for attachment- only messages (check attachmentCount > 0).
- senderUrn — Profile URN. Null only on system messages.
- senderName — Display name; usually "First Last". Nullable.
- senderSlug — linkedin.com/in/<slug> segment. Nullable. Useful when you want to build a profile URL without a separate lookup.
- isFromViewer — true when sent by the authenticated session holder. Use this for left/right bubble layout.
- deliveredAt — Unix ms (not seconds). Nullable.
Worked example response
{
"ok": true,
"conversationUrn": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAA…,2-MWE…)",
"messages": [
{
"messageUrn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAAA…,2-MWE…)",
"conversationUrn": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAA…,2-MWE…)",
"text": "Sure, happy to chat — Tuesday at 2pm work?",
"deliveredAt": 1715990400000,
"senderUrn": "urn:li:fsd_profile:ACoAAA…aaaa",
"senderName": "Jane Doe",
"senderSlug": "jane-doe-1a2b3c",
"attachmentCount": 0,
"reactionCount": 0,
"isFromViewer": false
},
{
"messageUrn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAAA…,2-XYZ…)",
"conversationUrn": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAA…,2-MWE…)",
"text": "Hey Jane — quick one about your team's cold outbound setup. Got 5 minutes this week?",
"deliveredAt": 1715986800000,
"senderUrn": "urn:li:fsd_profile:ACoAAA…me",
"senderName": "Me",
"senderSlug": "me-1a2b3c",
"attachmentCount": 0,
"reactionCount": 0,
"isFromViewer": true
}
]
}
Request
- Base URL: https://anjal.app
- URL: https://anjal.app/linkedin/conversations/{conversationUrn}/messages
- Auth: API key in header X-API-Key
Path parameters
URL-encoded urn:li:msg_conversation:(…) — pass through encodeURIComponent() before substituting. Source: the conversationUrn field on each conversation returned by GET /linkedin/conversations.
Query parameters
Response
Thread messages, newest first.
Changes
No recorded changes to this operation across all 1 revision of this API.