statsig Feature Gates API

Endpoints for evaluating feature gates for users, returning boolean pass/fail values along with rule identification.

Operations 2

POST /check_gate Check a feature gate #
POST /check_gate_multiple Check multiple feature gates #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/statsig-feature-gates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

statsig-feature-gates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Statsig HTTP Feature Gates API
  description: The Statsig HTTP API allows developers to evaluate feature gates, dynamic configs, and experiments for users via server-side HTTP requests. It provides endpoints for checking gate values, fetching configuration data, and logging custom events. All requests use the POST method with JSON request bodies and require authentication via the statsig-api-key header. While Statsig recommends using their official SDKs for most use cases, the HTTP API is available for environments where an SDK is not available or when direct HTTP integration is preferred.
  version: 1.0.0
  contact:
    name: Statsig Support
    url: https://statsig.com/support
  termsOfService: https://statsig.com/terms
servers:
- url: https://api.statsig.com/v1
  description: Statsig API Server
security:
- statsigApiKey: []
tags:
- name: Feature Gates
  description: Endpoints for evaluating feature gates for users, returning boolean pass/fail values along with rule identification.
paths:
  /check_gate:
    post:
      operationId: checkGate
      summary: Check a feature gate
      description: Evaluates a single feature gate for the specified user and returns the boolean pass/fail result along with rule identification. Statsig automatically logs an exposure event for the gate check.
      tags:
      - Feature Gates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - user
              - gateName
              properties:
                user:
                  $ref: '#/components/schemas/StatsigUser'
                gateName:
                  type: string
                  description: The name of the feature gate to evaluate.
      responses:
        '200':
          description: Gate evaluation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the gate that was evaluated.
                  value:
                    type: boolean
                    description: Whether the user passes the gate.
                  rule_id:
                    type: string
                    description: The identifier of the rule that was matched.
                  group_name:
                    type: string
                    description: The name of the group the user was assigned to.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /check_gate_multiple:
    post:
      operationId: checkGateMultiple
      summary: Check multiple feature gates
      description: Evaluates multiple feature gates for the specified user in a single request and returns the boolean pass/fail results for each gate. Statsig automatically logs exposure events for each gate check.
      tags:
      - Feature Gates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - user
              - gateNames
              properties:
                user:
                  $ref: '#/components/schemas/StatsigUser'
                gateNames:
                  type: array
                  items:
                    type: string
                  description: An array of feature gate names to evaluate.
      responses:
        '200':
          description: Multiple gate evaluation results
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: The name of the gate that was evaluated.
                        value:
                          type: boolean
                          description: Whether the user passes the gate.
                        rule_id:
                          type: string
                          description: The identifier of the rule that was matched.
                        group_name:
                          type: string
                          description: The name of the group the user was assigned to.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error message describing the authentication failure.
  schemas:
    StatsigUser:
      type: object
      description: The user object representing the end user being evaluated. At minimum, a userID should be provided. Additional properties enable more sophisticated targeting.
      properties:
        userID:
          type: string
          description: A unique identifier for the user.
        email:
          type: string
          format: email
          description: The email address of the user, used for email-based targeting.
        ip:
          type: string
          description: The IP address of the user, used for IP-based targeting.
        userAgent:
          type: string
          description: The user agent string, used for browser or device targeting.
        country:
          type: string
          description: The two-letter country code of the user.
        locale:
          type: string
          description: The locale identifier for the user.
        appVersion:
          type: string
          description: The version of the application the user is using.
        custom:
          type: object
          additionalProperties: true
          description: Custom properties for the user, used for custom targeting rules.
        privateAttributes:
          type: object
          additionalProperties: true
          description: Private user attributes used for evaluation but stripped before logging to Statsig servers.
        customIDs:
          type: object
          additionalProperties:
            type: string
          description: Custom identifier mappings for the user, such as companyID or teamID.
  securitySchemes:
    statsigApiKey:
      type: apiKey
      in: header
      name: statsig-api-key
      description: API key for authentication. Use a Server Secret Key for secure server-side requests or a Client-SDK Key for client-side applications.
externalDocs:
  description: Statsig HTTP API Documentation
  url: https://docs.statsig.com/http-api/