> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getunleash.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server.

# Get Feature

GET https://edge.unleash-instance.example.com/api/client/features/{feature_name}

Reference: https://docs.getunleash.io/api/get-feature

## Authentication

- `Authorization` header (required) — API Key authentication via header

## Request

### Path parameters

- `feature_name` (string, required) — The name of the feature

## Response

### 200

Return a single feature toggle for this token

- `enabled` (boolean, required)
- `name` (string, required)
- `createdAt` (string, optional, nullable)
- `dependencies` (list of FeatureDependency, optional, nullable)
- `description` (string, optional, nullable)
- `impressionData` (boolean, optional, nullable)
- `lastSeenAt` (string, optional, nullable)
- `project` (string, optional, nullable)
- `stale` (boolean, optional, nullable)
- `strategies` (list of Strategy, optional, nullable)
- `type` (string, optional, nullable)
- `variants` (list of Variant, optional, nullable)

## Errors

### 403 Forbidden Error

Was not allowed to access features

- `any`

### 404 Not Found Error

The feature was not found

- `any`

## Types

### FeatureDependency

- `feature` (string, required)
- `enabled` (boolean, optional, nullable)
- `variants` (list of string, optional, nullable)

### Strategy

- `name` (string, required)
- `constraints` (list of Constraint, optional, nullable)
- `parameters` (map from string to string, optional, nullable)
- `segments` (list of integer, optional, nullable)
- `sortOrder` (integer, optional, nullable)
- `variants` (list of StrategyVariant, optional, nullable)

### Variant

- `name` (string, required)
- `weight` (integer, required)
- `overrides` (list of Override, optional, nullable)
- `payload` (Payload, optional, nullable)
- `stickiness` (string, optional, nullable)
- `weightType` (enum, optional, nullable)
  - Allowed values: `fix`, `variable`

### Constraint

- `contextName` (string, required)
- `operator` (Operator, required)
- `caseInsensitive` (boolean, optional)
- `inverted` (boolean, optional)
- `value` (string, optional, nullable)
- `values` (list of string, optional, nullable)

### StrategyVariant

- `name` (string, required)
- `weight` (integer, required)
- `payload` (Payload, optional, nullable)
- `stickiness` (string, optional, nullable)

### Override

- `contextName` (string, required)
- `values` (list of string, required)

### Payload

- `type` (string, required)
- `value` (string, required)

### Operator

- enum
  - Allowed values: `NOT_IN`
- enum
  - Allowed values: `IN`
- enum
  - Allowed values: `STR_ENDS_WITH`
- enum
  - Allowed values: `STR_STARTS_WITH`
- enum
  - Allowed values: `STR_CONTAINS`
- enum
  - Allowed values: `NUM_EQ`
- enum
  - Allowed values: `NUM_GT`
- enum
  - Allowed values: `NUM_GTE`
- enum
  - Allowed values: `NUM_LT`
- enum
  - Allowed values: `NUM_LTE`
- enum
  - Allowed values: `DATE_AFTER`
- enum
  - Allowed values: `DATE_BEFORE`
- enum
  - Allowed values: `SEMVER_EQ`
- enum
  - Allowed values: `SEMVER_LT`
- enum
  - Allowed values: `SEMVER_GT`
- enum
  - Allowed values: `SEMVER_LTE`
- enum
  - Allowed values: `IN_CIDR`
- enum
  - Allowed values: `SEMVER_GTE`
- enum
  - Allowed values: `REGEX`
- Operator19

### Operator19

- `UNKNOWN` (string, required)

## Examples

**Response**

```json
{
  "enabled": true,
  "name": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "dependencies": [
    {
      "feature": "string",
      "enabled": true,
      "variants": [
        "string"
      ]
    }
  ],
  "description": "string",
  "impressionData": true,
  "lastSeenAt": "2024-01-15T09:30:00Z",
  "project": "string",
  "stale": true,
  "strategies": [
    {
      "name": "string",
      "constraints": [
        {
          "contextName": "string",
          "operator": "NOT_IN",
          "caseInsensitive": true,
          "inverted": true,
          "value": "string",
          "values": [
            "string"
          ]
        }
      ],
      "parameters": {},
      "segments": [
        1
      ],
      "sortOrder": 1,
      "variants": [
        {
          "name": "string",
          "weight": 1,
          "payload": null,
          "stickiness": "string"
        }
      ]
    }
  ],
  "type": "string",
  "variants": [
    {
      "name": "string",
      "weight": 1,
      "overrides": [
        {
          "contextName": "string",
          "values": [
            "string"
          ]
        }
      ],
      "payload": null,
      "stickiness": "string",
      "weightType": null
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://edge.unleash-instance.example.com/api/client/features/feature_name"

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://edge.unleash-instance.example.com/api/client/features/feature_name';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

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://edge.unleash-instance.example.com/api/client/features/feature_name"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	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://edge.unleash-instance.example.com/api/client/features/feature_name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://edge.unleash-instance.example.com/api/client/features/feature_name")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://edge.unleash-instance.example.com/api/client/features/feature_name', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://edge.unleash-instance.example.com/api/client/features/feature_name");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://edge.unleash-instance.example.com/api/client/features/feature_name")! 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()
```