Skip to main content

Config flags

Sellable product

This capability is granted by an API key scoped to the `` product (product face). See the product reference below.

Runtime-config capability — a durable, org-scoped feature-flag registry with a deterministic-hash percentage-rollout evaluator (fail-closed on unknown flags, per-site override, manual override, explicit target-user/org allowlist) PLUS a typed settings key-value store. Products stop each re-rolling a flag engine + a settings store; they evaluate flags and read/write config over this one capability. I4: own Postgres store, never a product Mongo.

  • Group: Governance & platform
  • Contract: contracts/config-flags/v1/openapi.yaml
  • Public base: https://api.vagarylabs.com (the consolidated API gateway — one host, per-brand sibling api.<zone>)
  • Auth: a product API key (vgk_…) issued from the console — Authorization: Bearer vgk_…
  • Product face (customer-keyed):
    • https://api.vagarylabs.com/product/v1/flags/evaluate

Endpoints

MethodPathSummary
POST/v1/flags/evaluateEvaluate one flag for the caller's org (fail-closed; unknown flag → false)
POST/v1/flags/evaluate-batchEvaluate many flags in one round-trip
GET/v1/flagsList the org's flag definitions
GET/v1/flags/&#123;name&#125;The flag definition for one name (optionally a per-site override) or 404
PUT/v1/flags/&#123;name&#125;Register or update a flag definition (idempotent upsert)
DELETE/v1/flags/&#123;name&#125;Remove a flag definition (optionally a specific per-site override)
GET/v1/settingsList settings (optionally by category); sensitive values redacted
GET/v1/settings/&#123;category&#125;/&#123;key&#125;One setting value (sensitive value redacted) or 404
PUT/v1/settings/&#123;category&#125;/&#123;key&#125;Upsert a typed setting value
DELETE/v1/settings/&#123;category&#125;/&#123;key&#125;Remove a setting
GET/healthliveness
GET/metricsPrometheus

Schemas

EvaluateRequest

FieldTypeDescription
organization_idstringproduct-tier tenant (I6)
flagstringflag name (dotted namespace)
user_idstringuser to bucket for percentage rollout; omit for a no-user default eval
site_idstringper-site override selector; omit for the global definition

EvaluateResult

FieldTypeDescription
flagstring
enabledboolean

EvaluateBatchRequest

FieldTypeDescription
organization_idstring
flagsarray
user_idstring
site_idstring

EvaluateBatchResult

FieldTypeDescription
resultsobjectflag name → enabled

FlagDefinition

FieldTypeDescription
namestring
site_idstring'' = global definition; non-empty = per-site override
default_enabledboolean
rollout_percentagenumber
override['boolean', 'null']manual on/off; null = no override
target_usersarrayexplicit user allowlist (wins over rollout)
target_orgsarrayexplicit org allowlist (wins over rollout)
descriptionstring

FlagUpsert

FieldTypeDescription
organization_idstring
site_idstring
default_enabledboolean
rollout_percentagenumber
override['boolean', 'null']
target_usersarray
target_orgsarray
descriptionstring

FlagList

FieldTypeDescription
flagsarray

Setting

FieldTypeDescription
categorystring
keystring
valueobjectany JSON type (bool/int/string/object); sensitive keys are redacted on read

Generated by scripts/gen-capability-docs.py from contracts/config-flags/v1/openapi.yaml — the contract IS the source of truth; edit the contract, not this page.