Version 0.1.0 covers every public endpoint except the MCP server, which AI assistants connect to directly (MCP server). Method names may still change before 1.0.
Install
Send your first email
Create a key under Settings → Developers → API Keys with the Transactional — send scope, and keep it in an environment variable calledINSTANTCAMPAIGN_API_KEY. Both SDKs read that variable when you do not pass a key.
What is covered
For an endpoint a version does not wrap yet, both clients have a low-level
request(method, path, …) that still adds the key, the retries and the typed errors.
Idempotency: safe retries
The API’s idempotency key is theexternalId field on transactional sends and on events. A repeat with the same externalId returns the original result (deduplicated: true, or status: "duplicate" for events) and sends or records nothing. The SDKs’ idempotencyKey / idempotency_key option fills in externalId for you; an externalId you set yourself always wins. There is no Idempotency-Key header.
The SDKs retry on their own only when it is safe:
- 429 Rate limit exceeded, on any request, after the
Retry-Afterthe server sends (a rate-limited request was not processed). - 5xx and network errors, on
GETandDELETEonly.
POST that fails with a 5xx is never retried for you. Send it again with the same externalId. Set maxRetries (TypeScript) or max_retries (Python) to change the number of retries; the default is 2.
Errors
Every error response becomes a typed error withstatus, the API’s machine-readable code, the response body and the request id to quote to support.
InsufficientScopeError. Add the scope to the key from Settings → Developers → API Keys (pencil icon → Edit key); the change applies on the key’s next request.
Pagination
Contacts are paged by number and transactional messages by abefore cursor. The listAll / list_all helpers walk every page for you: