Skip to main content

Get inbox messages

Retrieve a paginated list of email messages available in the Woodpecker inbox. You can use the available parameters to narrow down the results by mailbox, campaign, prospect status, or interest level. In standard Woodpecker accounts and agency HQs, the /inbox endpoint lets you access emails from mailboxes connected by the owner of the API key. In agency client accounts, it provides access to all connected mailboxes.

If you'd like to retrieve responses for a specific prospect, use the v2/prospects endpoint

Request

Endpoint

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

Headers

x-api-key: {YOUR_API_KEY}

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

Parameters

You can use the query parameters below to filter inbox messages. Each filter is optional - if you omit a parameter, that filter will not be applied. If no parameters are provided, the request will return unfiltered inbox messages based on the default pagination settings.

ParameterRequiredTypeDescription
prospect_status*NostringFilters inbox messages by the prospect's current status. Available values: RESPONDED, AUTOREPLIED, BOUNCED, BLACKLISTED, OPT_OUT
prospect_interest_level*NostringFilters inbox messages by the prospect's interest level. Available values: INTERESTED, MAYBE_LATER, NOT_INTERESTED, NOT_MARKED
mailbox_idsNostring (comma-separated integers)Retrieve only responses fetched from the specified mailbox IMAP accounts. Use /mailboxes endpoint to fetch mailbox details
campaign_idsNostring (comma-separated integers)Retrieve only responses associated with given campaigns. Use /campaign endpoints to fetch campaign details
per_pageNointegerNumber of records per page. Default: 10, maximum: 50
next_page_cursorNostringCursor used to retrieve a specific page of results. Use null to start from the first page. Only values returned in the next_page_cursor field of a previous response are accepted. See the pagination section for more details

*Note: The prospect_status and prospect_interest_level parameters are mutually exclusive - you can use only one of them in a request. Providing both will result in an error. If neither parameter is provided, these filters will not be applied.

Request sample

Retrieve 10 latest responses marked as INTERESTED

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

Response

Response examples

A list of responses retrieved from the Woodpecker inbox. The responses are sorted by the most recently received message

{
"content": [
{
"id": 123456,
"prospect_id": 987654,
"stamp": "2025-03-05 17:57:00",
"subject": "Re: Subject line of the response",
"body": {
"html": "<div>This is a reply in HTML format.</div>"
},
"campaign": {
"id": 456789,
"name": "Associated campaign name"
},
"from_email": "john@prospect.com",
"recipient": "receiving@email.com"
}
],
"next_page_cursor": "Y3VyaW91cywgYXJlbid0IHlvdT8="
}

Body schema

FieldTypeDescription
contentarray[object]Array of email messages
└─[].idintegerUnique ID of the prospect's response
└─[].prospect_idintegerUnique ID of the prospect
└─[].stampstringTimestamp of the message in UTC. Format: yyyy-MM-dd HH:mm:ss
└─[].subjectstringSubject line of the response
└─[].bodyobjectObject containing the message content
    └─htmlstringBody of the response email in HTML format
└─[].campaignobjectObject containing the campaign related to the message
    └─idinteger/nullID of the campaign associated to a response
    └─namestring/nullName of the campaign
└─[].from_emailstringEmail address of the responder
└─[].recipientstringEmail address of the recipient (typically, the IMAP of the mailbox that sent the email)
next_page_cursorstringPagination cursor. null means no more results (last page); non-null value indicates the cursor for the next page

Pagination

This endpoint uses cursor-based pagination. Results are returned in pages, and each response includes a next_page_cursor field:

  • To start from the first page, omit the page_cursor parameter or set it to null.
  • If next_page_cursor is null, there are no more pages available,
  • If next_page_cursor contains a value, you can use it in the next request to retrieve the next page of results,

Request first page:

curl --request GET \
--url "https://api.woodpecker.co/rest/v2/inbox/messages?prospect_interest_level=INTERESTED" \
--header "x-api-key: {YOUR_API_KEY}"

Example response:

{
"content": [...],
"next_page_cursor": "T2ggSGkgTWFyayE="
}

Request the next page:

curl --request GET \
--url "https://api.woodpecker.co/rest/v2/inbox/messages?page_cursor=T2ggSGkgTWFyayE=&prospect_interest_level=INTERESTED" \
--header "x-api-key: {YOUR_API_KEY}"