Flags API reference

Flags API · Sdk-Keys

post/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/revealAuth

Reveal SDK keys

The full primary key, and the secondary key while a grace period runs. Needs `flags.sdk_key.reveal`; every call is recorded in the history (`sdk_key.revealed`) and the workspace audit log. Never cached. Whoever holds a key can download the whole config of this environment: keep server keys server-side.

Path parameters

config_id*string · uuid

Id of the config.

environment_id*string · uuid

Id of an environment of the same project.

workspace_id*string · uuid

Id of the workspace.

Response · 200 The full keys.

data*array

The primary key, then the secondary key while a grace period runs.

Example

Request

POST https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/reveal
Authorization: Bearer YOUR_TOKEN

Response

{
  "data": [
    {
      "slot": {},
      "key_prefix": "pcf_sdk_4fQx",
      "last4": "k9Zt",
      "created_at": "2026-01-01T00:00:00.000Z",
      "expires_at": "2026-01-01T00:00:00.000Z",
      "key": "pcf_sdk_4fQxV2mB8cJ0nR7tW1yZ3aD5gH6kL9pS0q1Uk9Zt"
    }
  ]
}