API keys allow your application to authenticate against the Swisstools Feature Flags SDK endpoint (Documentation Index
Fetch the complete documentation index at: https://docs.swisstools.dev/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/flags/:recordId) without a user session. Each key is scoped to the project it was created in — it can only resolve flag values for records that belong to that project.
The raw key value is returned only once at creation time and is never retrievable again. After creation, the dashboard shows only a short prefix (e.g., fk_2a9bX1c…) so you can identify keys without exposing the full secret.
All API key management endpoints require session authentication. See Authentication for details.
List API Keys
GET /api/projects/:projectId/api-keys
Returns all API keys for the project. The rawKey field is not included in list responses — only the prefix and metadata are returned.
Path Parameters
The project’s public reference ID (KSUID), shown in Project settings → General.
Create API Key
POST /api/projects/:projectId/api-keys
Creates a new API key for the project and returns the full key value. Store it immediately — this is the only time the complete key is shown.
Path Parameters
The project’s public reference ID (KSUID), shown in Project settings → General.
A label for the key (e.g.,
Production, CI, Staging). Helps you identify keys in the dashboard.Optional ISO 8601 expiration timestamp. Omit or send
null for a key that never expires; past timestamps are rejected with 400.201 Created
Revoke API Key
DELETE /api/projects/:projectId/api-keys/:keyId
Immediately revokes the key. Any requests made with this key after revocation will be rejected with 401 Unauthorized. This action cannot be undone — create a new key if you need to replace it.
Path Parameters
The project’s public reference ID (KSUID), shown in Project settings → General.
The
id (UUID) of the API key to revoke, from the list response.API Key Object
UUID that uniquely identifies the API key record. Used as
:keyId when revoking.Internal ID of the project this key is scoped to.
The label you gave the key when you created it.
The full API key string, prefixed with
fk_. Only present in the creation response.The first 10 characters of the key (e.g.,
fk_2a9bX1c). Shown in list responses to help identify keys without exposing the secret.ISO 8601 timestamp when the key expires, or
null if it never expires.ISO 8601 timestamp of the most recent authenticated request using this key, or
null if the key has never been used.ISO 8601 timestamp of when the key was revoked, or
null if it is still active.ISO 8601 timestamp of when the key was created.