> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Toggle a feature on or off

> Enable or disable a specific NSR Machine feature. Changes take effect immediately and persist across requests within the session…

Enable or disable a specific NSR Machine feature. Changes take effect immediately
and persist across requests within the session.
**Example: Enable Graph-of-Thoughts**

```bash theme={null}
curl -X POST 'https://api.nsr.stateset.com/api/v1/nsr/features' \
-H 'X-API-Key: your-api-key' \
-H 'Content-Type: application/json' \
-d '&#123;'feature': 'graph_of_thoughts', 'enabled': true&#125;'
```

**Required scope:** `write`

### Request body

`ToggleFeatureRequest`

<ParamField body="enabled" type="boolean" required>
  Whether to enable (true) or disable (false)
</ParamField>

<ParamField body="feature" type="string" required>
  Feature name
</ParamField>

### Response

`FeaturesResponse`

<ResponseField name="available_features" type="string[]" required>
  All available features
</ResponseField>

<ResponseField name="enabled_features" type="string[]" required>
  List of enabled features
</ResponseField>

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Feature toggled successfully                       |
| `400` | Invalid feature name                               |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/api/v1/nsr/features' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "enabled": true,
    "feature": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "available_features": [
      "string"
    ],
    "enabled_features": [
      "string"
    ]
  }
  ```
</ResponseExample>
