Skip to main content
Switch features are simple on/off flags that let you gate capabilities based on a customer’s plan. Unlike meter features, they don’t track usage — they simply indicate whether a customer has access to something.

Use Cases

  • Enable/disable specific dashboard sections
  • Grant access to advanced exports, priority support, or SSO
  • Control access to beta features for higher-tier plans
  • Toggle API rate limit overrides

Creating a Switch Feature

  1. Go to Features in the sidebar
  2. Click Add Feature
  3. Select Switch as the type
  4. Enter a name and lookup_key
  5. Click Create

Attaching to a Plan

# Enable for a higher-tier plan
curl -X POST https://api.fluxrate.co/api/v1/plans/<plan_id>/features \
  -H "Content-Type: application/json" \
  -H "Cookie: access_token=<token>" \
  -d '{
    "feature_id": "<feature_id>",
    "is_enabled": true
  }'

# Explicitly disabled for a starter plan
curl -X POST https://api.fluxrate.co/api/v1/plans/<starter_plan_id>/features \
  -H "Content-Type: application/json" \
  -H "Cookie: access_token=<token>" \
  -d '{
    "feature_id": "<feature_id>",
    "is_enabled": false
  }'

Checking a Feature in Your App

Query the customer’s subscription to check if a switch feature is enabled:
GET /api/v1/subscriptions/<subscription_id>
The response includes the plan’s feature entitlements. Check is_enabled for switch features.
Switch features are the simplest way to implement plan-based feature gating. Combine them with meter features for a complete entitlement model.