> 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.

# Post Features

POST https://edge.unleash-instance.example.com/api/client/features

Reference: https://docs.getunleash.io/api/post-features

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: edge-api
  version: 1.0.0
paths:
  /api/client/features:
    post:
      operationId: post-features
      summary: Post Features
      tags:
        - subpackage_clientApi
      parameters:
        - name: namePrefix
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Return feature toggles for this token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientFeatures'
        '400':
          description: Invalid parameters used
          content:
            application/json:
              schema:
                description: Any type
        '403':
          description: Was not allowed to access features
          content:
            application/json:
              schema:
                description: Any type
servers:
  - url: https://edge.unleash-instance.example.com
    description: Your Unleash Edge instance (replace with your actual URL)
components:
  schemas:
    FeatureDependency:
      type: object
      properties:
        enabled:
          type:
            - boolean
            - 'null'
        feature:
          type: string
        variants:
          type:
            - array
            - 'null'
          items:
            type: string
      required:
        - feature
      title: FeatureDependency
    Operator0:
      type: string
      enum:
        - NOT_IN
      title: Operator0
    Operator1:
      type: string
      enum:
        - IN
      title: Operator1
    Operator2:
      type: string
      enum:
        - STR_ENDS_WITH
      title: Operator2
    Operator3:
      type: string
      enum:
        - STR_STARTS_WITH
      title: Operator3
    Operator4:
      type: string
      enum:
        - STR_CONTAINS
      title: Operator4
    Operator5:
      type: string
      enum:
        - NUM_EQ
      title: Operator5
    Operator6:
      type: string
      enum:
        - NUM_GT
      title: Operator6
    Operator7:
      type: string
      enum:
        - NUM_GTE
      title: Operator7
    Operator8:
      type: string
      enum:
        - NUM_LT
      title: Operator8
    Operator9:
      type: string
      enum:
        - NUM_LTE
      title: Operator9
    Operator10:
      type: string
      enum:
        - DATE_AFTER
      title: Operator10
    Operator11:
      type: string
      enum:
        - DATE_BEFORE
      title: Operator11
    Operator12:
      type: string
      enum:
        - SEMVER_EQ
      title: Operator12
    Operator13:
      type: string
      enum:
        - SEMVER_LT
      title: Operator13
    Operator14:
      type: string
      enum:
        - SEMVER_GT
      title: Operator14
    Operator15:
      type: string
      enum:
        - SEMVER_LTE
      title: Operator15
    Operator16:
      type: string
      enum:
        - IN_CIDR
      title: Operator16
    Operator17:
      type: string
      enum:
        - SEMVER_GTE
      title: Operator17
    Operator18:
      type: string
      enum:
        - REGEX
      title: Operator18
    Operator19:
      type: object
      properties:
        UNKNOWN:
          type: string
      required:
        - UNKNOWN
      title: Operator19
    Operator:
      oneOf:
        - $ref: '#/components/schemas/Operator0'
        - $ref: '#/components/schemas/Operator1'
        - $ref: '#/components/schemas/Operator2'
        - $ref: '#/components/schemas/Operator3'
        - $ref: '#/components/schemas/Operator4'
        - $ref: '#/components/schemas/Operator5'
        - $ref: '#/components/schemas/Operator6'
        - $ref: '#/components/schemas/Operator7'
        - $ref: '#/components/schemas/Operator8'
        - $ref: '#/components/schemas/Operator9'
        - $ref: '#/components/schemas/Operator10'
        - $ref: '#/components/schemas/Operator11'
        - $ref: '#/components/schemas/Operator12'
        - $ref: '#/components/schemas/Operator13'
        - $ref: '#/components/schemas/Operator14'
        - $ref: '#/components/schemas/Operator15'
        - $ref: '#/components/schemas/Operator16'
        - $ref: '#/components/schemas/Operator17'
        - $ref: '#/components/schemas/Operator18'
        - $ref: '#/components/schemas/Operator19'
      title: Operator
    Constraint:
      type: object
      properties:
        caseInsensitive:
          type: boolean
        contextName:
          type: string
        inverted:
          type: boolean
        operator:
          $ref: '#/components/schemas/Operator'
        value:
          type:
            - string
            - 'null'
        values:
          type:
            - array
            - 'null'
          items:
            type: string
      required:
        - contextName
        - operator
      title: Constraint
    Payload:
      type: object
      properties:
        type:
          type: string
        value:
          type: string
      required:
        - type
        - value
      title: Payload
    StrategyVariant:
      type: object
      properties:
        name:
          type: string
        payload:
          oneOf:
            - $ref: '#/components/schemas/Payload'
            - type: 'null'
        stickiness:
          type:
            - string
            - 'null'
        weight:
          type: integer
      required:
        - name
        - weight
      title: StrategyVariant
    Strategy:
      type: object
      properties:
        constraints:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Constraint'
        name:
          type: string
        parameters:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
        segments:
          type:
            - array
            - 'null'
          items:
            type: integer
        sortOrder:
          type:
            - integer
            - 'null'
        variants:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/StrategyVariant'
      required:
        - name
      title: Strategy
    Override:
      type: object
      properties:
        contextName:
          type: string
        values:
          type: array
          items:
            type: string
      required:
        - contextName
        - values
      title: Override
    WeightType:
      type: string
      enum:
        - fix
        - variable
      title: WeightType
    Variant:
      type: object
      properties:
        name:
          type: string
        overrides:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Override'
        payload:
          oneOf:
            - $ref: '#/components/schemas/Payload'
            - type: 'null'
        stickiness:
          type:
            - string
            - 'null'
        weight:
          type: integer
        weightType:
          oneOf:
            - $ref: '#/components/schemas/WeightType'
            - type: 'null'
      required:
        - name
        - weight
      title: Variant
    ClientFeature:
      type: object
      properties:
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
        dependencies:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/FeatureDependency'
        description:
          type:
            - string
            - 'null'
        enabled:
          type: boolean
        impressionData:
          type:
            - boolean
            - 'null'
        lastSeenAt:
          type:
            - string
            - 'null'
          format: date-time
        name:
          type: string
        project:
          type:
            - string
            - 'null'
        stale:
          type:
            - boolean
            - 'null'
        strategies:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Strategy'
        type:
          type:
            - string
            - 'null'
        variants:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Variant'
      required:
        - enabled
        - name
      title: ClientFeature
    Meta:
      type: object
      properties:
        etag:
          type:
            - string
            - 'null'
        queryHash:
          type:
            - string
            - 'null'
        revisionId:
          type:
            - integer
            - 'null'
      title: Meta
    Query:
      type: object
      properties:
        environment:
          type:
            - string
            - 'null'
        inlineSegmentConstraints:
          type:
            - boolean
            - 'null'
        namePrefix:
          type:
            - string
            - 'null'
        projects:
          type:
            - array
            - 'null'
          items:
            type: string
        tags:
          type:
            - array
            - 'null'
          items:
            type: array
            items:
              type: string
      title: Query
    Segment:
      type: object
      properties:
        constraints:
          type: array
          items:
            $ref: '#/components/schemas/Constraint'
        id:
          type: integer
      required:
        - constraints
        - id
      title: Segment
    ClientFeatures:
      type: object
      properties:
        features:
          type: array
          items:
            $ref: '#/components/schemas/ClientFeature'
        meta:
          oneOf:
            - $ref: '#/components/schemas/Meta'
            - type: 'null'
        query:
          oneOf:
            - $ref: '#/components/schemas/Query'
            - type: 'null'
        segments:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Segment'
        version:
          type: integer
      required:
        - features
        - version
      title: ClientFeatures
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "features": [
    {
      "enabled": true,
      "name": "new-onboarding-flow",
      "createdAt": "2024-01-15T09:30:00Z",
      "dependencies": [
        {
          "feature": "beta-user-experience",
          "enabled": true,
          "variants": [
            "variantA"
          ]
        }
      ],
      "description": "Enables the new user onboarding flow",
      "impressionData": true,
      "lastSeenAt": "2024-01-15T09:30:00Z",
      "project": "user-experience",
      "stale": true,
      "strategies": [
        {
          "name": "userWithId",
          "constraints": [
            {
              "contextName": "userId",
              "operator": "NOT_IN",
              "caseInsensitive": true,
              "inverted": true,
              "value": "12345",
              "values": [
                "12345",
                "67890"
              ]
            }
          ],
          "parameters": {
            "userIds": "12345,67890"
          },
          "segments": [
            1
          ],
          "sortOrder": 1,
          "variants": [
            {
              "name": "variantA",
              "weight": 50,
              "payload": null,
              "stickiness": "userId"
            }
          ]
        }
      ],
      "type": "release",
      "variants": [
        {
          "name": "variantA",
          "weight": 100,
          "overrides": [
            {
              "contextName": "region",
              "values": [
                "eu-west-1",
                "us-east-1"
              ]
            }
          ],
          "payload": null,
          "stickiness": "userId",
          "weightType": null
        }
      ]
    }
  ],
  "version": 1,
  "meta": null,
  "query": null,
  "segments": [
    {
      "constraints": [
        {
          "contextName": "region",
          "operator": "NOT_IN",
          "caseInsensitive": true,
          "inverted": true,
          "value": "us-west-2",
          "values": [
            "us-west-2",
            "ap-southeast-1"
          ]
        }
      ],
      "id": 1
    }
  ]
}
```

**SDK Code**

```python
import requests

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

payload = {}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://edge.unleash-instance.example.com/api/client/features';
const options = {
  method: 'POST',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

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

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	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")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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.post("https://edge.unleash-instance.example.com/api/client/features")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://edge.unleash-instance.example.com/api/client/features', [
  'body' => '{}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://edge.unleash-instance.example.com/api/client/features");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://edge.unleash-instance.example.com/api/client/features")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```