API Reference
API Keys
Create and manage API keys.
List keys
GET
/api/v1/api-keysCreate a key
POST
/api/v1/api-keys{ "name": "ci-cd", "scope": "deploy" }Response (201):
{ "api_key": "sm_live_abc123...", "info": { "id": "...", "name": "ci-cd", "prefix": "sm_live_abc1", "scope": "deploy" }}The full key is only returned at creation. Store it securely.
Scopes
Keys carry one of three scopes (default full):
| Scope | Can do | Cannot do |
|---|---|---|
read | List/inspect projects, logs, metrics | Any change |
deploy | Create/deploy/stop/delete projects, set env, manage domains & databases | Manage API keys, billing, teams, BYOC servers, delete account |
full | Everything (same as the dashboard) | — |
Use a deploy key in CI: even if it leaks, it can't mint new keys or delete your account. A key can only create another key at the same or lower scope, and only a full session can create a full key. Requests below the required scope get 403.
Delete a key
DELETE
/api/v1/api-keys/:idWas this page helpful?
