Woodpecker.co API
Getting Started
You will first need a Woodpecker account, and your API key. See the Woodpecker API docs here. http://help.woodpecker.co/article/16-api-docs.
Installation
npm i woodpecker-api
Usage
The API uses Promises for all interaction.
const Woodpecker = 'KEY' Woodpecker
API Reference
prospects().find({query})
- id: Find by id
- ids: Find by an array of ids
- campaign: Find by a specific
campaign_id
- campaigns: Find by an array of
campaign_id
s - status: Find by prospect status. Valid values:
ACTIVE
|BLACKLIST
|AUTOREPLIED
|TO-CHECK
|TO-REVIEW
|BOUNCED
|INVALID
|REPLIED
- activity: Find by prospect action. Valid values:
OPENED
|NOT-OPENED
|CLICKED
|NOT-CLICKED
- interest: Find by prospect interest. Valid values:
INTERESTED
|NOT-INTERESTED
|MAYBE-LATER
|NOT-MARKED
- updated: Find where dates are greater then or less than an updated date. Accepts a diff object
{op: '<', date: new Date}
or a string>2017-01-01
. - opened: Find where dates are greater then or less than an opened date. Accepts a diff object
{op: '<', date: new Date}
or a string>2017-01-01
. - clicked: Find where dates are greater then or less than a clicked date. Accepts a diff object
{op: '<', date: new Date}
or a string>2017-01-01
. - contacted: If the user has been contacted or not.
true
orfalse
- firstName: Search within the prospects
first_name
- lastName: Search within the prospects
last_name
. note that the Woodpecker docs are incorrect.second_name
is invalid. - email: Search within the prospects
email
- company: Search within the prospects
company
- industry: Search within the prospects
industry
- website: Search within the prospects
website
- tags: Search within the prospects
tags
- title: Search within the prospects
title
- phone: Search within the prospects
phone
- address: Search within the prospects
address
- city: Search within the prospects
city
- state: Search within the prospects
state
- country: Search within the prospects
country
- snippet1: Search within the prospects
snippet1
. Can usesnippet1
up tosnippet15
- $limit: Sets the maximum results per page. Defaults to
100
, max of500
- $page: The page to display
- $skip: Amount of results to skip. To be used with
$limit
instead of$page
- $sort: Sort order object. Can be
1
,ASC
|true
|+
, or-1
,DESC
|false
|-
. Defaults toASC
. Available fields:id
,firstName
,lastName
,replied
,status
,updated
,email
,company
,industry
,website
,tags
,title
,phone
,address
,city
,state
,country
,opened
(requires activity.OPENED),clicked
(requires activity.CLICKED)
prospects().newest()
- 100 newest prospects
prospects().replied()
- 100 latest prospects who replied to the email
prospects().opened()
- 100 latest prospects who opened the email
prospects().clicked()
- 100 latest prospects who clicked on the email`
prospects().notContacted()
- 100 latest prospects marked as not contacted
prospects().add(PROSPECT | [PROSPECT])
- Accepts either a single prospect or an array of prospects. Available fields:
firstName
,lastName
,email
,company
,industry
,website
,tags
,title
,phone
,address
,city
,state
,country
,snippet[1-15]
prospects().edit(PROSPECT | [PROSPECT])
- Same as add, but will perform an update if they items exist. Requires
id
for each prospect. All fields mentioned in the request will be updated.
prospects().delete(ID | EMAIL)
- Deletes a prospect by id or email
prospects().blacklist(ID | EMAIL)
- Blacklists a prospect by id or email
campaigns().find({query})
- id: Find by id
- ids: Find by an array of ids
- status: Find by specific status. Valid values:
RUNNING
|PAUSED
|COMPLETED
|DRAFT
|EDITED
|STOPPED
webhooks().subscribe(URL, EVENT)
- Subscribes to an event for the given
URL
andEVENT
. Valid event values:REPLIED
,CLICKED
,OPENED
,BOUNCED
,INVALID
,INTERESTED
,MAYBE-LATER
,NOT-INTERESTED
,AUTOREPLIED
,FOLLOWUP
webhooks().unsubscribe(URL, EVENT)
- Same as above, but unsubscribes
Examples
To get the list of prospects:
Woodpecker
To browse prospects from specific campaigns:
Woodpecker Woodpecker
To browse prospects of a specific status:
Woodpecker Woodpecker
To browse prospects that performed a specific action:
Woodpecker Woodpecker
To browse interest rate:
Woodpecker
To browse a list of prospects who were or were not contacted:
Woodpecker
To browse results of prospects search:
Woodpecker
To browse data of a specific prospect:
Woodpecker
To browse a specific page of data search:
Woodpecker Woodpecker Woodpecker Woodpecker
To sort results:
Woodpecker Woodpecker
To browse only the data updated after specific date (diff):
Woodpecker Woodpecker
Aliases / Shortcuts
Woodpecker Woodpecker Woodpecker Woodpecker Woodpecker
To get campaign list:
Woodpecker
To get campaign list filtered by status:
Woodpecker
To get the details of a specific campaign:
Woodpecker Woodpecker
To add prospects to the campaign:
Woodpecker
To add prospects to the prospects list:
Woodpecker
To edit prospect data:
Woodpecker
To delete the prospect data:
Woodpecker
To delete the prospect from a campaign:
Woodpecker
To change prospect status to BLACKLIST:
Woodpecker
To subscribe to a webhook event
Woodpecker