Documentation

Check feature flags from any language with a simple HTTP GET.

Check a flag

GET /api/v1/flags/{flag_key}?project_id=YOUR_ID

# Optional: pass user_id for targeting
GET /api/v1/flags/new-checkout?project_id=abc&user_id=user_123

Response:
{
  "flag": "new-checkout",
  "enabled": true,
  "project_id": "abc"
}

List all flags

GET /api/v1/flags?project_id=YOUR_ID

Response:
{
  "flags": [
    { "key": "new-checkout", "enabled": true, "rollout_pct": 100 },
    { "key": "dark-mode", "enabled": false, "rollout_pct": 0 }
  ]
}

JavaScript example

const res = await fetch(
  'https://henry-featureflags.vercel.app/api/v1/flags/new-checkout'
  + '?project_id=YOUR_ID&user_id=' + userId
)
const { enabled } = await res.json()

if (enabled) {
  showNewCheckout()
} else {
  showOldCheckout()
}

Create/update a flag

POST /api/v1/flags
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "project_id": "YOUR_ID",
  "key": "new-checkout",
  "enabled": true,
  "rollout_pct": 50,      // 0-100, for gradual rollout
  "description": "New checkout flow"
}

MCP server

Available at POST /api/mcp. Tools: list_flags, toggle_flag, create_flag, list_projects