Configurations
Configurations let you store arbitrary JSON values that can vary per environment. Unlike feature flags, configs don’t have targeting rules — they’re simple key-value pairs with optional environment-specific overrides.
Creating a config
curl -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "key": "payment_providers", "value": { "stripe_public_key": "pk_test_123", "paypal_enabled": true, "apple_pay_enabled": false } }' \ "https://edgeflags.net/api/v1/configs"Config keys must match the pattern [a-z0-9][a-z0-9._-]{0,127}.
Required fields
| Field | Type | Description |
|---|---|---|
key | string | Unique identifier |
value | any | JSON value (string, number, boolean, object, or array) |
Optional fields
| Field | Type | Description |
|---|---|---|
environments | object | Per-environment value overrides |
Reading a config
curl -H "Authorization: Bearer $TOKEN" \ "https://edgeflags.net/api/v1/configs/payment_providers"Response:
{ "value": { "stripe_public_key": "pk_test_123", "paypal_enabled": true, "apple_pay_enabled": false }}Environment overrides
Store different config values per environment:
curl -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "key": "api_limits", "value": { "requests_per_minute": 1000 }, "environments": { "production": { "value": { "requests_per_minute": 5000 } } } }' \ "https://edgeflags.net/api/v1/configs"Setting an environment override
curl -X PUT \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "value": { "requests_per_minute": 10000 } }' \ "https://edgeflags.net/api/v1/configs/api_limits/environments/production"Removing an environment override
curl -X DELETE \ -H "Authorization: Bearer $TOKEN" \ "https://edgeflags.net/api/v1/configs/api_limits/environments/production"Updating a config
curl -X PUT \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "value": { "requests_per_minute": 2000 } }' \ "https://edgeflags.net/api/v1/configs/api_limits"Supports optimistic concurrency with If-Match:
curl -X PUT \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -H "If-Match: \"1\"" \ -d '{ "value": { "requests_per_minute": 2000 } }' \ "https://edgeflags.net/api/v1/configs/api_limits"Deleting a config
curl -X DELETE \ -H "Authorization: Bearer $TOKEN" \ "https://edgeflags.net/api/v1/configs/api_limits"Listing configs
curl -H "Authorization: Bearer $TOKEN" \ "https://edgeflags.net/api/v1/configs?limit=50&offset=0"Response:
{ "configs": [ { "key": "payment_providers", "config": { "value": { "stripe_public_key": "pk_test_123" }, "version": 1 } } ], "total": 1, "has_more": false}