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-detailsAuthentication requiredMessaging
Code Examples
curl -X GET 'https://api.connectsafely.ai/linkedin/messaging/conversation-details' \ -H 'Authorization: Bearer <your_api_key>'Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
accountId | query | No | string | LinkedIn account ID to use. If not provided, uses the default account. |
profileId | query | No | string | Profile ID of conversation participant (optional) |
conversationUrn | query | Yes | string | LinkedIn conversation URN from recent-messages response |
deliveredAt | query | No | number | Timestamp (milliseconds) for pagination anchor point |
countBefore | query | No | number | Number of messages before deliveredAt timestamp |
countAfter | query | No | number | Number of messages after deliveredAt timestamp |
Request Body
No request body.
Responses
| Status | Description |
|---|---|
| 200 | Conversation details retrieved successfully |
| 400 | Bad request - Missing required parameter |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
accountId | string | |
profileUrn | string | |
conversationUrn | string | |
messages | array | |
total | number |
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
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | object |
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
}Get recent messages
Retrieve recent LinkedIn messages/conversations for the authenticated account. Supports filtering by keywords and read status. Returns simplified conversation list with latest message preview. Rate limit: 150 messages per day per account.
Send typing indicator
Send a typing indicator to a LinkedIn conversation. Shows the recipient that you are typing a message. Useful for creating a more natural conversation experience before sending a message.
