Skip to content

LinkedIn Messaging API

The LinkedIn Messaging API lets you List conversations, Read Message History, and Send Replies through one unified endpoint, with OAuth and token refreshes handled for you.

List conversations request
curl "{{API_BASE_URL}}/v1/messages?platform=linkedin&accountId=acc_li_567&limit=20" \
  -H "x-access-key: your-api-key"
Illustrative request
Example line 1

curl "{{API_BASE_URL}}/v1/messages?platform=linkedin&accountId=acc_li_567&limit=20" \

Illustrative request
Example line 2

-H "x-access-key: your-api-key"

It is suited to building a branded inbox or routing professional threads into sales and support tooling without managing LinkedIn tokens directly.

LinkedIn Messaging API: list, read history, and reply

Three operations form the core of this surface, all reached through /v1/messages: List conversations, Read Message History, and Send Replies. Enumeration gives you threads for a linked account together with participant details and the newest entry. Opening a thread pages through its entries so your application can reconstruct the exchange. Posting a response yields an identifier for that outbound entry, useful for later correlation in a CRM. Because the request and response shape is shared with other messaging endpoints, LinkedIn can be added without learning a separate pattern.

Contract at a glance: {{API_BASE_URL}}/v1/messages

The captured example targets /v1/messages with platform set to linkedin, plus accountId and limit query values, and an x-access-key header. The reply is JSON containing success, selfId, selfUsername, a conversations array, and nextCursor for paging. The examples titled List conversations request and List conversations structured response show the exact shapes to build against, with sample values as captured and unexecuted.

List conversations: request and response field map

Enumeration returns threads belonging to a linked account. Each thread object carries an id, a participants array whose entries include name, username, and profilePictureUrl, a lastMessage object with id, text, from, and timestamp, and an updatedTime value. As implementation guidance, use updatedTime to surface recent activity, profilePictureUrl for avatars, and nextCursor to request a further page. The captured response example does not show a headline field, so do not code against one until it is confirmed.

Read message history and rebuild a thread

Opening a thread returns its entries in pages, with sender information and a timestamp on each entry. As implementation guidance, keep requesting pages until none remain, then present entries in timestamp order to recreate the exchange. If a thread found during enumeration yields an empty page, first confirm that the conversation identifier and accountId correspond to the linked account before concluding the thread has no entries.

Send replies and reconcile the returned message ID

A response is posted with a single call, and the reply carries an identifier for the outbound entry. As implementation guidance, persist that identifier alongside the thread and any CRM record so delivery can be correlated later. Avoid marking an outbound entry as delivered before that identifier arrives, and before retrying a failed attempt, check whether the earlier attempt already reached the recipient to prevent duplicates.

OAuth, token refresh, and connected-account scope

Linking happens through an OAuth flow, and credential renewal is handled on your behalf, so the connection continues without repeated manual sign-in. Your application therefore works with the linked account identifier, such as accountId, rather than storing LinkedIn credentials. Only threads accessible to that linked account are surfaced.

Availability, account-type, and cost caveats

Coverage varies with account category and with permissions approved during linking, so Company Pages and personal profiles may differ. The source describes Instagram direct messages as shipping today, with LinkedIn sharing the same Messages surface; confirm current availability in the status page or dashboard before making LinkedIn a hard dependency. The cost model is {{OWNER_CREDIT_COST_PER_MESSAGE_CALL}} per call, counting enumeration, entry fetching, and responses separately. A dashboard inbox exists, and the API exposes the operations behind it for a custom inbox or for routing threads into sales and support systems.

Worked example and implementation checklist

As implementation guidance, work through this sequence: confirm the linked account and its accountId, check availability for that account category, enumerate with platform=linkedin and a limit, follow nextCursor for more pages, fetch entries per thread, post responses and store the returned identifier, and budget {{OWNER_CREDIT_COST_PER_MESSAGE_CALL}} per call. If a response shows success as false or an empty conversations array, check accountId, approved permissions, and availability status before retrying. These checks are practical guidance; the source does not define a separate error contract.

List conversations request fields
FieldLocationType as shownRequiredness
platformQuery parameterstring ("linkedin")Shown in example
accountIdQuery parameterstring ("acc_li_567")Shown in example
limitQuery parameternumber (20)Shown in example
x-access-keyHeaderstring ("your-api-key")Shown in example

Requiredness not explicitly stated in source; shown in captured example request.

List conversations response fields
FieldType as shownDescription
successbooleanWhether the request succeeded
selfIdstringConnected account identifier, e.g. urn:li:person:AbC123
selfUsernamestringConnected account username
conversationsarrayList of conversation objects
conversations[].idstringConversation identifier, e.g. urn:li:conversation:2233445566
conversations[].participants[].idstringParticipant identifier
conversations[].participants[].namestringParticipant name
conversations[].participants[].usernamestringParticipant username
conversations[].participants[].profilePictureUrlstringParticipant profile picture URL
conversations[].lastMessage.idstringMost recent message identifier
conversations[].lastMessage.textstringMost recent message text
conversations[].lastMessage.from.idstringSender identifier
conversations[].lastMessage.from.namestringSender name
conversations[].lastMessage.timestampstring (ISO 8601)Most recent message timestamp
conversations[].updatedTimestring (ISO 8601)Conversation updated time
nextCursorstringCursor for fetching the next page

Field map exactly as captured in source response example. Source prose mentions headline, but captured response contains no headline field; flagged privately for matching-stage validation.

Failure and decision matrix by task
TaskWhat it returnsKey fields to store
List conversationsConversations with participants, last message, and updatedTimeConversation id, participant ids, lastMessage.id, updatedTime, nextCursor
Read Message HistoryPaginated messages for a conversation with sender and timestampMessage sender, timestamp, conversation id
Send RepliesSent message ID for the replySent message ID for CRM reconciliation

History and reply rows summarize source narrative descriptions; source does not specify distinct HTTP method/path or request fields for those operations.

Frequently asked questions

What can I do with LinkedIn messaging through this API?

You can enumerate threads, open a thread to page through its entries, and post a response, all via the shared /v1/messages surface.

Do I need to manage LinkedIn OAuth tokens myself?

No. Authorization and renewal are handled on your behalf. A user links an account once, after which the connection is maintained without manual sign-in again.

Does this work for Company Pages and personal profiles?

It varies by account category and by which permissions were approved during linking. Link the specific account you intend to operate; only threads reachable by that account will appear.

Is LinkedIn messaging available today?

The source describes Instagram direct messages as shipping today, with LinkedIn using the same Messages surface. Before depending on LinkedIn in production, confirm current availability in the status page or dashboard.

Is there a UI, or is it API only?

Both options exist. A dashboard inbox supports reading and responding, while the API exposes equivalent operations for embedding in your own product.

How much does the Messaging API cost?

Cost is {{OWNER_CREDIT_COST_PER_MESSAGE_CALL}} per Messages API call. Enumerating threads, fetching entries, and posting a response each count as a separate call for budgeting.

List conversations structured response
{
  "success": true,
  "selfId": "urn:li:person:AbC123",
  "selfUsername": "Your Brand",
  "conversations": [
    {
      "id": "urn:li:conversation:2233445566",
      "participants": [
        {
          "id": "urn:li:person:XyZ789",
          "name": "Jane Doe",
          "username": "jane-doe",
          "profilePictureUrl": "https://media.licdn.com/dms/image/..."
        },
        {
          "id": "urn:li:person:AbC123",
          "name": "Your Brand",
          "username": "yourbrand",
          "profilePictureUrl": "https://media.licdn.com/dms/image/..."
        }
      ],
      "lastMessage": {
        "id": "urn:li:message:6900000000000000001",
        "text": "An example comment.",
        "from": {
          "id": "urn:li:person:XyZ789",
          "name": "Jane Doe"
        },
        "timestamp": "2026-08-05T16:40:00Z"
      },
      "updatedTime": "2026-08-05T16:40:00Z"
    }
  ],
  "nextCursor": "QVFIUl9..."
}