DocsAPI ReferenceAPI Keys

API Keys

Create and manage API keys.

List keys

code
GET /api/v1/api-keys

Create a key

code
POST /api/v1/api-keys
json
{ "name": "ci-cd", "scope": "deploy" }

Response (201):

json
{
  "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):

ScopeCan doCannot do
readList/inspect projects, logs, metricsAny change
deployCreate/deploy/stop/delete projects, set env, manage domains & databasesManage API keys, billing, teams, BYOC servers, delete account
fullEverything (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

code
DELETE /api/v1/api-keys/:id