Use the typed PostlyBee client from Node.js and TypeScript.
The PostlyBee SDK wraps all current Public API operations with a user-token client and Workspace-scoped resources.
Install
npm install postlybee
Node.js 18 or newer is required because the SDK uses the native Fetch, FormData, and Blob APIs.
Initialize
import { PostlyBee } from 'postlybee';const client = new PostlyBee(process.env.POSTLYBEE_API_TOKEN!);const workspaces = await client.workspaces();const workspace = client.workspace(workspaces[0].id);
Create the token from Settings → Public API with workspaces:read and the scopes required by your integration.Self-hosted installations can override the backend origin:
const client = new PostlyBee(process.env.POSTLYBEE_API_TOKEN!, { baseUrl: 'https://api.example.com',});