Get started
Authentication and API keys
The kinds of API key, the endpoints each one opens, and how to send, rotate, and revoke a key.
Kinds of key
Every request authenticates with an API key. Only an Owner or Admin on your team can create or revoke one. Each kind of key opens only the endpoints below; any other endpoint refuses it with the same 401 it gives a wrong or revoked key.
| Key | Starts with | Created in | Opens |
|---|---|---|---|
| Full access | pk_live_ | Settings > API & Webhooks, Create API key, with Access set to Full access | Dynamic Audience API (POST /api/v1/recipients) and Formula MCP server |
| Integration | pk_int_ | The integration's page, New key | Its own integration's Integrations push API and Integrations MCP server |
Give an AI client only an integration key or a Formulas only key, never a Full access key: a Full access key sends recipients, which mails cards and charges your team.
Send a key
- The Dynamic Audience API (
POST /api/v1/recipients) takes the key in theAuthorization: Bearerheader (preferred), in anX-API-Keyheader, or in anapi_keyfield in the JSON body for senders that cannot set headers. - The Integrations push API and the MCP servers take the key in the
Authorization: Bearerheader only. - Never put a key in a URL or a query string.
Keep keys in your own systems: an environment variable or a secrets manager, never your source code. The samples in these docs read POSTAGED_SEND_KEY for a Full access key, POSTAGED_API_KEY for an integration key, and POSTAGED_FORMULAS_KEY for a Formulas only key.
Dynamic Audience API
Authorization: Bearer $POSTAGED_SEND_KEYPush API and Integrations MCP server
Authorization: Bearer $POSTAGED_API_KEYRotate a key
- Create the new key.
- Switch your system to it.
- Revoke the old key.
A team holds at most 10 active Full access and Formulas only keys, and each integration at most 2 active keys of its own. Integration keys don't count toward the team's 10. Revoke a key you no longer use to make room for a new one.
Revoke a key
Revocation is immediate. Revoke a Full access or Formulas only key in Settings > API & Webhooks, and an integration key on that integration's page. As the revoke dialog says: "Any system using this key will stop working immediately. Mail already queued will still send."