50% off all paid plans: use code BLACKFRIDAY at checkout, until November 30. Get the deal

Developers

API keys and scopes

Create API keys that can do only what they need, understand every scope, revoke keys safely, and manage keys created by connected apps.

Every request to the Pigeonify API is authenticated with an API key. Each key carries a set of scopes: the things it is allowed to do. Give each key only what it needs, so that a leaked key can do as little harm as possible.

Who can manage keys

The account owner and admins can create and revoke keys. Team members can see the API Keys page but cannot create or revoke anything. See Team accounts.

Keys belong to the account, not to the person who created them. Removing someone from the team does not revoke the keys they made.

Creating a key

  1. Go to API Keys in the sidebar.
  2. Click Create API Key.
  3. Enter a Key Name that says where it will be used, for example "Production backend" or "CRM sync".
  4. Under What this key can do, tick the scopes it needs. Only send is ticked to begin with.
  5. Click Create Key.
  6. Copy the key from Your API Key and store it somewhere safe, such as your secrets manager or an environment variable. Then click Done.

The full key is shown only once. Keys start with pgn_. Afterwards the list shows only the first few characters, which is enough to recognise a key but not to use it. If you lose a key, revoke it and create a new one.

Scopes cannot be changed after a key is created. To give an integration more or less access, create a new key with the right scopes, switch the integration over, then revoke the old one.

Using a key

Send it in either header:

X-API-Key: pgn_your_api_key
Authorization: Bearer pgn_your_api_key

Never put a key in code that runs in a browser or a mobile app, and never commit it to a repository.

Scopes

Scope Allows
send Send email through /v1/send
contacts:read Look up contacts
contacts:write Create, update and delete contacts
lists:read Read lists and who is on them
lists:write Create lists and change who is on them
segments:read Read segments, their members and counts
segments:write Create, change and delete segments
events:write Record events, which can start automations. Creates the contact if needed
webhooks:manage Create and change delivery webhooks
suppressions:read Read the suppression list
suppressions:write Add addresses to the suppression list, and remove ones added by hand or by the API
automations:read Read automations and how many people are in each
automations:write Create, change, switch on and delete automations, which send email to your contacts
campaigns:read Read campaigns, their stats and A/B test results
campaigns:write Create, change, delete and send campaigns, which email your contacts

Rules worth knowing

  • Write includes read, for the same thing only. contacts:write can also read contacts, but it cannot read lists. There is no separate read scope for events or webhooks.
  • Scopes that send mail. send, automations:write and campaigns:write can all cause email to go out. Suppressed addresses are always skipped, and campaigns and automations reach only contacts who can be mailed, but treat these keys with the most care.
  • events:write can create contacts. An event for an address Pigeonify has not seen creates that contact.
  • suppressions:write cannot opt anyone back in. It can only remove suppressions that were added by hand or through the API. An unsubscribe, bounce or complaint belongs to the recipient and cannot be removed this way. See Suppressions and unsubscribes.
  • Keys created before scopes existed are send-only. They keep working for sending and nothing else. For anything more, create a new key.

The Can column in the key list shows each key's scopes, so you can see at a glance what a key would expose if it leaked.

When a key lacks a scope

The API answers 403 with the code insufficient_scope, and details names the scope needed and the scopes the key has:

{
  "error": "This key does not have the contacts:write scope.",
  "code": "insufficient_scope",
  "details": "Create a key with contacts:write under API Keys. This key has: send."
}

Create a new key with the scope it needs; an existing key's scopes cannot be changed.

Revoking a key

  1. Go to API Keys.
  2. Click the bin icon next to the key and confirm.

The key stops working immediately and cannot be restored. It stays in the list with the status Revoked, so you keep a record of it. Requests made with it get 401 with the code invalid_api_key.

Use the Last Used column to find keys nobody uses any more, and revoke them.

Keys created by connected apps

When you connect an AI assistant such as Claude through its sign-in flow, Pigeonify creates a key for it with the permissions you approved. It appears in the list as the app's name followed by "(connected app)".

  • It works like any other key and carries only the scopes you ticked.
  • It expires after an hour and is renewed automatically by the app. If the app is not used for 90 days, you need to connect it again.
  • To disconnect the app, revoke its key here. The app cannot renew it after that.

See MCP and AI assistants.

Rate limits

Limits are per account, so creating more keys does not raise them:

  • Management API (contacts, lists, segments, events, suppressions, automations, campaigns, webhooks): 300 requests per minute.
  • Sending through /v1/send: 100 requests per minute and 3 per second.

Each limit is also applied per IP address. A request over the limit gets 429 with rate_limited and a Retry-After header.

Still stuck?

Email us and a person will reply.

support@pigeonify.com