Flags API reference

Flags API · Sdk-Keys

delete/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/secondaryAuth

End the grace period

Revokes the secondary key now instead of at its `expires_at`. SDK servers still using it get 404 within about 5 seconds. Recorded in the history (`sdk_key.grace_ended`) and the workspace audit log.

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 left (the primary key).

data*array

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

Example

Request

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