Skip to main content
GrowthBook offers a full REST API for interacting with the application. View REST API Docs

Common Tasks

These endpoints cover the most common automation tasks: Experiments Feature flags
  • Get a single feature (GET /v2/features/{id}), including its rules in every environment.
  • Toggle a feature on or off (POST /v2/features/{id}/toggle) in one or more environments, for example from a deploy script or an incident runbook.
Metrics and data Targeting
  • Create a saved group (POST /v1/saved-groups) to reuse a list of ids or a targeting condition across features and experiments.
  • Create a segment (POST /v1/segments) to analyze experiment results for a subset of users.

SDK Connection Endpoints

In addition to the REST API above, there is one additional readonly endpoint - the SDK Connection Endpoint. The SDK Connection Endpoint provides readonly access to a subset of your feature flag data, just enough for the GrowthBook SDKs to assign values to users. They are meant to be public and do not require authentication to view. In GrowthBook Cloud, the SDK Connection Endpoints are served from our global CDN: https://cdn.growthbook.io/api/features/.... If you are self-hosting, you can use your own CDN or run the GrowthBook Proxy server, which provides built-in caching and performance optimizations. SDK Connection Endpoints are scoped to a single Environment (e.g. dev or production) and can also be scoped to a single Project. Manage all of your SDK Connections on the Features → SDKs page.

Encryption

If you’ve enabled encryption for your SDK endpoint, the response format changes:
You will need to decrypt the features first before passing into the SDK. Our front-end SDKs (JavaScript and React) handle this for you automatically and we’re in the process of adding built-in support to our other SDKs.