> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/api/get-all-feature-types/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # Get all feature types GET https://app.unleash-instance.example.com/api/admin/feature-types Retrieves all feature types that exist in this Unleash instance, along with their descriptions and lifetimes. Reference: https://docs.getunleash.io/api/get-all-feature-types ## 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 featureTypesSchema - `version` (enum, required) — The schema version used to describe the feature flag types listed in the `types` property. - Allowed values: `1` - `types` (list of featureTypeSchema, required) — The list of feature flag types. ## 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. ## Types ### featureTypeSchema A [feature flag type](https://docs.getunleash.io/concepts/feature-flags#feature-flag-types). - `id` (string, required) — The identifier of this feature flag type. - `name` (string, required) — The display name of this feature flag type. - `description` (string, required) — A description of what this feature flag type is intended to be used for. - `lifetimeDays` (integer, required, nullable) — How many days it takes before a feature flag of this typed is flagged as [potentially stale](https://docs.getunleash.io/concepts/technical-debt#stale-and-potentially-stale-toggles) by Unleash. If this value is `null`, Unleash will never mark it as potentially stale. ## Examples **Response** ```json { "version": 1, "types": [ { "id": "release", "name": "Release", "description": "Release feature flags are used to release new features.", "lifetimeDays": 40 }, { "id": "experiment", "name": "Experiment", "description": "Experiment feature flags are used to test and verify multiple different versions of a feature.", "lifetimeDays": 40 }, { "id": "operational", "name": "Operational", "description": "Operational feature flags are used to control aspects of a rollout.", "lifetimeDays": 7 }, { "id": "kill-switch", "name": "Kill switch", "description": "Kill switch feature flags are used to quickly turn on or off critical functionality in your system.", "lifetimeDays": null }, { "id": "permission", "name": "Permission", "description": "Permission feature flags are used to control permissions in your system.", "lifetimeDays": null } ] } ``` **SDK Code** ```python import requests url = "https://app.unleash-instance.example.com/api/admin/feature-types" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/feature-types'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/admin/feature-types" 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/admin/feature-types") 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/admin/feature-types") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/feature-types', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/feature-types"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/feature-types")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```