Every API token and every connected assistant has scopes: the kinds of thing it may do. On top of that, it can never do more than your role on the account allows: a viewer who connects an assistant gets a read-only assistant, whatever it asked for.
The scopes
| Scope | Allows | Opt-in |
|---|---|---|
read |
Look at everything: sites, health, logs, deploys, traffic, backups, domains, DNS, email, invoices, the audit log and the team | No |
deploy |
Deploy from git, set build steps, approve, discard or roll back releases | No |
manage |
Site settings (environment, runtime, redirects), connecting domains, staging, cron, backups, webhooks | No |
dns |
DNS records, zone import, DNSSEC, email-domain verification | No |
data |
Opt-in: read-only SQL on site databases, warehouse databases, dashboards, pipelines and jobs | Yes: never granted unless you tick it |
billing |
Opt-in: propose orders that an owner or billing member approves in the portal | Yes: never granted unless you tick it |
Who can give which scope
| Role | Can grant |
|---|---|
| Owner | All of them |
| Admin, developer | read, deploy, manage, dns, data |
| Billing | read, billing |
| Viewer | read |
| Site team member | read, deploy, manage, data, for their sites only |
The Create a token form only offers the scopes your role allows. Every call is also checked against your role as it is at that moment, so if your role changes, what your tokens and assistants can do changes with it straight away.
Actions that ask first
A few actions cannot be undone, so an AI assistant must ask you first: the first call only explains what will happen and returns a confirmation that is valid for ten minutes; the second call, made after you said yes, does it. (A script using a personal API token is not asked, except that a destructive warehouse statement needs "confirmed": true in the request.) They are approving a release, rolling back a release, enabling DNSSEC, dropping a warehouse database, and a warehouse statement that removes data, such as DROP, TRUNCATE or a DELETE without WHERE.
An assistant never restores a backup by itself: it gives you a link, and you confirm the restore in the portal.
Things only you can do, in the portal
Deleting a site; creating API tokens; changing the team; and paying. An assistant also leaves changing a domain's nameservers to you. It sends you a link for each of these.
A DNS zone has no delete button, for you or an assistant. It is removed when you disconnect its domain from the site that uses it (unless email or another site still uses the domain). To remove any other zone, contact us.