Skip to content
Docs

List chats

GETdirect.lempile.com/api/v1/chats

The account's conversations, newest activity first: the inbox and the archive (not spam). The newest 20 come from LinkedIn's inbox sync (kept a minute); further pages, before, after, unread or a limit over 20 walk the inbox and the archive by last activity (25 a LinkedIn call).

Authentication

X-API-KEY header·A Lempile Direct key, one per workspace, made in Lempile's dashboard.

Query parameters

  • account_idstringrequired

    The account that reads: a Lempile LinkedIn account id (GET /accounts lists them).

  • limitinteger

    Items per page: 1 to 250 (default 10).

    Default10≥ 1 · ≤ 250
  • cursorstring

    A cursor a previous page gave.

  • unreadboolean

    Only chats with unread messages.

    Defaultfalse
  • beforestring

    Only chats last active before this time (ISO 8601 UTC).

  • afterstring

    Only chats last active after this time (ISO 8601 UTC).

  • account_typestring

    Anything but LINKEDIN answers 400.

    One ofLINKEDIN

Responses

200

OK

›

application/json

  • objectstringrequired
    AlwaysChatList
  • itemsarray of Chatrequired
    ›Show fields
    • objectstringrequired
      AlwaysChat
    • idstringrequired

      LinkedIn's own thread id (2-…), URL-safe and unpadded.

    • account_idstringrequired
    • account_typestringrequired
      AlwaysLINKEDIN
    • provider_idstringrequired

      Same as id.

    • namestring | nullrequired

      A group conversation's title.

    • typeintegerrequired

      0: one person. 1: a group.

      One of01
    • timestampstring | nullrequired

      The last activity (ISO 8601).

    • unread_countintegerrequired
    • archivedintegerrequired

      1 when in LinkedIn's archive.

      One of01
    • muted_untilinteger | nullrequired

      -1 when muted, else null.

    • read_onlyintegerrequired

      1 when nobody can answer (sponsored messages).

      One of01
    • folderarray of stringrequired

      Its box (INBOX, ARCHIVED, OTHER, PENDING, SPAM) and INBOX_LINKEDIN_CLASSIC.

    • pinnedintegerrequired
      Always0
    • disabledFeaturesarray of string
    • attendee_provider_idstring

      The other person's provider id, in a one-to-one chat.

    • content_typestring

      linkedin_offer: a sponsored message LinkedIn labels "LinkedIn Offer"; sponsored: any other ad; inmail: an InMail.

      One ofinmailsponsoredlinkedin_offer
    • lastMessageone of

      Only on GET /chats/{chat_id}.

      ›Show fields
      • MessageMessage

        Unipile's Message.

        ›Show fields
        • objectstringrequired
          AlwaysMessage
        • idstringrequired

          LinkedIn's own message id (2-…), URL-safe and unpadded.

        • provider_idstringrequired

          Same as id.

        • account_idstringrequired
        • chat_idstringrequired

          LinkedIn's own thread id (2-…), URL-safe and unpadded.

        • chat_provider_idstringrequired

          Same as chat_id.

        • sender_idstringrequired

          The sender's provider id.

        • sender_attendee_idstringrequired

          Same as sender_id.

        • sender_urnstringrequired
        • textstring | nullrequired
        • attachmentsarray of MessageAttachmentrequired
          ›Show fields
          • idstringrequired
          • typestringrequired
            One ofimgfileaudio
          • urlstring | null

            LinkedIn's signed link to the file (a voice note: its AAC .m4a, audio/mp4). It expires.

          • unavailablebooleanrequired
          • sizeobject
            ›Show fields
            • widthintegerrequired
            • heightintegerrequired
          • stickerboolean
          • file_namestring
          • file_sizeinteger
          • mimetypestring | null
          • voice_noteboolean

            audio only: always true (a LinkedIn voice note).

          • durationinteger

            audio only: its length in milliseconds, as LinkedIn gives it.

        • timestampstringrequired

          UTC time, ISO 8601 with milliseconds: 2026-10-28T21:15:03.123Z.

        • is_senderintegerrequired

          1 when the account sent it.

          One of01
        • reactionsarray of objectrequired

          The account's own reactions only.

          ›Show fields
          • valuestringrequired
          • sender_idstringrequired
          • is_senderbooleanrequired
        • seenintegerrequired

          Always 0 (not read).

          One of01
        • seen_byobjectrequired

          Always {}.

        • hiddenintegerrequired

          Always 0.

          One of01
        • deletedintegerrequired

          1 when its sender took it back.

          One of01
        • deleted_forstring
          Alwayseveryone
        • editedintegerrequired

          1 when edited.

          One of01
        • is_eventintegerrequired

          1 for a conversation event LinkedIn writes itself.

          One of01
        • deliveredintegerrequired

          Always 1.

          One of01
        • behaviornullrequired
        • originalstringrequired
          Always
        • message_typestringrequired
          AlwaysMESSAGE
        • attendee_typestringrequired
          One ofMEMBERORGANIZATION
        • attendee_distanceinteger

          The sender's distance: 1 to 3, 4 out of network.

          One of1234
        • subjectstring

          An InMail's subject.

        • account_typestring

          Only on GET /messages/{message_id}.

          AlwaysLINKEDIN
      • Option 2null
    • unreadinteger

      1 when the chat has unread messages (Unipile's flag next to unread_count).

      One of01
    • subjectstring

      An InMail's or a sponsored message's subject; the chat's name when it has no title.

  • cursorstring | nullrequired

    The next page's cursor, or null on the last page. Opaque: send it back as cursor.

400

A required parameter missing (errors/missing_parameters), or one that isn't valid (errors/invalid_parameters, errors/invalid_url, errors/content_too_large).

›

application/json

  • titlestringrequired

    A short title, e.g. Too many requests.

  • detailstringrequired

    What happened, in plain words. Never an account's data.

  • typestringrequired

    Unipile's error type: errors/<kind>. Branch on this, not on detail.

  • statusintegerrequired

    The HTTP status again.

  • retry_afterinteger

    Seconds to wait before trying this account again. Only on 429; the Retry-After header carries the same value.

401

errors/missing_credentials: the X-API-KEY header is missing, wrong or revoked. errors/disconnected_account: LinkedIn signed the account out (or asks it for a security check); reconnect it.

›

application/json

  • titlestringrequired

    A short title, e.g. Too many requests.

  • detailstringrequired

    What happened, in plain words. Never an account's data.

  • typestringrequired

    Unipile's error type: errors/<kind>. Branch on this, not on detail.

  • statusintegerrequired

    The HTTP status again.

  • retry_afterinteger

    Seconds to wait before trying this account again. Only on 429; the Retry-After header carries the same value.

404

errors/resource_not_found: an unknown or removed account, an account of another workspace (answered exactly the same), or nothing on LinkedIn with this id.

›

application/json

  • titlestringrequired

    A short title, e.g. Too many requests.

  • detailstringrequired

    What happened, in plain words. Never an account's data.

  • typestringrequired

    Unipile's error type: errors/<kind>. Branch on this, not on detail.

  • statusintegerrequired

    The HTTP status again.

  • retry_afterinteger

    Seconds to wait before trying this account again. Only on 429; the Retry-After header carries the same value.

429

errors/too_many_requests: LinkedIn asked the account to slow down (it rests 15 minutes), its daily calls or writes are used up, or it's busy with other calls. Wait retry_after seconds.

›

application/json

  • titlestringrequired

    A short title, e.g. Too many requests.

  • detailstringrequired

    What happened, in plain words. Never an account's data.

  • typestringrequired

    Unipile's error type: errors/<kind>. Branch on this, not on detail.

  • statusintegerrequired

    The HTTP status again.

  • retry_afterinteger

    Seconds to wait before trying this account again. Only on 429; the Retry-After header carries the same value.

500

errors/provider_error: LinkedIn answered something Direct couldn't read (nothing was written). errors/unexpected_error: Direct failed.

›

application/json

  • titlestringrequired

    A short title, e.g. Too many requests.

  • detailstringrequired

    What happened, in plain words. Never an account's data.

  • typestringrequired

    Unipile's error type: errors/<kind>. Branch on this, not on detail.

  • statusintegerrequired

    The HTTP status again.

  • retry_afterinteger

    Seconds to wait before trying this account again. Only on 429; the Retry-After header carries the same value.

503

errors/network_down: the account's proxy or browser server didn't answer. Nothing was sent.

›

application/json

  • titlestringrequired

    A short title, e.g. Too many requests.

  • detailstringrequired

    What happened, in plain words. Never an account's data.

  • typestringrequired

    Unipile's error type: errors/<kind>. Branch on this, not on detail.

  • statusintegerrequired

    The HTTP status again.

  • retry_afterinteger

    Seconds to wait before trying this account again. Only on 429; the Retry-After header carries the same value.

504

errors/request_timeout: LinkedIn didn't answer in time. On a write: an unknown outcome (it may have been sent); it's never retried and its Idempotency-Key never writes again.

›

application/json

  • titlestringrequired

    A short title, e.g. Too many requests.

  • detailstringrequired

    What happened, in plain words. Never an account's data.

  • typestringrequired

    Unipile's error type: errors/<kind>. Branch on this, not on detail.

  • statusintegerrequired

    The HTTP status again.

  • retry_afterinteger

    Seconds to wait before trying this account again. Only on 429; the Retry-After header carries the same value.

Was this page helpful?