APILinkedIn Messaging
Get conversation messages
Retrieve messages for a specific conversation. Auto-detects Sales Navigator thread URNs (urn:li:salesNav_thread:*) and routes to the Sales Nav API. Standard conversations use DB-first with LinkedIn API fallback for older messages via cursor pagination. Replaces GET /messaging/conversation-details.
GET
/conversations/{conversationUrn}/messagesAuthentication requiredConversations
Code Examples
curl -X GET 'https://api.connectsafely.ai/linkedin/conversations/<conversationUrn>/messages' \ -H 'Authorization: Bearer <your_api_key>'Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
conversationUrn | path | Yes | string | Conversation URN (URL-encoded) |
accountId | query | No | string | LinkedIn account ID |
count | query | No | number | Number of messages |
cursor | query | No | string | Timestamp cursor for older messages |
since | query | No | number | Timestamp to fetch messages newer than (polling) |
sync | query | No | boolean | Wait for LinkedIn response (sync mode) |
Request Body
No request body.
Responses
| Status | Description |
|---|---|
| 200 | Messages list |
| 401 | Unauthorized |
| 404 | Conversation not found |
| 500 | Server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
messages | array | |
participants | array | |
hasMore | boolean | |
cursor | string | |
note | string |
200 Example
{
"success": true,
"messages": [
{
"messageUrn": "Hello! I would like to connect with you.",
"text": "example_value",
"sentAt": 0,
"senderProfileId": "john-doe-123",
"senderName": "example_value",
"senderPhoto": "example_value",
"isSentByOwner": false,
"hasAttachment": false,
"attachments": []
}
],
"participants": [
{
"profileId": "john-doe-123",
"name": "example_value",
"headline": "example_value",
"profilePicture": "example_value"
}
],
"hasMore": true,
"cursor": "example_value",
"note": "example_value"
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "example_value"
}404 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
404 Example
{
"error": "example_value"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "example_value"
}List conversations
List recent LinkedIn conversations using DB-first approach with LinkedIn API fallback. Supports multi-account batch queries, label/unread filtering. Auto-detects Sales Navigator accounts and merges Sales Nav threads with standard conversations.
Send message (auto-detects Sales Navigator)
Send a LinkedIn message. Auto-detects Sales Navigator accounts and routes through Sales Nav API. Supports file attachments.
