Skip to main content

API key types

Pilot Status has three kinds of API key. All of them go in the same x-api-key header, and the prefix tells you which kind a key is.
Keys created before 2026-10-28 keep working. They have the older ps_ + hex format, with no kind in the prefix. A legacy number key is still a number key, and a legacy tenant-scoped key is still a workspace key. You do not need to replace them.

Number keys

Nothing changed here. Each WhatsApp number has one default key, on the API Keys page, which you regenerate (there is no “create another”). It acts only on its own number: a number key on a workspace-only endpoint gets 403 NUMBER_SCOPE_NOT_ALLOWED. See API keys. A number key cannot create numbers. POST /v1/numbers, POST /v1/numbers/meta and POST /v1/numbers/remote-pairing answer it with 403 NUMBER_KEY_CANNOT_CREATE_NUMBER, legacy number keys included. Create numbers with a workspace key or an account key.

Workspace keys

A workspace key is what the docs call a tenant-scoped key: it is bound to the workspace, not to a number. They live on their own screen, Workspace keys (/workspace-api-keys), in the sidebar. Before 2026-10-28 the workspace key was in Profile → API; that tab now holds your account keys. A workspace has two kinds of workspace key:
  • The raw key is shown once, when it is created or regenerated. Store it right away.
  • Your existing tenant-scoped key is the workspace’s primary key.
  • A named key minted by a member is not orphaned when that member leaves: removing them stops with 409 MEMBER_HAS_API_KEYS until the Owner chooses to revoke the key or keep it (details).
  • Through the API, an account key lists, creates and revokes workspace keys with /v1/workspaces/{id}/api-keys, and rotates the primary key with POST /v1/api-keys/regenerate.

Account keys

An account key is yours, not a workspace’s. Any user can create one in Profile → API, up to 20 per user. One key reaches every workspace you are an active member of, and on each request it acts with your current role in the workspace it names: if you are demoted or removed, the key loses that access on the next request. It is the key a reseller uses to create one workspace per end customer and operate all of them with a single credential.

Pick the workspace with x-workspace-id

On every endpoint that acts on a workspace, send the workspace id in x-workspace-id. The ids come from GET /v1/workspaces.
  • Inside that workspace, the key behaves like the workspace’s own key, cut down to your role. A role that does not allow the action gets 403 PERMISSION_DENIED.
  • A member limited to some numbers reaches only those numbers, as in the dashboard.
  • x-whatsapp-number-id narrows the request to one number of that workspace, as with a workspace key. An id that is not a number of that workspace gets 404 NUMBER_NOT_FOUND.
  • x-api-key-id is not supported with an account key. Sending both gets 401 API key headers mismatch.
  • Account keys carry a user. Because of that they can do what a workspace key cannot, such as managing members (according to your role), and they can mint named workspace keys, which OAuth/MCP tokens cannot (an OAuth token used by the workspace Owner can rotate the primary workspace key and number keys — see Secrets and API keys over OAuth).

Errors

An account key is the most powerful credential you can hold. It reaches every workspace you belong to, with your role in each. Keep it on your server only, never in a browser or an app, and revoke it in Profile → API if it leaks.

What each credential can call

OAuth access tokens — issued to MCP connectors and OAuth apps, sent as Authorization: Bearer — are the fourth kind of credential. Like an account key they carry a user, and act with that user’s current role.

Which key to use

Pick the key with the smallest scope that does the job: if it leaks, it can only reach what it was made for.
  • n8n: the credential has one field per header — see Choose the API key.
  • Resellers: see Billing for resellers.
  • A key in the wrong place answers with its kind in the error: 403 NUMBER_SCOPE_NOT_ALLOWED (number key on a workspace endpoint), 403 TENANT_SCOPE_NOT_ALLOWED (workspace or account key with no number on a per-number endpoint), 400 WORKSPACE_ID_REQUIRED (account key with no workspace), 403 ACCOUNT_KEY_REQUIRED (any other key on /v1/workspaces*).