Feature Flags

Record which flags a running app actually evaluated.

This is what makes last_evaluated_at mean something. The snapshot endpoint hands the SDK every flag in the environment and evaluation then happens locally, so the control plane cannot otherwise tell a flag that is referenced by live code from one nothing has called in a year. Stamping on snapshot fetch would mark every flag as freshly used and defeat the point.

Scope comes from the deployment token, never the body. The endpoint writes only last_evaluated_at — never a flag's value — so "a deployment token cannot change what a flag serves" still holds despite this being a write.

post/flags/exposure

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/flags/exposure
  • Auth: HTTP bearer

Request body

keysstring[] required

Flag keys evaluated since the last report. Unknown keys are ignored.

Example request

{
  "keys": [
    "checkout.v2",
    "api.rate_limit"
  ]
}

Response

Exposure recorded

recordedinteger required

How many keys were accepted for processing.

Deliberately not the number of rows updated: echoing that back would let a caller post a single candidate key and read the result as "this flag exists", turning the endpoint into an existence oracle.

Changes

No recorded changes to this operation across all 53 revisions of this API.