Gate Quick Start

Create, check, and toggle boolean feature flags with the Gate REST API.

Prerequisites

Get an API key from solenoid.systems/pricing. Your key is prefixed with sm_.

Gate shares API keys with all Solenoid products. If you already have a key, it works for Gate too.

Base URL

https://api.solenoid.systems

All endpoints require a Bearer token. See Authentication.

Create a Flag

Flag keys must start with a lowercase alphanumeric character. They can contain lowercase letters, numbers, dashes, and underscores.

curl -X POST https://api.solenoid.systems/v1/gate \
  -H "Authorization: Bearer sm_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "flag_key": "new-dashboard",
    "enabled": true,
    "description": "New dashboard UI rollout"
  }'
const response = await fetch('https://api.solenoid.systems/v1/gate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sm_your_api_key_here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    flag_key: 'new-dashboard',
    enabled: true,
    description: 'New dashboard UI rollout'
  })
})
const data = await response.json()
{
  "success": true,
  "flag_key": "new-dashboard"
}

Check a Flag

Evaluate a single flag (1 credit):

curl https://api.solenoid.systems/v1/gate/new-dashboard \
  -H "Authorization: Bearer sm_your_api_key_here"
const response = await fetch(
  'https://api.solenoid.systems/v1/gate/new-dashboard',
  { headers: { 'Authorization': 'Bearer sm_your_api_key_here' } }
)
const { enabled } = await response.json()
{
  "enabled": true,
  "flag_key": "new-dashboard"
}

Get All Configs

Fetch all flag states in a single request (1 credit). Designed for SDK polling.

curl https://api.solenoid.systems/v1/gate/config \
  -H "Authorization: Bearer sm_your_api_key_here"
{
  "flags": [
    {
      "flag_key": "new-dashboard",
      "enabled": true,
      "description": "New dashboard UI rollout"
    },
    {
      "flag_key": "beta-features",
      "enabled": false,
      "description": "Beta feature set"
    }
  ]
}

List Flags

List all flag keys (free):

curl https://api.solenoid.systems/v1/gate \
  -H "Authorization: Bearer sm_your_api_key_here"
{
  "flags": ["new-dashboard", "beta-features"]
}

Delete a Flag

curl -X DELETE https://api.solenoid.systems/v1/gate/new-dashboard \
  -H "Authorization: Bearer sm_your_api_key_here"
{
  "success": true
}

Billing

Only these operations cost 1 credit:

  • GET /v1/gate/config (all flags for SDK)
  • GET /v1/gate/:flagKey (single flag evaluation)

All other operations (create, update, list, delete) are free. See Pricing for tier details.

Next Steps