Thanks to webhooks you are able to subscribe to every event related to prospects. So your system will update information every time a prospect opens, replies, or clicks on your email.


API Key is a part of an API Key and Integrations add-on, click here to learn how to get it on Marketplace »


Subscription URL (no trailing slash at the end)

https://api.woodpecker.co/rest/v1/webhooks/subscribe

Subscription request

POST -u <API_KEY> https://api.woodpecker.co/rest/v1/webhooks/subscribe 

{
"target_url": "https://customer-endpoint.com/unique_target_url",
"event": "<method_name>"
}

Unsubscription URL

https://api.woodpecker.co/rest/v1/webhooks/unsubscribe

Unsubscription request

POST -u <API_KEY> https://api.woodpecker.co/rest/v1/webhooks/unsubscribe 

{
"target_url": "https://customer-endpoint.com/unique_target_url",
"event": "<method_name>"
}

Sample webhook call

POST https://customer-endpoint.com/<unique_target_url> \ 
-H Content-Type: application/json \
-d <json result>

Supported events subscription:
1. When a prospect replies or their status is manually changed to "Replied"
2. When a prospect clicks a link in your email
3. When a prospect opens your email
4. When your email was bounced and a prospect is marked as ‘Bounced’
5. When the prospect's email address is marked as ‘Invalid’
6. When a prospect is marked as ‘Interested’
7. When a prospect is marked as ‘Maybe later’
8. When a prospect is marked as ‘Not interested’
9. When an auto-reply is detected by Woodpecker or if you manually change a prospect’s status to ‘Autoreplied’
10. When you get an auto-reply and you set a date to resume follow-ups
11. When Woodpecker sends an email to a particular prospect
12. When prospect unsubscribe or when it is marked as 'Blacklist'

Detailed samples of results after subscribing to the events:

1. When a prospect replies, or their status is manually changed to "Replied"

-- Method name: prospect_replied

Sample result:

{ 
"prospect": {
"website": "",
"city": "",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL ",
"country": "",
"company": "",
"title": "",
"campaign_id": 1,
"phone": "",
"id": 2,
"last_contacted": "2016-03-09T21:05:28+0100",
"campaign_email":
"[email protected]",
"status": "REPLIED",
"address": "",
"campaign_name": "test",
"email": "[email protected]",
"intrested": ""
},
"method": "prospect_replied"
}

2. When a prospect clicks a link in your email

-- Method name: link_clicked --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_email": "[email protected]",
"campaign_id": 1,
"email": "[email protected]",
"last_contacted": "2016-03-09T21:05:28+0100",
"phone": "+48 123456789",
"status": "INVALID",
"address": "Street",
"campaign_name": "test",
"id": 2, "intrested": ""
},
"click_url": "http://woodpecker.co/",
"method": "link_clicked",
"email_no": "#1"
}

3. When a prospect opens your email (for the first time)

-- Method name: email_opened --

Sample result:

{ 
"prospect": {
"website": "",
"city": "",
"first_name": "Name",
"last_name": ":Last",
"tags": "#52C #TRIAL ",
"country": "",
"company": "",
"title": "",
"campaign_email": "[email protected]",
"campaign_id": 1,
"email": "[email protected]",
"last_contacted": "2016-03-09T21:05:28+0100",
"phone": "",
"status": "REPLIED",
"address": "",
"campaign_name": "test",
"id": 2837,
"intrested": ""
},
"method": "email_opened",
"email_no": "#1"
}

4. When your email was bounced and a prospect is marked as ‘Bounced’

-- Method name: prospect_bounced --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_id": 1,
"phone": "+48 123456789",
"id": 2,
"last_contacted": "2016-03-09T21:05:28+0100",
"campaign_email": "[email protected]",
"status": "BOUNCED",
"address": "Street",
"campaign_name": "test",
"email": "[email protected]",
"intrested": ""
},
"method": "prospect_bounced"
}

5. When the prospect's email address is marked as ‘Invalid’

-- Method name: prospect_invalid --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_id": 1,
"phone": "+48 123456789",
"id": 2,
"last_contacted": "2016-03-09T21:05:28+0100",
"campaign_email": "[email protected]",
"status": "INVALID",
"address": "Street",
"campaign_name": "test",
"email": "[email protected]",
"intrested": "NOT_INTERESTED"
},
"method": "prospect_invalid"
}

6. When a prospect is marked as ‘Interested’

-- Method name: prospect_interested --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_id": 1,
"phone": "+48 123456789",
"id": 2,
"last_contacted": "2016-03-09T21:05:28+0100",
"campaign_email": "[email protected]",
"status": "REPLIED",
"address": "Street",
"campaign_name": "test",
"email": "[email protected]",
"intrested": "INTERESTED"
},
"method": "prospect_interested"
}

7. When a prospect is marked as ‘Maybe later’

-- Method name: prospect_maybe_later --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_email": "[email protected]",
"campaign_id": 1,
"email": "[email protected]",
"last_contacted": "2016-03-09T21:05:28+0100",
"phone": "+48 123456789",
"status": "REPLIED",
"address": "Street",
"campaign_name": "test",
"id": 2,
"intrested": "MAYBE_LATER"
},
"method": "prospect_maybe_later"
}

8. When a prospect is marked as ‘Not interested’

-- Method name: prospect_not_interested --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_email": "[email protected]",
"campaign_id": 1,
"email": "[email protected]",
"last_contacted": "2016-03-09T21:05:28+0100",
"phone": "+48 123456789",
"status": "REPLIED",
"address": "Street",
"campaign_name": "test",
"id": 2,
"intrested": "NOT_INTERESTED"
},
"method": "prospect_not_interested"
}

9. When an auto-reply is detected by Woodpecker or if you manually change a prospect’s status to ‘Autoreplied’

-- Method name: prospect_autoreplied --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_email": "[email protected]",
"campaign_id": 1,
"email": "[email protected]",
"last_contacted": "2015-10-25T18:10:55+0100",
"phone": "+48 123456789",
"status": "AUTOREPLIED",
"address": "Street",
"campaign_name": "test",
"id": 2,
"intrested": ""
},
"method": "prospect_autoreplied"
}

10. When you get an auto-reply and you set a date to resume follow-ups

-- Method name: followup_after_autoreply --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_email": "[email protected]",
"campaign_id": 1,
"email": "[email protected]",
"last_contacted": "2015-07-07T15:28:09+0200",
"phone": "+48 123456789",
"status": "ACTIVE",
"address": "Street",
"campaign_name": "test",
"followup_after": "2016-03-24T00:00:00+0100",
"id": 2,
"intrested": ""
},
"method": "followup_after_autoreply"
}

11. When Woodpecker sends an email to a particular prospect

-- Method name: campaign_sent --

Sample result:

[{ 
"method":"campaign_sent",
"prospect":
{
"id":11111111,
"email":"[email protected]",
"first_name":"Erlich",
"last_name":"Bachman",
"company":"Bachmanity",
"website":"https://bachmanity.com",
"tags":"#vcfound",
"title":"Mr.",
"phone":"+1222000222020",
"address":"",
"city":"",
"country":"",
"snippet1":"",
"snippet2":"",
(...)
"snippet15":"",
"industry":"",
"state":"",
"last_contacted":"2018-06-02T16:36:52+0100",
"status":"ACTIVE",
"in_campaign":1,
"emails_sent":1,
"imported":"bestprospectsever.csv",
"interested":"INTERESTED",
"campaign_id":79127,
"campaign_name":"Best campaign ever",
"campaign_email":"[email protected]"},
"email":
{
"id":391891372,
"campaign_id":279127,
"message_id":"<UNIQUE_ID_OF_MSG>",
"name_from":"Gavin Belson",
"email_from":"[email protected]",
"name_to":"Erlich Bachman",
"email_to":"[email protected]",
"email_cc":"[email protected]",
"email_bcc":"[email protected]",
"subject":"An opportunity to live life on your own terms and not apologize.",
"message":"Hi , <br><br>We're sending this email to introduce you to an <br> opportunity to live life on your own terms and not apologize. <br> Interested? <br><br>Cheers from Gavin<br/>
"sent":"2018-06-02T16:36:52+0100",
"number":1
}
}
}]

12. When prospect unsubscribe or when it is marked as 'Blacklist'

-- Method name: prospect_blacklisted --

Sample result:

{ 
"prospect": {
"website": "http://mycompany.co",
"city": "city",
"first_name": "Name",
"last_name": ":Last",
"tags": "#TRIAL",
"country": "PL",
"company": "My company",
"title": "mr",
"campaign_email": "[email protected]",
"campaign_id": 1,
"email": "[email protected]",
"last_contacted": "2015-07-07T15:28:09+0200",
"phone": "+48 123456789",
"status": "ACTIVE",
"address": "Street",
"campaign_name": "test",
"followup_after": "2016-03-24T00:00:00+0100",
"id": 2,
"intrested": ""
},
"method": "prospect_blacklisted"
}

Did this answer your question?