Installing the SDK
1
Install the SDK
- Bun
- pnpm
- npm
- Yarn
2
Initialize the Client
- With API key
- From env
Initialization
The SDK accepts a token and optional configuration:Config
When
true, enables request logging for debugging.Quick Start
Once initialized, you can start using the SDK immediately:Response Format
All API responses are normalized to a single shape:- Top level: method-specific fields (e.g.
message_id,email_id,domains,metadata). metadata:{ id, timestamp, api_version, object }on every response.
Errors
On API errors the SDK throwsContiguityError (subclass of Error) with message, status (HTTP status), and optional code.
Webhooks
To verify and parse webhook payloads, usecontiguity.webhook.verify() and contiguity.webhook.parse(). See Webhooks for the full reference.
