← BlogAPI

REST API Feature Flags

July 6, 2026·6 min read
#rest api#feature flags#api keys#curl

A REST API is the most portable way to evaluate feature flags. It works from languages without a dedicated SDK, internal tools, scheduled jobs, and scripts.

The tradeoff is that your application owns HTTP error handling. That makes explicit defaults and conservative timeout behavior important.

Authenticate with an environment API key

Keep the key server-side and pass it with each evaluation request. Do not place evaluation keys in public browser code or mobile apps.

curl --location 'https://api.releaseanchor.com/v1/evaluate' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: ApiKey <YOUR_API_KEY>' \
  --data '{"flagKey":"new-checkout","userIdentifier":"user_123"}'

Use a local fallback

If the API cannot be reached, your service should choose the known safe behavior. For most release flags, that means false.

Send only useful targeting context

  • Use stable IDs instead of emails when possible.
  • Send attributes used by rules, such as plan, region, or account tier.
  • Avoid unnecessary personal data in evaluation payloads.

Prefer SDKs for high-volume paths

The REST API is a good universal integration point. For high-volume request paths, SDKs can provide a cleaner interface, defaults, and telemetry patterns.

Related docs

Try ReleaseAnchor

Create a flag, connect an SDK, and ship your next rollout with a safe default.