Flags API reference

Flags API · Sdk-Keys

get/v1/workspaces/{workspace_id}/sdk-keysAuth

List the SDK keys of a workspace

Every live SDK key in this workspace, newest first, masked (prefix and last four characters), each with its project, config and environment. A secondary key is listed until its grace period ends. A config and environment that nobody has read keys for yet has no key here: listing that pair mints its primary key.

Path parameters

workspace_id*string · uuid

Id of the workspace.

Query parameters

cursorstring

Opaque cursor for pagination: the `next_cursor` of the previous page.

limitinteger

Page size.

Response · 200 A page of keys.

data*array

Live keys, newest first.

pagination*object

The cursor for the next page.

Example

Request

GET https://api.flags.productcraft.co/v1/workspaces/{workspace_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",
      "id": "00000000-0000-0000-0000-000000000000",
      "project_id": "00000000-0000-0000-0000-000000000000",
      "project_name": "Web app",
      "config_id": "00000000-0000-0000-0000-000000000000",
      "config_name": "main",
      "environment_id": "00000000-0000-0000-0000-000000000000",
      "environment_name": "Production",
      "environment_protected": true
    }
  ],
  "pagination": {}
}