Create runtime key
Creates a runtime key for a project environment and returns the raw key once. Store the raw key immediately; future reads return metadata only.
Path parameters
Stable project_ identifier.
Pattern: ^project_.+
Lowercase letters, numbers, and hyphens only.
Length: 1-80Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
Body parameters
Display name for operators and audit history.
Length: 1-80
Runtime capabilities granted to the generated key.
Items: 1+
curl -X POST https://api.featuregate.dev/v1/projects/project_example/environments/production/runtime-keys \
-H "Authorization: Bearer fg_ak_test_0123456789abcdef0123456789abcdef0123456789abcdef" \
-H "Content-Type: application/json" \
-d '{
"name": "Production server",
"scopes": [
"runtime:evaluate",
"runtime:snapshot"
]
}'Returns
Stable API key identifier, prefixed with key_.
Length: 1+
Key creation timestamp.
Last key metadata update timestamp.
Operator-facing key name.
Length: 1+
Non-secret key fingerprint shown for identification.
Length: 1+
Runtime scopes granted to this key.
Owning organisation identifier.
Length: 1+
Bound project identifier.
Length: 1+
Bound environment identifier.
Length: 1+
Creating user, when available.
Length: 1+
Last successful use timestamp, when known.
Revocation timestamp, or null while active.
Length: 1+
{
"runtimeKey": {
"id": "key_example",
"createdAt": "2026-06-18T00:00:00.000Z",
"updatedAt": "2026-06-18T00:00:00.000Z",
"name": "Production server",
"keyPrefix": "fg_sk_test_0123456789abcdef0123",
"scopes": [
"runtime:evaluate",
"runtime:snapshot"
],
"organisationId": "org_example",
"projectId": "project_example",
"environmentId": "env_example",
"createdByUserId": null,
"lastUsedAt": null,
"revokedAt": null
},
"rawKey": "fg_sk_test_0123456789abcdef0123456789abcdef0123456789abcdef"
}Responses