Skip to Content
API ReferenceFeature Flags

Feature Flags

Feature flags control the availability of experimental or tenant-specific functionality. Flags can be checked by clients to conditionally enable features, or managed by administrators.

Feature Flag Object

FieldTypeDescription
namestringFlag identifier (e.g. llm_detection, batch_v2)
enabledbooleanWhether the flag is active
descriptionstringHuman-readable description
updated_atstringISO 8601 timestamp of last change

GET /features

List all feature flags for the current tenant.

Example

curl https://api.pii-redactor.dev/api/v1/features \ -H "X-API-Key: pk_live_abc123"
[ { "name": "llm_detection", "enabled": true, "description": "Enable LLM-based NER detection alongside Presidio", "updated_at": "2026-02-10T08:00:00Z" }, { "name": "batch_v2", "enabled": false, "description": "Use the v2 batch processing engine", "updated_at": "2026-02-01T12:00:00Z" }, { "name": "audio_redaction", "enabled": true, "description": "Enable audio file PII redaction", "updated_at": "2026-01-15T10:00:00Z" } ]

GET /features/{flag_name}

Check the status of a specific feature flag.

Example

curl https://api.pii-redactor.dev/api/v1/features/llm_detection \ -H "X-API-Key: pk_live_abc123"
{ "name": "llm_detection", "enabled": true, "description": "Enable LLM-based NER detection alongside Presidio", "updated_at": "2026-02-10T08:00:00Z" }

Returns 404 if the flag does not exist.


PUT /features/{flag_name}

Set the value of a feature flag. This endpoint is restricted to admin API keys.

Request Body

FieldTypeRequiredDescription
enabledbooleanYesWhether the flag should be active

Example

curl -X PUT https://api.pii-redactor.dev/api/v1/features/batch_v2 \ -H "X-API-Key: pk_live_admin_key" \ -H "Content-Type: application/json" \ -d '{"enabled": true}'
{ "name": "batch_v2", "enabled": true, "description": "Use the v2 batch processing engine", "updated_at": "2026-02-13T10:00:00Z" }

Returns 403 Forbidden if the API key does not have admin permissions.