Scopes
What each scope lets a token do, and which ones spend money.
2 min read Updated
A token can do only what its scopes allow. Each operation in the reference lists the scopes it needs, and a request needs all of them. When one is
missing, the answer is 403 insufficient_scope, with every scope the operation needs in requiredScopes and those the
token lacks in missingScopes (see Errors).
Every scope
The token form lists them in these groups, with the same names. A scope marked Money lets the token spend the account's money; Can't be undone lets it delete for good; Code and data opens the sites' files, logins and data.
| Scope | What it allows | Operations today |
|---|---|---|
| Servers | ||
servers:read View servers | See servers, their graphs, snapshots, logs and security (Imunify360). | 10 |
servers:write Manage servers | Power, reboot, snapshots and restores, log settings, restarting PHP, server security (Imunify360), and connecting your own servers. | 31 |
servers:create Create servers | Order new servers and connect servers you already have. They're billed to this account. Money | 1 |
servers:resize Resize servers | Change a server's size, which changes its monthly price. Money | 1 |
servers:delete Delete servers | Destroy servers and every site on them. This can't be undone. Can't be undone | 1 |
| Sites | ||
sites:read View sites | See sites and their domains, CDN, firewall, malware protection, backups, staging, resources, SMTP and Media Offload. SMTP includes who each site's recent emails went to, their subjects, and the team's sign-in addresses. | 26 |
sites:write Manage sites | Domains, SSL, CDN, cache, firewall, malware protection, resources, backups, staging, Media Offload, SMTP and RabbitPress Cache. Choosing Rabbitflare Backup for a site's backups, and turning on Media Offload or a site's malware protection, also need Turn on paid features: they start monthly charges. | 67 |
sites:create Create sites | Install new WordPress sites on your servers. Cloning a site also needs Manage sites. | 5 |
sites:delete Delete sites | Delete WordPress sites, with their files and database. This can't be undone. Can't be undone | 1 |
sites:files Files and logins | File Manager, WordPress logins, cron jobs, backup downloads and backup storage. Full access to the sites' code and data. Code and data | 31 |
| Costs and paid features | ||
billing:read View costs | See what Media Offload's extra storage has cost this month so far. Needs a token for all servers. | Coming |
billing:write Turn on paid features | Turn on site features that are billed to this account each month: Rabbitflare Backup for a site's backups, Media Offload, and a site's malware protection. Needs a token for all servers. Money | 3 |
| Support | ||
support:read View tickets | Read this account's support tickets. | 3 |
support:write Open and answer tickets | Open support tickets and reply to them. | 7 |
| Activity and webhooks | ||
events:read View activity | Read the account's activity: what happened on its servers, sites and more. | 2 |
webhooks:read View webhooks | See webhook endpoints and their deliveries. | 4 |
webhooks:write Manage webhooks | Add, change and remove webhook endpoints. | 6 |
| Account | ||
account:read View account | Read the account's name, email address, features and limits. | 1 |
Some scopes are for parts of the API that are still to come (Coming above): a token can carry them today, and they apply as soon as those operations open.
Presets, and reads with writes
The form starts you with a preset. Full access is every scope your account can give. Read only is every
scope that only looks: account:read, servers:read, sites:read, billing:read, support:read, events:read and webhooks:read.
Custom is the scopes you tick.
A scope that changes things never includes the one that reads them: sites:write doesn't include sites:read. The form ticks the
read scope with it, because most code reads what it changes; a token made for one change only can do without it.
Limit a token to some servers
A token can reach all servers, including new ones, or only the servers you choose (up to 500). A limited token sees and changes only
those servers and the sites on them, everywhere: lists leave the others out, and their ids answer 404 as if they didn't exist. A server it
creates is added to its list.
The limit is about servers, so it doesn't narrow what isn't on one: the account itself, the catalogue, and the account's own activity (a limited token
reads its servers' events and the account's). Its webhook endpoints can only send events of its own servers.
Nor does it narrow backup storage of your own, which belongs to the whole account, as in the panel: a limited token
with sites:files sees and manages all of it, with where each storage points and how many sites of every server back up
to it.
Pick the smallest set
Give each app its own token, with only the scopes its calls need, so a token that leaks can do as little as possible. For example:
- A deploy job that clears a site's cache
-
After each deploy, your CI clears the cache of the site it deployed, so visitors see the new version.
Scopes:
sites:writeCalls: Purge a site's cache
- A monitoring dashboard
-
A screen that shows your servers, their graphs, your sites and what happened lately. It only looks.
Scopes:
servers:read,sites:read,events:readCalls: List servers, Get a server's graphs, List sites, List events
- A snapshot before maintenance
-
A script that takes a snapshot of a server, and waits for it, before you change anything on it.
Scopes:
servers:read,servers:writeCalls: Take a snapshot, Get a server, List a server's snapshots and backups
- An agency's provisioning tool
-
Orders a server for each new client, installs their WordPress site and connects their domain.
Scopes:
servers:read,servers:create,sites:read,sites:write,sites:createCalls: List a cloud's plans, Create a server, Get a server, Create a site, Get a site, Connect a domain to a site
Still have a question?
Our team answers support tickets about the API, and other developers answer in the community.