SDKs
Official SDKs are available for JavaScript and TypeScript, Python, Go and PHP. Each provides typed requests and responses, API errors, pagination helpers and webhook verification.
Choose a library
| Language | Install | Requires | Quickstart |
|---|---|---|---|
| JavaScript / TypeScript | npm install @epostix/sdk | Node.js 22+ | Node.js, Next.js |
| Python | pip install epostix | Python 3.11+ | Python |
| Go | go get github.com/epostix/sdk-go | Go 1.26+ | Go |
| PHP | composer require epostix/sdk-php guzzlehttp/guzzle | PHP 8.3+ | PHP, Laravel |
The PHP example installs Guzzle as the HTTP client. You can use another PSR-18 client with PSR-17 factories. Python includes both synchronous and asynchronous clients.
Source and releases: JavaScript, Python, Go, PHP.
Credentials
Pass your API key to the client. The SDK adds the bearer header and uses https://api.epostix.com/v1 by default. Keep the key on a server; never put it in a browser bundle.
Live and test keys use the same base URL. A tix_test_ key simulates email sends. Test mode describes its limits.
Retries and idempotency
SDKs make bounded retries for eligible transient failures, respect Retry-After when it fits the operation deadline, and expose the final error when attempts run out. Authentication, validation and quota errors are not fixed by an immediate retry.
For supported send operations, SDKs generate an idempotency key if you omit one. That protects retries within one SDK call. A second call, a queue redelivery or a process restart gets a new key unless you supply one.
Pass a stable key from your application for those cases:
| SDK | Send option |
|---|---|
| JavaScript | { idempotencyKey: 'order-4821-receipt' } |
| Python | idempotency_key="order-4821-receipt" |
| Go | epostix.WithIdempotencyKey("order-4821-receipt") |
| PHP | idempotencyKey: 'order-4821-receipt' |
The server keeps the result for 24 hours, scoped to the API key, environment, HTTP method and path. Reuse the same body too. See idempotency before building a retry loop.
Errors
SDK calls return the requested object on success. They throw a typed error, or return an error in Go, on failure. Read the API error's type and request ID rather than matching its message. Transport failures may have no API response or request ID.
A timeout does not prove that a send failed. Keep the original idempotency key when resolving an uncertain result. See handling errors.
Webhooks
Use the SDK's verifier with the raw request body and your endpoint's signing secret. It checks the signature and timestamp before decoding the event. See verifying signatures.
Other languages
The API reference and OpenAPI document describe the HTTP contract. You can call it with an HTTP client or generate a client for another language. Check your generator's handling of optional fields, unknown enum values, pagination and retries.
If your application already sends over SMTP, use SMTP credentials. WordPress covers the plugin setup.