v4.0.1
📦 Brevo Node.js SDK v4.0
Modernized, TypeScript-first rewrite of the Brevo Node.js client with improved ergonomics, reliability, and runtime support.
🚀 Highlights
- TypeScript-first SDK with full typings and autocomplete
- Single unified client (
BrevoClient) replaces multiple API classes - Built-in retries + timeouts
- Structured error handling
- Works across modern runtimes (Node 18+, Bun, Deno, Workers, RN)
- Legacy v3.x now maintenance-only
Added
New Client Architecture
- Introduced
BrevoClientas the single entry point - Namespaced APIs (e.g.,
brevo.transactionalEmails.*) - Cleaner, discoverable method structure
TypeScript Support
- First-class typings for requests and responses
- Better IDE autocomplete
- Stronger compile-time safety
Reliability Features
- Automatic retries with exponential backoff
- Honors
Retry-Afterheaders - Configurable global and per-request timeouts
Error Handling
- Typed error classes:
BadRequestErrorUnauthorizedErrorNotFoundError- etc.
- Easier branching and debugging vs generic errors
Advanced Configuration
- Custom
fetchsupport (e.g.,undici,node-fetch) - Custom headers
- Abort/cancel requests via
AbortController - Binary response support
Read more at https://developers.brevo.com/docs/api-clients/node-js