1
Create a free account on Statsig
Create a free account on the Statsig sign-up page.An account will let you use the Statsig Console, where you can manage all of your Feature Gates, Dynamic Configs, and Experiments. Note that you will also be able to invite others to collaborate on your Statsig Projects, so they can interact with your gates and configs.
2
Get an API key from the Statsig Console
An API key is required in every API request. There are two types of API keys you can use with the HTTP API:
- Server-side secret Key: Used only from secure servers and should never be exposed in client-side code.
- Client-SDK Key: Safe to embed in mobile apps and front-end web apps.
3
Issue API requests
Our API is built on top of HTTPS, and you can authenticate via the
statsig-api-key header. All API requests use the POST method, and parameters are set by passing a JSON object in the request body.Statsig automatically logs exposure events whenever you call the APIs. These exposure events help attribute downstream events to experiments or feature gates, which are used to calculate metrics like analytics lift.