Developers/Reference

SDKs

Both SDKs are generated from the OpenAPI document: one method per operation, grouped by resource, with the client plumbing (bearer key, JSON, problem details as errors, Idempotency-Key, rate limit headers, cursor pagination) and webhook signature verification.

TypeScript (@postbuddy/sdk)

Shell
npm install @postbuddy/sdk
TypeScript
import { PostBuddyClient, PostBuddyError } from '@postbuddy/sdk';

const client = new PostBuddyClient({ apiKey: process.env.POSTBUDDY_API_KEY! });
const page = await client.templates.list({ query: { limit: 20 } });

Node 18+ and browsers (bring the key only to trusted code). The client talks to https://api.postbuddy.nl unless you pass baseUrl. client.call(...) returns status, request id and rate limit information next to the data; client.paginate(client.templates.list, { query: { limit: 100 } }) iterates every row of a cursor-paged list. Every request times out after 30 seconds (timeoutMs on the client or per call) with a PostBuddyError whose code is request_timeout; pass signal to cancel a request, which then rejects with the standard AbortError.

Python (postbuddy)

Shell
pip install postbuddy
Python
from postbuddy import Client

client = Client(api_key)
page = client.templates.list(query={"limit": 20})

Python 3.9+, no dependencies. The client talks to https://api.postbuddy.nl unless you pass base_url. client.call(...) returns a CallResult; client.paginate(client.templates.list, query={"limit": 100}) iterates every row of a cursor-paged list. Requests time out after 30 seconds (timeout on the client or per call, in seconds) with PostBuddyTimeoutError, a PostBuddyError with code request_timeout that is also a TimeoutError.

Other languages

Generate a client from the OpenAPI document with the generator of your choice; the document carries the error codes, the list parameters and the rate limit classes. Apex examples and a Postman collection follow with the Salesforce release.