Flags API reference

Flags API · Sdk-Keys

get/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keysAuth

List SDK keys

The SDK keys of this config in this environment, masked (prefix and last four characters): the primary key, and the secondary key while a rotation's grace period runs. The first call for a new environment mints its primary key.

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 masked keys.

data*array

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

Example

Request

GET https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys
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"
    }
  ]
}