> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/api/get-frontend-features/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # Retrieve enabled feature flags for the provided context. GET https://app.unleash-instance.example.com/api/frontend This endpoint returns the list of feature flags that the frontend API evaluates to enabled for the given context. Context values are provided as query parameters. If the Frontend API is disabled 404 is returned. Reference: https://docs.getunleash.io/api/get-frontend-features ## Authentication - `Authorization` header (required) — API key needed to access this API - `Authorization` header (bearer token, required) — API key needed to access this API, in Bearer token format ## Response ### 200 frontendApiFeaturesSchema - `toggles` (list of frontendApiFeatureSchema, required) — The actual features returned to the Frontend SDK ## Errors ### 401 Unauthorized Error Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`. - `id` (string, optional) — The ID of the error instance - `name` (string, optional) — The name of the error kind - `message` (string, optional) — A description of what went wrong. ### 404 Not Found Error The requested resource was not found. - `id` (string, optional) — The ID of the error instance - `name` (string, optional) — The name of the error kind - `message` (string, optional) — A description of what went wrong. ## Types ### frontendApiFeatureSchema Frontend API feature - `name` (string, required) — Unique feature name. - `enabled` (boolean, required) — Always set to `true`. - `impressionData` (boolean, required) — `true` if the impression data collection is enabled for the feature, otherwise `false`. - `variant` (FrontendApiFeatureSchemaVariant, optional) — Variant details ### FrontendApiFeatureSchemaVariant Variant details - `name` (string, required) — The variants name. Is unique for this feature flag - `enabled` (boolean, required) — Whether the variant is enabled or not. - `payload` (FrontendApiFeatureSchemaVariantPayload, optional) — Extra data configured for this variant - `feature_enabled` (boolean, optional) — Whether the feature is enabled or not. - `featureEnabled` (boolean, optional, deprecated) — Use `feature_enabled` instead. ### FrontendApiFeatureSchemaVariantPayload Extra data configured for this variant - `type` (enum, required) — The format of the payload. - Allowed values: `json`, `csv`, `string`, `number` - `value` (string, required) — The payload value stringified. ## Examples **Response** ```json { "toggles": [ { "name": "disable-comments", "enabled": true, "impressionData": false, "variant": { "name": "blue_group", "enabled": true, "payload": { "type": "json", "value": "{\"color\": \"red\"}" }, "feature_enabled": true, "featureEnabled": true } } ] } ``` **SDK Code** ```javascript JavaScript SDK import { UnleashClient } from 'unleash-proxy-client'; const unleash = new UnleashClient({ url: 'https://app.unleash-instance.example.com/api/frontend', clientKey: '', appName: 'my-app', }); unleash.start(); // The SDK fetches evaluated feature flags for the current // context from this endpoint and refreshes them in the // background. unleash.on('ready', () => { const enabled = unleash.isEnabled('my-feature'); }); ``` ```swift iOS SDK import UnleashProxyClientSwift var unleash = UnleashProxyClientSwift.UnleashClient( unleashUrl: "https://app.unleash-instance.example.com/api/frontend", clientKey: "", refreshInterval: 15, appName: "my-app" ) unleash.start() // The SDK fetches evaluated feature flags for the current // context from this endpoint and refreshes them in the // background. let enabled = unleash.isEnabled(name: "my-feature") ``` ```kotlin Android SDK val unleash = DefaultUnleash( androidContext = applicationContext, unleashConfig = UnleashConfig.newBuilder(appName = "my-app") .proxyUrl("https://app.unleash-instance.example.com/api/frontend") .clientKey("") .build() ) unleash.start() // The SDK fetches evaluated feature flags for the current // context from this endpoint and refreshes them in the // background. val enabled = unleash.isEnabled("my-feature") ``` ```dart Flutter SDK import 'package:unleash_proxy_client_flutter/unleash_proxy_client_flutter.dart'; final unleash = UnleashClient( url: Uri.parse('https://app.unleash-instance.example.com/api/frontend'), clientKey: '', appName: 'my-app'); unleash.start(); // The SDK fetches evaluated feature flags for the current // context from this endpoint and refreshes them in the // background. final enabled = unleash.isEnabled('my-feature'); ``` ```python import requests url = "https://app.unleash-instance.example.com/api/frontend" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/frontend" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/frontend") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.unleash-instance.example.com/api/frontend") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/frontend', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/frontend"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ```