Skip to main content
POST
/
v2
/
messages
Get 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"
  }
}

Overview

Returns messages from a specific conversation, ordered from most recent to oldest. Identify the conversation by 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.
This endpoint consumes 1 credit per 10 messages returned.

Request

x-api-key
string
required
Your API key for authentication.
account_id
string
required
The unique identifier of the account to use.
action
string
required
Must be "get_conversation".
params
object
required

Response

success
boolean
Indicates whether the request was successful.
data
object
metadata
object
{
  "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"
  }
}