Install the SDK

Add the official Node, Python, or Ruby SDK — or call the API directly.

You can integrate in whichever way fits your stack. The official SDKs (all published as `unitpost`) wrap the same REST API with idempotent retries, typed responses, and a `{ data, error }` result shape — or skip the dependency entirely and call the HTTP API directly with cURL or your language's HTTP client.

1. Add the SDK

Pick your language tab. The API tab needs nothing installed — any HTTP client works.

Bash
# No package to install — call the REST API with any HTTP client.
# Keep your key in an environment variable:
export UNITPOST_API_KEY="pk_live_..."

2. Initialize the client

Construct a client once and reuse it. Each SDK reads UNITPOST_API_KEY from the environment by default, or you can pass the key explicitly. Never hard-code a key in source you commit.

cURL
# Every request carries your key as a Bearer token plus a User-Agent.
curl https://www.unitpost.com/api/v1/emails \
  -H "Authorization: Bearer $UNITPOST_API_KEY" \
  -H "Content-Type: application/json" \
  -H "User-Agent: my-app/1.0"

Keys live in the environment

Store your API key in an environment variable (UNITPOST_API_KEY) or your secrets manager — not in committed source. Scope it to Sending if the integration only sends mail. See Quickstart for creating and scoping keys.

That's it — you're ready to send. Head to the Quickstart to make your first request, or jump straight to Templates & variables.