Documentation
Manage your organization API keys. All endpoints require api-keys:read or
api-keys:write.
GET /v1/api-keys (scope: api-keys:read)
Secrets are never returned; only metadata (name, scopes, status, last used).
POST /v1/api-keys (scope: api-keys:write)
| Field | Type | Required |
|---|---|---|
name | string | yes |
scopes | scope string[] | yes |
description | string | no |
expiresAt | ISO 8601 date | no |
restrictions | object (IP blocklist, rate limit) | no |
The full key is returned once in the response. Store it immediately.
bash
curl -X POST https://api.flagdeck.com/v1/api-keys \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "CI deploy key", "scopes": ["projects:read", "flags:write"] }'
A key can only grant scopes that the key creating it already holds.
POST /v1/api-keys/{keyId}/rotate (scope: api-keys:write)
Issues a new secret (returned once) and invalidates the old one.
POST /v1/api-keys/{keyId}/revoke (scope: api-keys:write)
Disables the key without deleting its audit history.
DELETE /v1/api-keys/{keyId} (scope: api-keys:write)