> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkupapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Conversation

> Retrieve messages from a specific conversation.

## 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.

<Note>This endpoint consumes **1 credit per 10 messages** returned. Ignore this if you're on per-seat pricing: usage is unlimited.</Note>

<Note>For an **email** mailbox, pass the `conversation_id` from [List Inbox](/api-reference/v2/messages/list-inbox#email-inbox) to fetch the whole thread. The response keeps the same shape (`messages[]`, `total_message_count`, `next_cursor`), each email mapped to a message — `sender_info` carries `{ name, email, is_me }`, and each message adds `id` (provider message id), `subject`, `message_id`, and `has_attachments` / `attachments[]` (`{ filename, mime_type, size, attachment_id, message_id }`, downloadable via the [attachment endpoint](/api-reference/v2/messages/manage-emails#download-attachment)). **Gmail** and **Outlook** are supported; generic IMAP falls back to the inbox listing.</Note>

## Request

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication.
</ParamField>

<ParamField body="account_id" type="string" required>
  The unique identifier of the account to use.
</ParamField>

<ParamField body="action" type="string" required>
  Must be `"get_conversation"`.
</ParamField>

<ParamField body="params" type="object" required>
  <Expandable title="params properties">
    <ParamField body="conversation_id" type="string">
      Unique identifier of the conversation, as returned by other endpoints. Treat it as an opaque string and pass it back exactly as returned. **Required if `profile_url` is not provided.**
    </ParamField>

    <ParamField body="profile_url" type="string">
      URL of the other participant's profile on the connected platform. When provided, the conversation with this user is resolved automatically. **Required if `conversation_id` is not provided.**
    </ParamField>

    <ParamField body="phone_number" type="string">
      **(WhatsApp)** The contact's number, instead of `conversation_id`.
    </ParamField>

    <ParamField body="count" type="integer" default={10}>
      Number of messages to return. Defaults to `10`.
    </ParamField>

    <ParamField body="cursor" type="string">
      Cursor returned by a previous response as `data.next_cursor`. Omit for the first page (most recent messages).
    </ParamField>

    <ParamField body="mark_as_read" type="boolean">
      `true` marks the conversation as read on LinkedIn after fetching it, `false` marks it as unread. Omit to leave the read state unchanged. Not available with `sales_nav`.
    </ParamField>

    <ParamField body="sales_nav" type="boolean" default={false}>
      Read a **Sales Nav** thread instead of a classic conversation. See [Sales Nav conversations](#sales-nav-conversations) below.
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="data properties">
    <ResponseField name="total_message_count" type="integer">
      Total number of messages in the conversation (across all pages).
    </ResponseField>

    <ResponseField name="unread_count" type="integer">
      Number of unread messages in the conversation, as it was before this call.
    </ResponseField>

    <ResponseField name="marked_as_read" type="boolean">
      Read state applied when `mark_as_read` was sent. If LinkedIn refused the change, `mark_as_read_error` is returned instead and the messages are still delivered.
    </ResponseField>

    <ResponseField name="last_seen_message" type="boolean">
      `true` when the most recent message in this batch has been read by the recipient.
    </ResponseField>

    <ResponseField name="last_seen_at" type="integer">
      Unix epoch timestamp in **milliseconds** when the recipient last read the conversation. Omitted if no read receipt is available.
    </ResponseField>

    <ResponseField name="messages" type="array">
      Messages from the conversation, sorted **most recent first**.

      <Expandable title="message properties">
        <ResponseField name="text" type="string">Plain-text body of the message.</ResponseField>
        <ResponseField name="timestamp" type="integer">Unix epoch timestamp in **milliseconds** when the message was delivered.</ResponseField>
        <ResponseField name="sender" type="string">Display name of the sender.</ResponseField>

        <ResponseField name="sender_info" type="object">
          <Expandable title="sender_info properties">
            <ResponseField name="first_name" type="string">Sender's first name.</ResponseField>
            <ResponseField name="last_name" type="string">Sender's last name.</ResponseField>
            <ResponseField name="profile_url" type="string">Sender's public profile URL.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="message_type" type="string">
          Message type. Common values: `"TEXT"`, `"INVITATION"`, `"SHARED_POST"`.
        </ResponseField>

        <ResponseField name="entity_urn" type="string">
          Unique identifier of the message. Treat it as an opaque string and pass it back exactly as returned.
        </ResponseField>

        <ResponseField name="has_attachments" type="boolean">
          `true` when the message carries at least one image, file, voice note, video or GIF.
        </ResponseField>

        <ResponseField name="attachments" type="array">
          One entry per attachment, empty when there are none. Same shape as in [webhook message events](/api-reference/v2/webhooks/introduction): `type` (`image`, `file`, `audio`, `video`, `gif`), `url` (signed LinkedIn URL, private and short-lived), `name`, `mime_type`, `byte_size`, `asset_urn`, and `download_url` — a stable URL on [Download Attachment](/api-reference/v2/messages/download-attachment) that streams the bytes on demand (1 credit).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="next_cursor" type="string">
      Cursor (epoch-ms timestamp of the oldest message in this batch) to send as `cursor` in the next request to fetch older messages. Omitted when there are no more messages.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="metadata" type="object">
  <Expandable title="metadata properties">
    <ResponseField name="action" type="string">
      The action that was performed (`"get_conversation"`).
    </ResponseField>

    <ResponseField name="account_id" type="string">
      The account ID used for the request.
    </ResponseField>

    <ResponseField name="credits_consumed" type="integer">
      Number of credits consumed (1 per 10 messages).
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      ISO 8601 timestamp of the response.
    </ResponseField>
  </Expandable>
</ResponseField>

## Sales Nav conversations

Set `sales_nav: true` and pass the Sales Nav **thread id** — from [List Inbox](/api-reference/v2/messages/list-inbox) with `sales_nav: true`, or the `threadId` returned when the InMail was sent. `profile_url` is not supported, so `conversation_id` is required.

Messages keep the classic shape and order (newest first), plus:

* `sender_info.is_me` and `sender_info.recipient_urn`
* `subject` and `attachments`, only when present — attachments use the same shape as in [webhook message events](/api-reference/v2/webhooks/introduction), fetched via [Download Attachment](/api-reference/v2/messages/download-attachment)
* `content_flag` — `DELETED` when the message was deleted; `text` is then empty
* `edited_at` — only on edited messages
* `message_type`: `INMAIL`, `INMAIL_ACCEPT`, `INMAIL_REPLY`, `MESSAGE`

`last_seen_message` is replaced by `conversation_id`, `type`, `archived` and `participants` (everyone but you).

<Warning>
  Sales Nav has no message cursor: a thread returns its `count` most recent messages and never issues a `next_cursor` (`cursor` is ignored). To read further back, raise `count` — compare it with `total_message_count` to know whether you have the whole thread.
</Warning>

<ResponseExample>
  ```json 200 theme={null}
  {
    "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...)",
          "has_attachments": false,
          "attachments": []
        },
        {
          "text": "",
          "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": "MEDIA",
          "entity_urn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAA...,2-MTc3NzE0...)",
          "has_attachments": true,
          "attachments": [
            {
              "type": "file",
              "url": "https://www.linkedin.com/dms/prv/document/...",
              "name": "proposal.pdf",
              "mime_type": "application/pdf",
              "byte_size": 184320,
              "asset_urn": "urn:li:digitalmediaAsset:D4E06AQ...",
              "download_url": "https://api.linkupapi.com/v2/messages/attachment?account_id=...&conversation_id=...&asset_urn=..."
            }
          ]
        }
      ],
      "next_cursor": "1777146285823"
    },
    "metadata": {
      "action": "get_conversation",
      "account_id": "your-account-id",
      "credits_consumed": 1,
      "timestamp": "2026-04-26T10:35:00Z"
    }
  }
  ```

  ```json Success (Sales Nav) theme={null}
  {
    "success": true,
    "data": {
      "conversation_id": "2-OTQwMTJlODEtOTUxMy00NGNlLWIyNmQtMDJjYTU4MmQyMTcxXzEwMA==",
      "total_message_count": 8,
      "unread_count": 0,
      "archived": false,
      "type": "inmail",
      "participants": [
        {
          "name": "Jessica Jensen",
          "first_name": "Jessica",
          "last_name": "Jensen",
          "profile_url": "https://www.linkedin.com/in/ACwAAA...",
          "sales_nav_url": "https://www.linkedin.com/sales/lead/ACwAAA...",
          "recipient_urn": "urn:li:fs_salesProfile:(ACwAAA...,NAME_SEARCH,JUf-)",
          "profile_picture": "https://media.licdn.com/...",
          "connection_level": "2",
          "is_me": false
        }
      ],
      "messages": [
        {
          "text": "Thanks for reaching out. I'd like to learn more.",
          "timestamp": 1785236943298,
          "sender": "Jessica Jensen",
          "sender_info": {
            "first_name": "Jessica",
            "last_name": "Jensen",
            "profile_url": "https://www.linkedin.com/in/ACwAAA...",
            "recipient_urn": "urn:li:fs_salesProfile:(ACwAAA...,NAME_SEARCH,JUf-)",
            "is_me": false
          },
          "message_type": "INMAIL_ACCEPT",
          "entity_urn": "2-MTc4NTIzNjk0MzI5OGI1ODI2Ni0xMDAm..."
        },
        {
          "text": "Hi Jessica — quick question about your team's stack.",
          "timestamp": 1785231247240,
          "sender": "Your Name",
          "sender_info": {
            "first_name": "Your",
            "last_name": "Name",
            "profile_url": "https://www.linkedin.com/in/ACwAADx...",
            "recipient_urn": "urn:li:fs_salesProfile:(ACwAADx...,NAME_SEARCH,X3dd)",
            "is_me": true
          },
          "message_type": "INMAIL",
          "entity_urn": "2-MTc4NTIzMTI0NzI0MGI5MDM1My0xMDAm...",
          "subject": "Quick question"
        }
      ]
    },
    "metadata": {
      "action": "get_conversation",
      "account_id": "your-account-id",
      "credits_consumed": 1,
      "timestamp": "2026-04-28T12:00:00Z"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "INVALID_PARAMS",
      "message": "Either conversation_id or profile_url is required."
    },
    "metadata": {
      "action": "get_conversation",
      "account_id": "your-account-id",
      "credits_consumed": 0,
      "timestamp": "2026-04-26T10:35:00Z"
    }
  }
  ```
</ResponseExample>
