Facebook Pixel
APILinkedIn Messaging

Get conversation details

Retrieve detailed message history for a specific LinkedIn conversation. Supports pagination via deliveredAt timestamp to load older/newer messages. Returns full message content, sender info, and timestamps.

GET/messaging/conversation-details
Authentication requiredMessaging

Code Examples

curl -X GET 'https://api.connectsafely.ai/linkedin/messaging/conversation-details' \
-H 'Authorization: Bearer <your_api_key>'

Parameters

NameInRequiredTypeDescription
accountIdqueryNostringLinkedIn account ID to use. If not provided, uses the default account.
profileIdqueryNostringProfile ID of conversation participant (optional)
conversationUrnqueryYesstringLinkedIn conversation URN from recent-messages response
deliveredAtqueryNonumberTimestamp (milliseconds) for pagination anchor point
countBeforequeryNonumberNumber of messages before deliveredAt timestamp
countAfterqueryNonumberNumber of messages after deliveredAt timestamp

Request Body

No request body.

Responses

StatusDescription
200Conversation details retrieved successfully
400Bad request - Missing required parameter
401Unauthorized - Invalid or missing API key
500Server error

200 Response Parameters

NameTypeDescription
successboolean
accountIdstring
profileUrnstring
conversationUrnstring
messagesarray
totalnumber

200 Example

{
  "success": true,
  "accountId": "696ce9e780e0483585e4e553",
  "profileUrn": "urn:li:fsd_profile:ACoAAATPlQ0Bc8wdg-Iy8wZgEDuSdIVWJiE1Aio",
  "conversationUrn": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAATPlQ0Bc8wdg-Iy8wZgEDuSdIVWJiE1Aio,2-NzkzMDFlNzAtZjU2OS00MjIwLWE2ZDctYzZkMWE1ZDljZDAyXzEwMA==)",
  "messages": [
    {
      "messageId": "urn:li:msg_message:(urn:li:fsd_profile:ACoAAATPlQ0Bc8wdg-Iy8wZgEDuSdIVWJiE1Aio,2-MTc2MDc3MzMxMDQyOWI2OTc1NC0xMDA=)",
      "backendMessageUrn": "urn:li:messagingMessage:2-MTc2MDc3MzMxMDQyOWI2OTc1NC0xMDA=",
      "text": "Hello",
      "subject": null,
      "sentAt": 1760773310429,
      "sender": {
        "profileId": "ACoAAFpqSoMB8vTqRbg4mN_wbabO8w0gjgFu-6o",
        "name": "Jane Smith",
        "profileUrl": "https://www.linkedin.com/in/ACoAAFpqSoMB8vTqRbg4mN_wbabO8w0gjgFu-6o",
        "profilePicture": "https://media.licdn.com/dms/image/...",
        "participantUrn": "urn:li:msg_messagingParticipant:urn:li:fsd_profile:ACoAAFpqSoMB8vTqRbg4mN_wbabO8w0gjgFu-6o"
      },
      "attachments": null,
      "reactions": null,
      "hasAttachment": false
    }
  ]
}

400 Response Parameters

NameTypeDescription
successboolean
errorobject

400 Example

{
  "success": false,
  "error": "conversationUrn is required"
}

401 Example

{
  "error": "Unauthorized - Invalid credentials"
}

500 Example

{
  "error": "Failed to get LinkedIn authentication credentials",
  "success": false
}