API keys
An API key lets a script, the CLI or an agent act on your workspace with permissions you choose. Each key carries a set of scopes, and a request succeeds only if the key holds every scope its route needs.
Create a key
Open the account menu in the dashboard's top bar and choose API keys.
- Name the key after what will use it, such as
deploy agent. - Choose its permissions. Nothing is ticked to start with. Two presets fill them in:
- Read only: look at apps, databases, jobs and contributed machines, and change nothing.
- Deploy and manage: everything in read only, plus deploying apps and managing databases.
- Choose when it expires: 7 days, 30 days, 90 days (the default) or 1 year.
- Choose Create key.
The key, pvk_…, is shown once. Copy it then; Passive keeps only a hash of it and cannot
show it again. A workspace can have 25 keys.
Three scopes reveal secrets or your customers' data. No preset includes them, and each is ticked on its own, with a warning. Give them only to something you trust with that data.
Scopes
| Scope | Lets a key |
|---|---|
apps:read | Read apps, deployments, events, metrics, domains and logs |
apps:write | Deploy, redeploy, roll back and delete apps; manage domains; attach a database |
apps:secrets | Read and write environment variable values. Sensitive |
db:read | Read databases and their schema, not their contents |
db:data | Read table rows and the SQL console's history. Sensitive |
db:write | Create and delete databases; run SQL |
db:credentials | Read a database's connection string and password. Sensitive |
jobs:read, jobs:write | Read and submit batch jobs |
workers:read | Read the machines your account contributes, and metrics |
crons:write | Manage scheduled jobs |
No scope implies another: apps:write does not grant apps:secrets, and db:read does not
grant db:data or db:credentials. The full table, and which routes no key can call, is in
API key scopes.
A key can never manage API keys, workspace members or billing. Those need you, signed in to the dashboard.
Use it over HTTP
Send the key as a bearer token to https://api.passivedev.com:
curl -H "Authorization: Bearer $PASSIVE_API_KEY" https://api.passivedev.com/apps
The API reference lists every route a key can call and the
scopes each needs; the same document is served at https://api.passivedev.com/openapi.json.
- Errors carry a machine-readable code beside the message: see API errors.
- Retries. Send an
Idempotency-Keyheader on a deploy so that a retry cannot deploy twice: see Idempotency keys. - Rate limits. A key may make 300 reads and 60 writes a minute. Past that it gets
429withRetry-After.
Send keys to api.passivedev.com only, never to an app's own URL (<app>.passivedev.com).
If one is sent there by mistake, Passive removes it before the request reaches the app.
Use it with the CLI
The passive command-line tool is not published as a package yet. If you have Passive's
source, install it from the repository's root with pip install -e ., then:
export PASSIVE_COORDINATOR_URL=https://api.passivedev.com
passive login # asks for the key, checks it, and saves it
passive apps
passive deploy --name my-site --image nginx:1.27-alpine --port 80
The CLI reads the key from --api-key, then PASSIVE_API_KEY, then the file passive login
saved (~/.passive/api-key, readable by you only). passive logout deletes that file. Set
PASSIVE_COORDINATOR_URL as above: without it the CLI talks to a coordinator on your own
machine. It refuses to send a key over plain http:// to anywhere but your own machine.
Agents
An agent connected through the hosted MCP server signs in with OAuth and needs no key: see Connect an agent. The token it gets is itself an API key, listed on the API keys page as signed in, with Disconnect instead of Revoke. How the sign-in works is in OAuth for MCP clients.
Revoke a key
Revoke on the key's row in the API keys page ends it at once. Anything still using it gets
401.