API keys and scopes
Create named, scoped API keys with optional expiry and IP allowlist, and know which scopes need an expiry.
An API key belongs to you, not to a company. Create keys on the API keys tab of Integrations, which shows in every workspace and needs no site license. Name them, pick scopes, and set an expiry and an IP allowlist if you want them. WP Waterfall shows the secret once and stores a SHA-256 hash. The list shows the prefix and the last-used time, which updates on each successful call.
Create a key
- Open Account settings, then Integrations, then the API keys tab. It is the same list whichever workspace you are in, and you need no company permission to make your own keys.
- Choose Create key, name it, and pick scopes. If you have not entered your password in the last 10 minutes, WP Waterfall asks for it before it makes the key, so a stolen session cannot make a key that outlives it. If you sign in with Google, GitHub, or your company's provider, set a password first in Account settings.
- Under Companies, keep All my companies (the default, which includes companies you join later), or choose Only these companies and tick them. The list shows which companies each key reaches. Set an expiry and an IP allowlist if you want them. Each allowlist entry is one address, such as
203.0.113.5, or a range, such as203.0.113.0/24. A call from any other address gets a 401, and WP Waterfall refuses an entry it cannot read when you make the key. - Copy the secret now. It starts with
wpw_live_orwpw_test_. A key made before November 14, 2026 starts withhk_live_orhk_test_and works until it expires or you revoke it. The screen says which companies the key reaches. WP Waterfall emails you that a key was created.
Which company a call uses
A call names its company in the X-Company-Id header. The header is optional when the key reaches exactly one company. A key that reaches several companies and sends no header gets a 400 with company_required. A company the key does not list, or one you have left, gets a 403 with company_not_allowed.
The local MCP server takes the WPWATERFALL_COMPANY_ID variable and sends the header for you.
What a key may do in a company is your role in that company at the moment of the call. A key never does more than you can there, and a scope must be one your role may hold in at least one company the key reaches. You can hold 50 active keys in all.
Scopes
| Scope | Use |
|---|---|
sites:read |
Read sites (and GET /v1/companies/me). |
sites:write |
Change sites. |
backups:write |
Create backups. |
backups:restore_live |
Restore onto live. |
users:read |
Read members and invitations (GET /v1/companies/me/members, GET /v1/companies/me/invitations). |
users:write |
Invite and change members. |
activity:read |
Read the company activity log (GET /v1/companies/me/activity), a site's activity (GET /v1/sites/{id}/activity), and export the log (GET /v1/audit/export). |
billing:read |
Read billing, subscriptions, usage, and invoices. This includes the add-ons summary (GET /v1/companies/me/add-ons/summary), which names the sites and environments that hold each add-on, with counts and no secrets. |
billing:write |
Buy, change, and cancel site licenses, buy add-ons, and move a site to another license. |
domains:read |
Read domains. |
dns:write |
Change DNS. |
danger:destroy |
Destroy resources. Restricted. |
webhooks:read |
Read webhook endpoints and their deliveries. |
webhooks:write |
Create, change, and delete webhook endpoints. |
Four more scopes exist, and you never see them in this dialog: keys:read, keys:write, ssh-keys:read, and ssh-keys:write. Only the connection of an AI assistant can hold them, and an approved connection has them as part of its full access, within what your role allows. A request to create a key with one answers 422 with "Create and remove API keys and SSH keys are scopes for AI assistant connections only." A plain API key that somehow carried one cannot use it. See Keys made by an assistant.
Through the API a key lasts one year unless you choose a shorter expiry. The dialog offers 30 days, 90 days, or 1 year, and suggests 90 days. Through the API, an expiry further out than a year needs confirm: true, and no key can last longer than three years. Keys made before expiry was required got an expiry of one year from the day it started, and the owners received a notice. The list shows how many days old each key is, so you can retire the old ones.
The create dialog groups the scopes in plain words: your sites, backups, billing, domains and DNS, webhooks, support, and team. danger:destroy is not in those groups. It has its own box at the bottom, described under Delete and reset. Jobs have no scope of their own. Reading jobs (GET /v1/jobs and a job's events) uses sites:read, and waiting on a backup or a deploy needs nothing more.
Keys made by an assistant
An assistant you connected can make and remove API keys for you, in two steps with your yes in the chat. Such a key holds a subset of your role's scopes, never danger:destroy or the key scopes, always expires (30 days by default, 365 at most), and belongs to you. A scope outside your role answers 422 with the list of scopes that are not allowed. The key an assistant works with is marked in the list, and removing it ends that connection. See MCP connections.
Servers
No API key can hold a scope for servers. Not an Owner, not an Admin, and not WP Waterfall staff. A request to create a key with one answers 422 with "Node scopes cannot be given to an API key." You see your own servers in the dashboard, signed in as you.
Delete and reset
danger:destroy lets a key delete or reset sites and environments. The create dialog shows it as its own block under the list, headed Delete and reset, with one tickbox, Allow deleting and resetting sites.
- The box is off by default. No shortcut ticks it, and ticking every scope above it leaves it off.
- It needs two-factor authentication. Without it the box is off and says "Turn on two-factor authentication before you make a key with danger:destroy." A link opens the Security settings. The API enforces the same rule and answers 403.
- A key with this scope needs an expiry. Pick a date in the dialog. With No expiry chosen, the dialog tells you to choose one, and the API answers 422 with "danger:destroy requires an expiry."
- Your role sets the ceiling. A key never does more than you can.
An AI assistant connection has no box for this. Deleting a site or a preview environment through one works in two steps and needs you to type its exact name in the chat. See MCP server.
Revoke a key
Choose the key in the list and revoke it. Revocation takes effect within 5 seconds.
When the person who made a key leaves
A key acts as the person who made it and never does more than they can. WP Waterfall looks at where that person stands in the named company each time the key is used (it remembers the answer for at most 30 seconds):
- Removed from a company. The key stops working in that company within 30 seconds and still works in the others. A company owner cannot list or revoke a member's key, but the activity log shows each use by name.
- Left every company the key reaches, or the account deleted. The key is revoked. The list shows it as stopped with the reason creator left. There are no keys that belong to a company instead of a person.
- Role lowered. In that company, the key keeps only the scopes the new role may hold. The list marks it Limited by the creator's role and shows what it can still do. If the new role holds none of its scopes, the key is revoked with the reason role changed.
- Account locked out. A two-factor lockout refuses the key until the lock ends. The key is not revoked.
- Made site scoped. A key reaches every site in the company. If its creator becomes a Site Admin or Site Developer, the key stops working and is revoked with the reason role changed.
A scope covers many routes, and a key may call a route only if its creator's role holds that route's permission too. A Developer's key with sites:write can run tools and deploy, but it cannot add site members, because a Developer cannot do that in the dashboard.
You can read the reasons in the key list (revoked_reason and effective_scopes in GET /v1/api-keys).
Why can I not see the secret again, or pick danger:destroy?
WP Waterfall stores only a hash, so create a new key. For danger:destroy, turn on two-factor authentication, set an expiry, and hold a role that allows it.
API
GET /v1/api-keysPOST /v1/api-keysGET /v1/api-keys/current
These routes act on your own keys whichever workspace is selected. A key has company_ids: a list, or null for every company you belong to. Send company_ids when you create a key to limit it.
DELETE /v1/api-keys/{id}
An AI assistant connection may also call the first, second, and fourth route, as the person who approved it. A call that changes a key needs confirm: true (a query parameter on DELETE), and revoking the key the connection acts with also needs confirm_self=true.
Related
Still stuck?
Email support at wpwaterfall dot com with your site name and what you tried, or send us a message.