Get LinkedIn Conversation Details - LinkedIn API Messages
Fetch complete LinkedIn conversation history and message details via API. This LinkedIn API messages endpoint retrieves full conversation threads including all direct messages, sender profiles, attachments, and reactions. Essential for sales automation tools, AI agents handling LinkedIn outreach, and CRM systems that need to sync LinkedIn messaging data. Use this endpoint to build automated follow-up sequences, track lead engagement, and manage multi-step B2B outreach campaigns.
/linkedin/messaging/conversation-detailsGet LinkedIn Conversation Details - LinkedIn API Messages
Fetch complete LinkedIn conversation history and message details via API. This LinkedIn API messages endpoint retrieves full conversation threads including all direct messages, sender profiles, attachments, and reactions. Essential for sales automation tools, AI agents handling LinkedIn outreach, and CRM systems that need to sync LinkedIn messaging data. Use this endpoint to build automated follow-up sequences, track lead engagement, and manage multi-step B2B outreach campaigns.
Code Examples
curl -X GET 'https://api.connectsafely.ai/linkedin/messaging/conversation-details?conversationUrn=urn%3Ali%3Amsg_conversation%3A%28urn%3Ali%3Afsd_profile%3AACoAABcn...%2C2-abc123%29' \ -H 'Authorization: Bearer <your_api_key>'Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
accountId | query | No | string | LinkedIn account ID. If not provided, uses the default account (most recently used). |
conversationUrn | query | Yes | string | The conversation URN. Can be in various formats - urn:li:msg_conversation:(...), urn:li:msg_message:(...), urn:li:messagingThread:(...), or just the conversation ID. |
Request Body
No request body.
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 401 | Unauthorized |
| 500 | Error response |
200 Example
{
"success": true,
"accountId": "507f1f77bcf86cd799439011",
"profileUrn": "urn:li:fsd_profile:ACoAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI",
"conversationUrn": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI,2-YTlkMzliMTAtMjA4Zi00ODc4LTgxZDgtZTI4ZDY0Zjg1YTE4XzEwMA==)",
"total": 11,
"syncToken": "xqS2pdVm4vDq0NZmLnVybjpsaTpmYWJyaWM6cHJvZC1sb3IxAA==",
"messages": [
{
"messageId": "urn:li:msg_message:(urn:li:fsd_profile:ACoAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI,2-MTc2MzM3ODA2Mjg4MWI0MTM0My0xMDAmYTlkMzliMTAtMjA4Zi00ODc4LTgxZDgtZTI4ZDY0Zjg1YTE4XzEwMA==)",
"backendMessageUrn": "urn:li:messagingMessage:2-MTc2MzM3ODA2Mjg4MWI0MTM0My0xMDAmYTlkMzliMTAtMjA4Zi00ODc4LTgxZDgtZTI4ZDY0Zjg1YTE4XzEwMA==",
"text": "No problem. I have connected my account .. haven't seen any action yet. But I will let you know how the solution performs ",
"subject": null,
"sentAt": 1763378062881,
"sender": {
"profileId": "ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM",
"name": "Leonard Esere",
"profileUrl": "https://www.linkedin.com/in/ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM",
"profilePicture": "https://media.licdn.com/dms/image/v2/D5603AQEZqV0sUFSb5g/profile-displayphoto-scale_100_100/...",
"participantUrn": "urn:li:msg_messagingParticipant:urn:li:fsd_profile:ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM"
},
"attachments": null,
"reactions": null,
"hasAttachment": false
},
{
"messageId": "urn:li:msg_message:(urn:li:fsd_profile:ACoAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI,2-MTc2Mzc5NDI5NTI1N2IxNzUzMS0xMDAmYTlkMzliMTAtMjA4Zi00ODc4LTgxZDgtZTI4ZDY0Zjg1YTE4XzEwMA==)",
"backendMessageUrn": "urn:li:messagingMessage:2-MTc2Mzc5NDI5NTI1N2IxNzUzMS0xMDAmYTlkMzliMTAtMjA4Zi00ODc4LTgxZDgtZTI4ZDY0Zjg1YTE4XzEwMA==",
"text": "I just tried that post boost, and I'm seeing it post comments too fast...",
"subject": null,
"sentAt": 1763794295257,
"sender": {
"profileId": "ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM",
"name": "Leonard Esere",
"profileUrl": "https://www.linkedin.com/in/ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM",
"profilePicture": "https://media.licdn.com/dms/image/v2/D5603AQEZqV0sUFSb5g/profile-displayphoto-scale_100_100/...",
"participantUrn": "urn:li:msg_messagingParticipant:urn:li:fsd_profile:ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM"
},
"attachments": [
{
"type": "image",
"url": "https://www.linkedin.com/dms/prv/image/v2/D5606AQHX0OcdYQAgkQ/messaging-image-720/..."
}
],
"reactions": null,
"hasAttachment": true
},
{
"messageId": "urn:li:msg_message:(urn:li:fsd_profile:ACoAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI,2-MTc2Mzc5MzIzNjgzM2I4Mzg5Mi0xMDAmYTlkMzliMTAtMjA4Zi00ODc4LTgxZDgtZTI4ZDY0Zjg1YTE4XzEwMA==)",
"backendMessageUrn": "urn:li:messagingMessage:2-MTc2Mzc5MzIzNjgzM2I4Mzg5Mi0xMDAmYTlkMzliMTAtMjA4Zi00ODc4LTgxZDgtZTI4ZDY0Zjg1YTE4XzEwMA==",
"text": "Thanks for highlighting ",
"subject": null,
"sentAt": 1763793236833,
"sender": {
"profileId": "ACoAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI",
"name": "Karan Kumar",
"profileUrl": "https://www.linkedin.com/in/ACoAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI",
"profilePicture": "https://media.licdn.com/dms/image/v2/D5635AQFZJPJdhr2MqA/profile-framedphoto-shrink_100_100/...",
"participantUrn": "urn:li:msg_messagingParticipant:urn:li:fsd_profile:ACoAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI"
},
"attachments": null,
"reactions": [
{
"emoji": "👍",
"count": 1,
"viewerReacted": false
}
],
"hasAttachment": false
}
],
"participants": [
{
"profileId": "ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM",
"name": "Leonard Esere",
"headline": "Founder & CEO @ PolicyCortex | Building the Autonomous Cloud Engineer",
"profileUrl": "https://www.linkedin.com/in/ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM",
"profilePicture": "https://media.licdn.com/dms/image/v2/D5603AQEZqV0sUFSb5g/profile-displayphoto-scale_100_100/...",
"participantUrn": "urn:li:msg_messagingParticipant:urn:li:fsd_profile:ACoAACr-hewBS7g6tYN16g77Gx5Cuvm0hJPUfNM",
"memberBadgeType": "PREMIUM_PROFILE"
}
],
"pagination": {
"firstMessageAt": 1763350991696,
"lastMessageAt": 1763794357096,
"hasMoreBefore": true,
"hasMoreAfter": false
}
}401 Example
{
"error": "Unauthorized"
}Note: When using pagination parameters (deliveredAt, countBefore, countAfter), the response may include nextCursor and prevCursor for navigating to more messages. Use hasNextPage and hasPrevPage to determine if there are more messages available in each direction.
500 Example
{
"success": false,
"error": "Failed to get conversation details"
}Get Recent LinkedIn Messages - LinkedIn Messaging API
Retrieve recent LinkedIn messages and conversations via API for automated outreach tracking. This LinkedIn messaging API endpoint returns your inbox conversations with participant details, unread counts, and latest message previews. Perfect for CRM integration, sales automation workflows, and building multi-step outreach sequences. Supports pagination to efficiently fetch all LinkedIn direct messages for lead nurturing and follow-up automation.
Send Typing Indicator
Send a typing indicator to a LinkedIn conversation to show that you are typing
