Skip to main content

Get LinkedIn inbox messages

Retrieve LinkedIn replies received from prospects through your Woodpecker campaigns, including responses to direct messages, InMails, and connection requests. Each reply includes the message content, sender details, LinkedIn conversation URL, and identifiers that can be used to continue the conversation through the API for direct messages and InMails.

Replies are returned from newest to oldest, with pagination support. You can filter results by LinkedIn account or campaign to retrieve only the conversations relevant to your workflow.

note

Reply detection for InMail responses is supported for LinkedIn Premium accounts but not for Sales Navigator accounts.

Request​

Endpoint​

GET https://api.woodpecker.co/rest/v2/linkedin/inbox/messages

Headers​

x-api-key: {YOUR_API_KEY}

For details on how to authenticate your requests, please see the authentication guide.

Parameters​

All query parameters are optional. By default, the endpoint returns the 10 latest LinkedIn replies available in your Woodpecker account.

ParameterRequiredTypeDescription
account_idsNostring (comma-separated integers)Returns replies received by the specified LinkedIn accounts. Use the LinkedIn accounts endpoint to find account IDs
campaign_idsNostring (comma-separated integers)Returns replies associated with the specified campaigns
per_pageNointegerNumber of replies per page. Default: 10, minimum: 1, maximum: 50
next_page_cursorNostringCursor returned in pagination.next_page_cursor for retrieving the next page. Mutually exclusive with previous_page_cursor. See Pagination
previous_page_cursorNostringCursor returned in pagination.previous_page_cursor for retrieving the previous page. Mutually exclusive with next_page_cursor. See Pagination

Request samples​

Retrieve the latest replies for a LinkedIn account​

curl --request GET \
--url "https://api.woodpecker.co/rest/v2/linkedin/inbox/messages?account_ids=567567&per_page=10" \
--header "x-api-key: {YOUR_API_KEY}"

Response​

Response examples​

A page of LinkedIn replies, ordered from newest to oldest. content is an empty array when no replies match the request.

{
"content": [
{
"id": 123123,
"prospect_id": 234234,
"prospect_linkedin_profile": "https://www.linkedin.com/in/jane-doe-example",
"campaign_id": 345345,
"sent_id": 456456,
"orig_sent_action_type": "DIRECT_MESSAGE",
"account_id": 567567,
"stamp": "2026-08-18T13:08:09+02:00",
"from_name": "Jane Doe",
"from_profile_id": "jane-doe-profile-id",
"recipient": "https://www.linkedin.com/in/alex-smith-example",
"linkedin_thread_url": "https://www.linkedin.com/messaging/thread/example-thread-123123",
"body": "Thanks for reaching out. I'd be happy to learn more.",
"attachments": [
{
"type": "file",
"name": "project-overview.pdf",
"media_type": "application/pdf",
"byte_size": 245760,
"download_url": "https://www.linkedin.com/dms/attachments/example-project-overview.pdf"
}
]
},
{
"id": 123122,
"prospect_id": 234235,
"prospect_linkedin_profile": "https://www.linkedin.com/in/john-smith-example",
"campaign_id": 345345,
"sent_id": 456457,
"orig_sent_action_type": "INMAIL_MESSAGE",
"account_id": 567567,
"stamp": "2026-08-18T12:35:00+02:00",
"from_name": "John Smith",
"from_profile_id": "john-smith-profile-id",
"recipient": "https://www.linkedin.com/in/alex-smith-example",
"linkedin_thread_url": "https://www.linkedin.com/messaging/thread/example-thread-123122",
"body": "Could you send me a short overview?",
"attachments": []
}
],
"pagination": {
"previous_page_cursor": null,
"next_page_cursor": "T2ggSGkgTWFyayE="
}
}

Body schema​

FieldTypeDescription
contentarray[object]LinkedIn replies on the requested page
  └─ [].idintegerUnique ID of the LinkedIn reply
  └─ [].prospect_idinteger/nullID of the prospect associated with the reply
  └─ [].prospect_linkedin_profilestring/nullLinkedIn profile URL stored for the prospect
  └─ [].campaign_idinteger/nullID of the campaign in which the reply was received
  └─ [].sent_idinteger/nullID of the original LinkedIn action associated with the reply
  └─ [].orig_sent_action_typestring/nullType of the original LinkedIn action: CONNECTION_REQUEST, DIRECT_MESSAGE, or INMAIL_MESSAGE
  └─ [].account_idinteger/nullID of the LinkedIn account that received the reply
  └─ [].stampstring/nullTime the reply was received in ISO 8601 format, including an offset
  └─ [].from_namestring/nullName of the person who sent the reply
  └─ [].from_profile_idstring/nullLinkedIn profile ID of the person who sent the reply
  └─ [].recipientstring/nullLinkedIn profile URL of the account that received the reply
  └─ [].linkedin_thread_urlstring/nullURL of the LinkedIn conversation containing the reply
  └─ [].bodystring/nullContent of the reply
  └─ [].attachmentsarray[object]Attachments associated with the reply; empty when none are available.
The schema lists the common attachment fields. Depending on the attachment type, an object may include additional fields. Files are hosted externally, to access a download_url, open it in a browser logged into the LinkedIn account participating in the conversation
    └─ [].typestringAttachment type: audio, video, file, vectorImage, externalMedia, or repliedMessageContent (quoted message content)
    └─ [].download_urlstringExternal download URL, when present. Not available for every attachment; repliedMessageContent may have no file URL
paginationobjectCursors for moving through the result set
  └─ previous_page_cursorstring/nullCursor for the previous page. null means the current page is the first page
  └─ next_page_cursorstring/nullCursor for the next page. null means the current page is the last page


Pagination​

This endpoint uses cursor-based pagination. Replies remain ordered from newest to oldest on every page. Keep the same filters when moving between pages.

The cursor values shown on this page are illustrative placeholders, not valid API cursors. For actual requests, use the cursor returned by the API.

  • To start from the first page, omit both cursor parameters
  • To move forward, send the value returned in pagination.next_page_cursor as next_page_cursor
  • To move backward, send the value returned in pagination.previous_page_cursor as previous_page_cursor
  • Send only one cursor per request. A null cursor means there is no page in that direction

Request the first page​

curl --request GET \
--url "https://api.woodpecker.co/rest/v2/linkedin/inbox/messages?account_ids=567567&per_page=10" \
--header "x-api-key: {YOUR_API_KEY}"

On the first page, previous_page_cursor is null. A non-null next_page_cursor means more replies are available:

{
"previous_page_cursor": null,
"next_page_cursor": "T2ggSGkgTWFyayE="
}

Request the next page​

Pass the returned next_page_cursor with the same filters:

curl --request GET \
--url "https://api.woodpecker.co/rest/v2/linkedin/inbox/messages?account_ids=567567&per_page=10&next_page_cursor=T2ggSGkgTWFyayE=" \
--header "x-api-key: {YOUR_API_KEY}"

A middle page can include cursors in both directions:

{
"previous_page_cursor": "RG9uJ3QgdGVsbCBhbnlvbmUh",
"next_page_cursor": "SXQncyBhIHRyYXAh"
}

Request the previous page​

Pass previous_page_cursor from the current response:

curl --request GET \
--url "https://api.woodpecker.co/rest/v2/linkedin/inbox/messages?account_ids=567567&per_page=10&previous_page_cursor=RG9uJ3QgdGVsbCBhbnlvbmUh" \
--header "x-api-key: {YOUR_API_KEY}"