curl --request POST \
--url https://api.example.com/v2/messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"account_id": "<string>",
"action": "<string>",
"params": {
"conversation_id": "<string>",
"profile_url": "<string>",
"count": 123,
"cursor": "<string>"
}
}
'{
"success": true,
"data": {
"total_message_count": 55,
"unread_count": 0,
"last_seen_message": true,
"last_seen_at": 1777147641366,
"messages": [
{
"text": "Sounds good, talk soon!",
"timestamp": 1777147641366,
"sender": "Jane Doe",
"sender_info": {
"first_name": "Jane",
"last_name": "Doe",
"profile_url": "https://www.linkedin.com/in/jane-doe-42/"
},
"message_type": "TEXT",
"entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAA...,2-MTc3NzE0...)"
},
{
"text": "Hey, are you available for a call tomorrow?",
"timestamp": 1777146492678,
"sender": "John Smith",
"sender_info": {
"first_name": "John",
"last_name": "Smith",
"profile_url": "https://www.linkedin.com/in/john-smith-99/"
},
"message_type": "TEXT",
"entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAA...,2-MTc3NzE0...)"
}
],
"next_cursor": "1777146285823"
},
"metadata": {
"action": "get_conversation",
"account_id": "your-account-id",
"credits_consumed": 1,
"timestamp": "2026-04-26T10:35:00Z"
}
}
Retrieve messages from a specific conversation.
curl --request POST \
--url https://api.example.com/v2/messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"account_id": "<string>",
"action": "<string>",
"params": {
"conversation_id": "<string>",
"profile_url": "<string>",
"count": 123,
"cursor": "<string>"
}
}
'{
"success": true,
"data": {
"total_message_count": 55,
"unread_count": 0,
"last_seen_message": true,
"last_seen_at": 1777147641366,
"messages": [
{
"text": "Sounds good, talk soon!",
"timestamp": 1777147641366,
"sender": "Jane Doe",
"sender_info": {
"first_name": "Jane",
"last_name": "Doe",
"profile_url": "https://www.linkedin.com/in/jane-doe-42/"
},
"message_type": "TEXT",
"entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAA...,2-MTc3NzE0...)"
},
{
"text": "Hey, are you available for a call tomorrow?",
"timestamp": 1777146492678,
"sender": "John Smith",
"sender_info": {
"first_name": "John",
"last_name": "Smith",
"profile_url": "https://www.linkedin.com/in/john-smith-99/"
},
"message_type": "TEXT",
"entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAA...,2-MTc3NzE0...)"
}
],
"next_cursor": "1777146285823"
},
"metadata": {
"action": "get_conversation",
"account_id": "your-account-id",
"credits_consumed": 1,
"timestamp": "2026-04-26T10:35:00Z"
}
}
conversation_id or by passing a profile_url (the conversation with that user is resolved automatically). Pagination is cursor-based — pass the next_cursor returned by a previous call to fetch older messages.
"get_conversation".Show params properties
profile_url is not provided.linkedin_url as an alias. When provided, the conversation with this user is resolved automatically. Required if conversation_id is not provided.10.data.next_cursor. Omit for the first page (most recent messages).Show data properties
true when the most recent message in this batch has been read by the recipient.Show message properties
"TEXT", "INVITATION", "SHARED_POST".cursor in the next request to fetch older messages. Omitted when there are no more messages.{
"success": true,
"data": {
"total_message_count": 55,
"unread_count": 0,
"last_seen_message": true,
"last_seen_at": 1777147641366,
"messages": [
{
"text": "Sounds good, talk soon!",
"timestamp": 1777147641366,
"sender": "Jane Doe",
"sender_info": {
"first_name": "Jane",
"last_name": "Doe",
"profile_url": "https://www.linkedin.com/in/jane-doe-42/"
},
"message_type": "TEXT",
"entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAA...,2-MTc3NzE0...)"
},
{
"text": "Hey, are you available for a call tomorrow?",
"timestamp": 1777146492678,
"sender": "John Smith",
"sender_info": {
"first_name": "John",
"last_name": "Smith",
"profile_url": "https://www.linkedin.com/in/john-smith-99/"
},
"message_type": "TEXT",
"entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAA...,2-MTc3NzE0...)"
}
],
"next_cursor": "1777146285823"
},
"metadata": {
"action": "get_conversation",
"account_id": "your-account-id",
"credits_consumed": 1,
"timestamp": "2026-04-26T10:35:00Z"
}
}
Was this page helpful?