The `woodpecker-api` package provides a Promise-based JavaScript client for interacting with the Woodpecker.co email outreach platform's API. It abstracts the underlying HTTP requests, offering a fluent interface for managing prospects, campaigns, and other Woodpecker resources directly from a Node.js application. The current stable version is 1.1.0, and releases appear to be feature-driven rather than on a fixed cadence, with recent updates introducing functionalities such as prospect editing, blacklisting, and webhook subscriptions. A key differentiator of this library is its role as a thin, unopinionated wrapper around the official Woodpecker API, designed to simplify asynchronous operations through the use of Promises. To utilize the library, developers must obtain and provide a valid API key from their Woodpecker.co account dashboard. It primarily targets CommonJS environments, requiring a specific factory function invocation pattern for client instantiation.
npm install woodpecker-apiVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Woodpecker API client, find prospects by various criteria, and access specialized lists like 'newest' and 'replied' prospects, including robust error handling.
Always use `lastName` when querying for prospect last names via this client library.
Ensure `require('woodpecker-api')(process.env.WOODPECKER_API_KEY)` is called with a valid API key, preferably loaded from environment variables for security and flexibility.Implement client-side pagination logic to fetch data in chunks of 500 or less, iterating through `$page` or adjusting `$skip` parameters for larger datasets.
Always wrap API calls in `try...catch` blocks when using `async/await` or attach `.catch()` handlers to Promise chains to properly manage errors.
Initialize the client by passing your Woodpecker API key as a string: `const Woodpecker = require('woodpecker-api')('YOUR_API_KEY');`Invoke `prospects()` as a method to get the query builder: `Woodpecker.prospects().find(...)`
Reduce the `$limit` parameter to 500 or less. For retrieving larger datasets, implement client-side pagination by making multiple requests and incrementing the `$page` or `$skip` parameter.
No dependency data recorded yet.