All Collections
Integrations
API 2.0
Fetching prospect responses
Fetching prospect responses

How to fetch prospect responses with Woodpecker API 2.0

Weronika Wróblewska avatar
Written by Weronika Wróblewska
Updated over a week ago

GET responses

To get a list of all responses that came from a specific prospect, use the following request:

GET https://api.woodpecker.co/rest/v2/prospects/{pid}/responses

{pid} - prospect ID

IMPORTANT: This endpoint works only for IF-campaigns created after 15 November 2019 (campaign ID is below 1000000). If you try to fetch responses from legacy campaigns, you'll get an empty array.

Remember, Woodpecker API 2.0 is still under ongoing development. More functions to the prospects endpoint and API 2.0, in general, are on the way. You can still use our API 1.0 to get more information about campaigns or manage your prospects. Detailed documentation is here.

Sample response:

{
"prospect_id": 1234567,
"email": "[email protected]",
"responses": [
{
"response_id": 123454,
"campaign_id": 17654321,
"step": 1,
"campaign_email_sent": 1,
"subject": "Re: What about Pied Piper?",
"message": "<div>This is a reply, packed in HTML.</div>",
"delivered": "2019-03-07T15:09:42"
"secondary_prospect_email": "[email protected]"
},
{
"response_id": 54321,
"campaign_id": 1957395,
"step": 1,
"campaign_email_sent": 1,
"subject": "Re: Did you hear about world's best startup, Aviato?",
"message": "<div>Yes.</div>",
"delivered": "2019-07-24T15:06:43"
"secondary_prospect_email": null
}
]
}

Response data type:

  • response_id - number, response ID

  • prospect_id - number, prospect ID.

  • email - string, prospect's email address.

  • responses - JSON object, a list of responses.

  • campaign_id - number, campaign ID.

  • step - number, step number. Check Note for more information.

  • campaign_email_sent - number, number of emails sent from the campaign a specific webhook comes from.

  • subject - string, an email subject.

  • message - string, a response body.

  • delivered - string, time of a response delivery (data provided in Europe/Warsaw time zone)

  • secondary_prospect_email - string, email of the secondary prospect

Note:

  • step tells you at which stage of the campaign is a specific email. At this point, there could be up to 2 actions (email, manual task) with the same step number. Check this article for a better understanding.

If you want to fetch responses from only one campaign, simply add campaign_id parameter to your request as follows:

GET https://api.woodpecker.co/rest/v2/prospects/{pid}/responses?campaign_id={cid}

{cid} - campaign ID.


Want to integrate with us?

If you're interested in building a native integration with Woodpecker, fill out this form and we'll get back to you.

Did this answer your question?