Skip to main content
POST
https://api.linkupapi.com
/
v1
/
messages
/
conversation
Get Conversation Messages
curl --request POST \
  --url https://api.linkupapi.com/v1/messages/conversation \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "linkedin_url": "<string>",
  "conversation_id": "<string>",
  "total_results": 123,
  "cursor": "<string>",
  "country": "<string>",
  "login_token": "<string>"
}
'
{
  "status": "success",
  "data": {
    "conversation_id": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAADxnv0oB_dN-NfpvEBlsVPU_W1omM-Xu24o,2-OTFjNWU3YWMtN2IwNi00ZWUwLWE1YzYtNTg4OGNkMGU2ZGRhXzAxMw==)",
    "profile_url": "https://www.linkedin.com/in/al%C3%A9s-pr%C3%A9w-aa0262324/",
    "total_results": 5,
    "total_other_member_message_count": 32,
    "unread_count": 0,
    "last_seen_message": true,
    "last_seen_at": 1749403535456,
    "messages": [
      {
        "text": "😃",
        "timestamp": 1745270025236,
        "sender": "Titouan Prioux",
        "sender_info": {
          "first_name": "Titouan",
          "last_name": "Prioux"
        },
        "message_type": "TEXT",
        "entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAADxnv0oB_dN-NfpvEBlsVPU_W1omM-Xu24o,2-MTc0NTI3MDAyNTA5MWIzODI1OS0xMDAmOTFjNWU3YWMtN2IwNi00ZWUwLWE1YzYtNTg4OGNkMGU2ZGRhXzAxMw==)"
      },
      {
        "text": "hello",
        "timestamp": 1745267779513,
        "sender": "Alés Préw",
        "sender_info": {
          "first_name": "Alés",
          "last_name": "Préw"
        },
        "message_type": "TEXT",
        "entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAADxnv0oB_dN-NfpvEBlsVPU_W1omM-Xu24o,2-MTc0NTI2Nzc3OTM2MmI3NTkxNS0xMDAmOTFjNWU3YWMtN2IwNi00ZWUwLWE1YzYtNTg4OGNkMGU2ZGRhXzAxMw==)"
      },
      {
        "text": "",
        "timestamp": 1745266498889,
        "sender": "Alés Préw",
        "sender_info": {
          "first_name": "Alés",
          "last_name": "Préw"
        },
        "message_type": "SYSTEM",
        "entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAADxnv0oB_dN-NfpvEBlsVPU_W1omM-Xu24o,2-MTc0NTI2NjQ5ODY1OWI3NDYxOC0xMDAmOTFjNWU3YWMtN2IwNi00ZWUwLWE1YzYtNTg4OGNkMGU2ZGRhXzAxMw==)"
      }
    ],
    "pagination": {
      "count": 5,
      "has_next_page": true,
      "next_cursor": "1745266498889"
    }
  }
}
Get detailed messages from a LinkedIn conversation using either a LinkedIn profile URL or a direct conversation ID, including message content, timestamps, and sender information.
Credit Usage: 1 credit per 10 results (or fraction thereof). For example:
  • 1-10 results = 1 credit
  • 11-20 results = 2 credits
  • 300 results = 30 credits

Header Parameters

x-api-key
string
required
Your API key

Body Parameters

linkedin_url
string
URL of the LinkedIn profile to get conversation messages with. Required if conversation_id is not provided.
conversation_id
string
Direct conversation ID to retrieve messages from. Required if linkedin_url is not provided.
total_results
integer
default:"10"
Number of messages per page
cursor
string
Timestamp of the last message for pagination. Omit for the first request to get the most recent messages.
country
string
default:"FR"
Country code for proxy selection. Available: (US, UK, FR, DE, NL, IT, IL, CA, BR, ES, IN)
login_token
string
required
LinkedIn authentication cookie obtained from the login/verify process

Response

status
string
Request status (success/error)
data
object
{
  "status": "success",
  "data": {
    "conversation_id": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAADxnv0oB_dN-NfpvEBlsVPU_W1omM-Xu24o,2-OTFjNWU3YWMtN2IwNi00ZWUwLWE1YzYtNTg4OGNkMGU2ZGRhXzAxMw==)",
    "profile_url": "https://www.linkedin.com/in/al%C3%A9s-pr%C3%A9w-aa0262324/",
    "total_results": 5,
    "total_other_member_message_count": 32,
    "unread_count": 0,
    "last_seen_message": true,
    "last_seen_at": 1749403535456,
    "messages": [
      {
        "text": "😃",
        "timestamp": 1745270025236,
        "sender": "Titouan Prioux",
        "sender_info": {
          "first_name": "Titouan",
          "last_name": "Prioux"
        },
        "message_type": "TEXT",
        "entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAADxnv0oB_dN-NfpvEBlsVPU_W1omM-Xu24o,2-MTc0NTI3MDAyNTA5MWIzODI1OS0xMDAmOTFjNWU3YWMtN2IwNi00ZWUwLWE1YzYtNTg4OGNkMGU2ZGRhXzAxMw==)"
      },
      {
        "text": "hello",
        "timestamp": 1745267779513,
        "sender": "Alés Préw",
        "sender_info": {
          "first_name": "Alés",
          "last_name": "Préw"
        },
        "message_type": "TEXT",
        "entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAADxnv0oB_dN-NfpvEBlsVPU_W1omM-Xu24o,2-MTc0NTI2Nzc3OTM2MmI3NTkxNS0xMDAmOTFjNWU3YWMtN2IwNi00ZWUwLWE1YzYtNTg4OGNkMGU2ZGRhXzAxMw==)"
      },
      {
        "text": "",
        "timestamp": 1745266498889,
        "sender": "Alés Préw",
        "sender_info": {
          "first_name": "Alés",
          "last_name": "Préw"
        },
        "message_type": "SYSTEM",
        "entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAADxnv0oB_dN-NfpvEBlsVPU_W1omM-Xu24o,2-MTc0NTI2NjQ5ODY1OWI3NDYxOC0xMDAmOTFjNWU3YWMtN2IwNi00ZWUwLWE1YzYtNTg4OGNkMGU2ZGRhXzAxMw==)"
      }
    ],
    "pagination": {
      "count": 5,
      "has_next_page": true,
      "next_cursor": "1745266498889"
    }
  }
}

Notes

  • Two Access Methods: You can retrieve conversation messages using either:
    • LinkedIn Profile URL: The API will first find the conversation ID associated with that profile
    • Direct Conversation ID: Skip the profile lookup and access the conversation directly
  • Parameter Requirements: Either linkedin_url OR conversation_id must be provided (not both required)
  • Messages are returned in chronological order (most recent first)
  • The timestamp is in milliseconds since epoch
  • Cursor-based Pagination:
    • First request: Omit the cursor parameter to get the most recent messages
    • Subsequent requests: Pass the next_cursor value from the previous response as the cursor parameter
    • End of results: When has_next_page is false, there are no more messages to fetch
    • Use total_results to control how many messages are returned per request (default: 10)
  • When using linkedin_url, the API first retrieves the conversation ID for the specified profile, then fetches the messages
  • When using conversation_id, the API directly fetches messages from that conversation
  • This endpoint can only retrieve messages with profiles you’ve already had a conversation with
  • Historical messages may be limited by LinkedIn’s data retention policies
  • The profile_url field is only included in the response when it was provided in the request

Pagination Example

// First request - get most recent messages
{"linkedin_url": "https://linkedin.com/in/example", "total_results": 5}

// Next page - use cursor from previous response
{"linkedin_url": "https://linkedin.com/in/example", "total_results": 5, "cursor": "1745266498889"}