Creates an SDK key in the resolved environment.
const url = 'https://api.featureflip.io/api/v1/orgs/example/projects/example/environments/example/sdk-keys';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"name":"Production server key","description":"Used by the checkout backend.","type":"ServerSide"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.featureflip.io/api/v1/orgs/example/projects/example/environments/example/sdk-keys \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Production server key", "description": "Used by the checkout backend.", "type": "ServerSide" }'Requires at least Member. Returns the plaintext key exactly once — see the type-level remarks.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”Request body for POST /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys.
Type is a bare string (“ClientSide” or “ServerSide”) — the controller parses it
against a NAME allowlist (not a bare TryParse1(ReadOnlySpan{Char},Boolean,0@), which would
silently accept a numeric string like "0") before dispatching. Named distinctly from
the dashboard’s own CreateSdkKeyRequest — both
controllers share one Swagger document, and an identical type name in either namespace throws
a schemaId collision at --export-openapi time.
object
Allowed values: ClientSide, ServerSide.
Example
{ "name": "Production server key", "description": "Used by the checkout backend.", "type": "ServerSide"}Request body for POST /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys.
Type is a bare string (“ClientSide” or “ServerSide”) — the controller parses it
against a NAME allowlist (not a bare TryParse1(ReadOnlySpan{Char},Boolean,0@), which would
silently accept a numeric string like "0") before dispatching. Named distinctly from
the dashboard’s own CreateSdkKeyRequest — both
controllers share one Swagger document, and an identical type name in either namespace throws
a schemaId collision at --export-openapi time.
object
Allowed values: ClientSide, ServerSide.
Example
{ "name": "Production server key", "description": "Used by the checkout backend.", "type": "ServerSide"}Request body for POST /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys.
Type is a bare string (“ClientSide” or “ServerSide”) — the controller parses it
against a NAME allowlist (not a bare TryParse1(ReadOnlySpan{Char},Boolean,0@), which would
silently accept a numeric string like "0") before dispatching. Named distinctly from
the dashboard’s own CreateSdkKeyRequest — both
controllers share one Swagger document, and an identical type name in either namespace throws
a schemaId collision at --export-openapi time.
object
Allowed values: ClientSide, ServerSide.
Example
{ "name": "Production server key", "description": "Used by the checkout backend.", "type": "ServerSide"}Responses
Section titled “Responses”Created
Response body for a successful POST .../sdk-keys. The ONLY place the plaintext
Key is ever returned — PublicSdkKeyResponse (list/get) carries just
LastFourCharacters. Built directly from CreateSdkKeyResult rather than a
re-fetch (unlike FeatureFlagsController.Create’s re-fetch pattern) because the
plaintext key only ever exists on the create result — a subsequent
GetSdkKeyQuery can’t recover it.
object
Allowed values: ClientSide, ServerSide.
Example
{ "id": "0197b6a2-4d5e-7f6a-9b7c-8d9e0f1a2b3c", "key": "ff_server_9f8e7d6c5b4a39281706f5e4d3c2b1a0", "lastFourCharacters": "b1a0", "type": "ServerSide", "name": "Production server key", "createdAt": "2026-06-01T12:00:00Z", "warning": "Store this key securely — it will not be shown again."}Headers
Section titled “Headers”The maximum number of requests permitted per rate-limit window for this caller.
The number of requests remaining in the current rate-limit window.
The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.
Bad Request
The frozen public-API error contract. error codes are stable snake_case strings. Wire keys
are frozen snake_case too (error, message, docs_url, fields,
retry_after) — the global camelCase naming policy would otherwise emit
docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName
always wins over the policy, so these are pinned explicitly rather than relying on the
property names already being lowercase for the single-word ones.
did_you_mean and next_actions are ADDITIVE optional keys (null → omitted via
the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies
are byte-for-byte unchanged when they’re absent.
object
object
object
Example
{ "error": "not_found", "message": "Flag 'new-checkout-flw' was not found in project 'checkout'.", "docs_url": "https://featureflip.io/docs/management-api/errors/not_found", "did_you_mean": [ "new-checkout-flow" ], "next_actions": [ { "method": "GET", "path": "/api/v1/orgs/acme/projects/checkout/flags" } ]}Headers
Section titled “Headers”The maximum number of requests permitted per rate-limit window for this caller.
The number of requests remaining in the current rate-limit window.
The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.
Authentication is required, or the supplied API token is invalid or expired.
The frozen public-API error contract. error codes are stable snake_case strings. Wire keys
are frozen snake_case too (error, message, docs_url, fields,
retry_after) — the global camelCase naming policy would otherwise emit
docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName
always wins over the policy, so these are pinned explicitly rather than relying on the
property names already being lowercase for the single-word ones.
did_you_mean and next_actions are ADDITIVE optional keys (null → omitted via
the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies
are byte-for-byte unchanged when they’re absent.
object
object
object
Example
{ "error": "not_found", "message": "Flag 'new-checkout-flw' was not found in project 'checkout'.", "docs_url": "https://featureflip.io/docs/management-api/errors/not_found", "did_you_mean": [ "new-checkout-flow" ], "next_actions": [ { "method": "GET", "path": "/api/v1/orgs/acme/projects/checkout/flags" } ]}Headers
Section titled “Headers”The maximum number of requests permitted per rate-limit window for this caller.
The number of requests remaining in the current rate-limit window.
The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.
Forbidden
The frozen public-API error contract. error codes are stable snake_case strings. Wire keys
are frozen snake_case too (error, message, docs_url, fields,
retry_after) — the global camelCase naming policy would otherwise emit
docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName
always wins over the policy, so these are pinned explicitly rather than relying on the
property names already being lowercase for the single-word ones.
did_you_mean and next_actions are ADDITIVE optional keys (null → omitted via
the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies
are byte-for-byte unchanged when they’re absent.
object
object
object
Example
{ "error": "not_found", "message": "Flag 'new-checkout-flw' was not found in project 'checkout'.", "docs_url": "https://featureflip.io/docs/management-api/errors/not_found", "did_you_mean": [ "new-checkout-flow" ], "next_actions": [ { "method": "GET", "path": "/api/v1/orgs/acme/projects/checkout/flags" } ]}Headers
Section titled “Headers”The maximum number of requests permitted per rate-limit window for this caller.
The number of requests remaining in the current rate-limit window.
The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.
Not Found
The frozen public-API error contract. error codes are stable snake_case strings. Wire keys
are frozen snake_case too (error, message, docs_url, fields,
retry_after) — the global camelCase naming policy would otherwise emit
docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName
always wins over the policy, so these are pinned explicitly rather than relying on the
property names already being lowercase for the single-word ones.
did_you_mean and next_actions are ADDITIVE optional keys (null → omitted via
the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies
are byte-for-byte unchanged when they’re absent.
object
object
object
Example
{ "error": "not_found", "message": "Flag 'new-checkout-flw' was not found in project 'checkout'.", "docs_url": "https://featureflip.io/docs/management-api/errors/not_found", "did_you_mean": [ "new-checkout-flow" ], "next_actions": [ { "method": "GET", "path": "/api/v1/orgs/acme/projects/checkout/flags" } ]}Headers
Section titled “Headers”The maximum number of requests permitted per rate-limit window for this caller.
The number of requests remaining in the current rate-limit window.
The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.
Rate limit exceeded. Retry after the interval indicated by the Retry-After header.
The frozen public-API error contract. error codes are stable snake_case strings. Wire keys
are frozen snake_case too (error, message, docs_url, fields,
retry_after) — the global camelCase naming policy would otherwise emit
docsUrl/retryAfter, breaking the published spec. !:JsonPropertyName
always wins over the policy, so these are pinned explicitly rather than relying on the
property names already being lowercase for the single-word ones.
did_you_mean and next_actions are ADDITIVE optional keys (null → omitted via
the global DefaultIgnoreCondition = WhenWritingNull), so pre-existing error bodies
are byte-for-byte unchanged when they’re absent.
object
object
object
Example
{ "error": "not_found", "message": "Flag 'new-checkout-flw' was not found in project 'checkout'.", "docs_url": "https://featureflip.io/docs/management-api/errors/not_found", "did_you_mean": [ "new-checkout-flow" ], "next_actions": [ { "method": "GET", "path": "/api/v1/orgs/acme/projects/checkout/flags" } ]}Headers
Section titled “Headers”Number of seconds to wait before retrying the request.
The maximum number of requests permitted per rate-limit window for this caller.
The number of requests remaining in the current rate-limit window.
The UTC time at which the current rate-limit window resets, as a Unix timestamp in seconds.