FlagdeckFlagdeck
Pricing
Docs
Get Started

Documentation

API keys

Manage your organization API keys. All endpoints require api-keys:read or api-keys:write.

List API keys

GET /v1/api-keys (scope: api-keys:read)

Secrets are never returned; only metadata (name, scopes, status, last used).

Create an API key

POST /v1/api-keys (scope: api-keys:write)

FieldTypeRequired
namestringyes
scopesscope string[]yes
descriptionstringno
expiresAtISO 8601 dateno
restrictionsobject (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.

Rotate an API key

POST /v1/api-keys/{keyId}/rotate (scope: api-keys:write)

Issues a new secret (returned once) and invalidates the old one.

Revoke an API key

POST /v1/api-keys/{keyId}/revoke (scope: api-keys:write)

Disables the key without deleting its audit history.

Delete an API key

DELETE /v1/api-keys/{keyId} (scope: api-keys:write)