We have a Postman Collection that you can use to play around with the API and get a feel for how it works.
You can view the API via Swagger at https://api.flagsmith.com/api/v1/docs/.
Publicly accessible API calls need to have an environment key supplied with each request. This is provided as an HTTP
header, with the name
X-Environment-Key and the value of the environment API key that you can find within the
Flagsmith administrative area.
You can also do things like create new flags, environments, toggle flags or indeed anything that is possible from the administrative front end via the API.
To authenticate, get a token by logging in with an account credentials:
Then use this token for subsequent requests. For example, to create a new evironment:
You can find a complete list of endpoints via the Swagger REST API at https://api.flagsmith.com/api/v1/docs/.
curl command below will perform the entire SDK workflow in a single call:
- Creating an Identity
- Setting Traits for the Identity
- Receiving the Flags for that Identity