Flags API.
The management API the console and the MCP server use, and the public config delivery route. Every endpoint, request and response, generated from the live OpenAPI spec.
Base URL
https://api.flags.productcraft.coAuth
Authorization: Bearer …Spec version
OpenAPI spec
https://api.flags.productcraft.co/docs-jsonDelivery
The public config download SDKs poll: `GET /v1/configs/{sdk_key}/config.json` with ETag/304, compressed bodies and CORS for browsers. Authenticated by the SDK key alone; not part of the management client.
Change-Requests
Agents propose, humans approve: a change request holds a proposed value change (or a ramp) with its diff, author and note until reviewers who are people, not its author, approve it; then it is applied through the normal versioned write. Environments choose who must propose (`approval_policy`: everyone, or API keys and AI agents only) and how many approvals a change needs.
- get
/v1/workspaces/{workspace_id}/change-requestsList change requests - post
/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/change-requestsPropose a change - get
/v1/workspaces/{workspace_id}/change-requests/{change_request_id}Get a change request - post
/v1/workspaces/{workspace_id}/change-requests/{change_request_id}/approveApprove a change request - post
/v1/workspaces/{workspace_id}/change-requests/{change_request_id}/rejectReject a change request - post
/v1/workspaces/{workspace_id}/change-requests/{change_request_id}/applyApply a change request - post
/v1/workspaces/{workspace_id}/change-requests/{change_request_id}/cancelCancel a change request - post
/v1/workspaces/{workspace_id}/change-requests/{change_request_id}/rebaseRebase a change request - post
/v1/workspaces/{workspace_id}/change-requests/{change_request_id}/scheduleSchedule a change request
Configs
A config is the unit an SDK downloads: one JSON document per environment, with its own SDK key. Most projects need only `main`.
- get
/v1/workspaces/{workspace_id}/projects/{project_id}/configsList configs - post
/v1/workspaces/{workspace_id}/projects/{project_id}/configsCreate a config - get
/v1/workspaces/{workspace_id}/configs/{config_id}Get a config - patch
/v1/workspaces/{workspace_id}/configs/{config_id}Update a config - delete
/v1/workspaces/{workspace_id}/configs/{config_id}Delete a config
Environments
Environments of a project (for example Development, Staging, Production). Each has its own values and SDK keys; protected environments need `flags.protected.update` for value changes.
- get
/v1/workspaces/{workspace_id}/projects/{project_id}/environmentsList environments - post
/v1/workspaces/{workspace_id}/projects/{project_id}/environmentsCreate an environment - get
/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}Get an environment - patch
/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}Update an environment - delete
/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}Delete an environment
Evaluate
Test evaluations: evaluate a sample user against a published config with the same engine the SDKs run, and see the value, the reason and the rule or percentage option that decided. Nothing is stored and the user is never logged.
History
The change history of a project: every write with who made it, its note, the config revisions it published, a diff and a human summary. Restore a version, export the history as CSV or JSON. Confidential lists show as counts, never values.
Imports
Move in from ConfigCat in one step: a dry run reports what maps, what does not and what changes form; the real run creates a project with the same environments, configs, flags, segments and targeting, and keeps every user in the same percentage bucket.
Limits
The preview limits of Flags and how much of them the workspace uses.
Projects
A project groups the environments, configs, flags and segments of one product. New projects start with Development, a protected Production and one config, `main`.
- get
/v1/workspaces/{workspace_id}/projectsList projects - post
/v1/workspaces/{workspace_id}/projectsCreate a project - get
/v1/workspaces/{workspace_id}/projects/{project_id}Get a project - patch
/v1/workspaces/{workspace_id}/projects/{project_id}Update a project - delete
/v1/workspaces/{workspace_id}/projects/{project_id}Delete a project
Ramps
Timed percentage rollouts: serve a value to 5%, then 25%, 50% and 100% of users at set times, with sticky buckets, pause, resume and cancel.
- get
/v1/workspaces/{workspace_id}/rampsList ramps - post
/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/rampsStart a ramp - get
/v1/workspaces/{workspace_id}/ramps/{ramp_id}Get a ramp - post
/v1/workspaces/{workspace_id}/ramps/{ramp_id}/pausePause a ramp - post
/v1/workspaces/{workspace_id}/ramps/{ramp_id}/resumeResume a ramp - post
/v1/workspaces/{workspace_id}/ramps/{ramp_id}/cancelCancel a ramp
Revisions
Published config revisions per environment: every write that changes what SDKs download publishes a new revision of the config JSON. List them and read any kept revision byte for byte as SDKs get it.
Scheduled-Changes
Value changes that run at a set time, to within about 30 seconds: turn a flag on at 09:00, or apply an approved change request later.
- get
/v1/workspaces/{workspace_id}/scheduled-changesList scheduled changes - post
/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/scheduled-changesSchedule a change - get
/v1/workspaces/{workspace_id}/scheduled-changes/{scheduled_change_id}Get a scheduled change - post
/v1/workspaces/{workspace_id}/scheduled-changes/{scheduled_change_id}/cancelCancel a scheduled change
Sdk-Keys
SDK keys, one primary per config and environment: list them masked, reveal them (audited), rotate with a grace period during which the old key keeps working, or end the grace period early.
- get
/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keysList SDK keys - post
/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/revealReveal SDK keys - post
/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/rotateRotate the SDK key - delete
/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/secondaryEnd the grace period
Segments
Reusable sets of ANDed user conditions per project, targeted by rules of any config with `in` / `not_in`. Confidential (hashed) conditions keep only salted hashes in the SDK config and the cleartext encrypted for editing and reveal.
- get
/v1/workspaces/{workspace_id}/projects/{project_id}/segmentsList segments - post
/v1/workspaces/{workspace_id}/projects/{project_id}/segmentsCreate a segment - get
/v1/workspaces/{workspace_id}/segments/{segment_id}Get a segment - patch
/v1/workspaces/{workspace_id}/segments/{segment_id}Update a segment - delete
/v1/workspaces/{workspace_id}/segments/{segment_id}Delete a segment - get
/v1/workspaces/{workspace_id}/segments/{segment_id}/confidentialReveal confidential values of a segment
Settings
Feature flags (`boolean`) and typed settings (`string`, `integer`, `number`, `json`) of a config, and their value and targeting per environment: rules on user attributes and prerequisite flags, percentage splits, and optimistic concurrency through `version`.
- get
/v1/workspaces/{workspace_id}/configs/{config_id}/settingsList settings - post
/v1/workspaces/{workspace_id}/configs/{config_id}/settingsCreate a setting - get
/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/valuesList values in an environment - get
/v1/workspaces/{workspace_id}/configs/{config_id}/compareCompare environments - get
/v1/workspaces/{workspace_id}/settings/{setting_id}Get a setting - patch
/v1/workspaces/{workspace_id}/settings/{setting_id}Update a setting - delete
/v1/workspaces/{workspace_id}/settings/{setting_id}Delete a setting - get
/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}Get a value - put
/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}Replace a value - patch
/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}Update a value - get
/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/confidentialReveal confidential values - post
/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/copyCopy targeting between environments
Stale-Flags
Find dead flags: flags unchanged for a while, serving one value to everyone in every environment, or marked released or deprecated, with the literal to replace them with in code; and the weekly digest email to flag owners.
Stats
Workspace counts for dashboards: projects, configs, flags and settings, segments, recent changes, and history usage per project against the retention caps.
Webhooks
Signed webhooks (Standard Webhooks) for `config.published` (a new config revision in an environment) and `sdk_key.rotated`, with endpoints filtered by project, config or environment, an event log, retries, Send test and replay.
- get
/v1/workspaces/{workspace_id}/webhooks/event-typesList the events an endpoint can subscribe to. - get
/v1/workspaces/{workspace_id}/webhooks/endpointsList webhook endpoints, oldest first. - post
/v1/workspaces/{workspace_id}/webhooks/endpointsAdd a webhook endpoint. - get
/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}Get one webhook endpoint (without its secret). - patch
/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}Change a webhook endpoint: URL, description, events, on/off. - delete
/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}Delete a webhook endpoint. - post
/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secretRotate the signing secret. - post
/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/testSend a test event to this endpoint now and return the result. - get
/v1/workspaces/{workspace_id}/webhooks/eventsList webhook events, newest first (kept for 30 days). - get
/v1/workspaces/{workspace_id}/webhooks/events/{event_id}Get one webhook event with every delivery attempt. - post
/v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replaySend a logged event again, to its endpoints or to one endpoint.