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

# Read the caller's evaluated feature flags

GET https://api.finput.com.au/api/v1/feature-flags

The full flag bag for the authenticated user, evaluated server-side. A client fetches this once on launch so flag-gated surfaces render correctly on first paint instead of flickering through default values.

A flag is not an entitlement. Flags control *rollout* — whether a feature is being served at all — while `GET /api/v1/billing/entitlements` says whether this caller's plan includes it.

**To decide what to show, use `surfaces`, not the flags.** It is each product surface's state already resolved from the rollout and the plan together, so a client renders it rather than re-deriving the paywall. The API still enforces every entitlement on the request itself.

`surface_reasons` and `limits` carry the words to show about a locked surface or a limit, worded for the client named in `X-Finput-Client`, so no client writes its own.

Reference: https://docs.finput.com.au/api/endpoints/feature-flags/get-feature-flags

## Authentication

- `Authorization` header (bearer token, required) — JWT access token obtained from `POST /api/v1/auth/login`, or a `finput_sk_...` API token

## Request

### Headers

- `X-Finput-Client` (enum, optional) — Which client is asking, so every `message` in the response is worded for it. `ios` and `android` get sentences that state a fact and nothing more: no plan, no price, no link. Absent means `web`, which keeps its existing wording. An unrecognised value is treated like `ios` and `android`.
  - Allowed values: `web`, `ios`, `android`

## Response

### 200

The evaluated flags.

- `surfaces` (Surfaces, optional) — What each product surface is for the caller. Resolved on the server; clients render it and must not recompute it from flags or entitlements.
- `surface_reasons` (SurfaceReasons, optional) — Why a surface is `locked`, worded for the client named in `X-Finput-Client`. Only locked surfaces have a key.
- `limits` (Limits, optional) — Each finite limit on a surface the caller can use. A key is absent when the limit does not apply: the plan is unlimited, or the surface is not usable.
- `flags` (map from string to FeatureFlagsResponseFlags, optional) — Rollout switches evaluated for the caller, keyed by flag name. Values are booleans or strings, so type this as a map of string to boolean-or-string. Flag names are not a public contract and change without notice. Decide what to show from `surfaces`, not from these.

## Errors

### 401 Unauthorized Error

Not authenticated.

- `error` (string, optional)
- `errors` (map from string to list of string, optional)

## Types

### Surfaces

What each product surface is for the caller. Resolved on the server; clients render it and must not recompute it from flags or entitlements.

- `calculator` (enum, required) — `available`: list it and serve it. `locked`: offered, but not on this account; `surface_reasons` has the sentence the calling client may show. `hidden`: do not list it; a deep link to it goes to `commercial_fallback`.
  - Allowed values: `available`, `locked`, `hidden`
- `matrix` (enum, required) — `available`: list it and serve it. `locked`: offered, but not on this account; `surface_reasons` has the sentence the calling client may show. `hidden`: do not list it; a deep link to it goes to `commercial_fallback`.
  - Allowed values: `available`, `locked`, `hidden`
- `matrix_calculator` (enum, required) — `available`: list it and serve it. `locked`: offered, but not on this account; `surface_reasons` has the sentence the calling client may show. `hidden`: do not list it; a deep link to it goes to `commercial_fallback`.
  - Allowed values: `available`, `locked`, `hidden`
- `consumer_calculator` (enum, required) — `available`: list it and serve it. `locked`: offered, but not on this account; `surface_reasons` has the sentence the calling client may show. `hidden`: do not list it; a deep link to it goes to `commercial_fallback`.
  - Allowed values: `available`, `locked`, `hidden`
- `mcp` (enum, required) — `available`: list it and serve it. `locked`: offered, but not on this account; `surface_reasons` has the sentence the calling client may show. `hidden`: do not list it; a deep link to it goes to `commercial_fallback`.
  - Allowed values: `available`, `locked`, `hidden`
- `commercial_fallback` (enum, required) — Where a hidden commercial surface sends the user: the calculator, or the Matrix Calculator when the calculator is itself hidden.
  - Allowed values: `calculator`, `matrix_calculator`

### SurfaceReasons

Why a surface is `locked`, worded for the client named in `X-Finput-Client`. Only locked surfaces have a key.

- `matrix` (string, optional)
- `matrix_calculator` (string, optional)
- `consumer_calculator` (string, optional)

### Limits

Each finite limit on a surface the caller can use. A key is absent when the limit does not apply: the plan is unlimited, or the surface is not usable.

- `calculator_runs` (Limit, optional)
- `matrix_runs` (Limit, optional)
- `saved_scenarios` (Limit, optional)
- `withheld_results` (Limit, optional)

### FeatureFlagsResponseFlags

### Limit

- `limit` (integer, required) — The number the limit allows: runs a day, saved scenarios per tool, or results with figures.
- `surfaces` (list of string, required) — The `surfaces` keys this limit applies to.
- `message` (string, required) — The limit, worded for the calling client.

## Examples

**Response**

```json
{
  "surfaces": {
    "calculator": "available",
    "matrix": "locked",
    "matrix_calculator": "hidden",
    "consumer_calculator": "locked",
    "mcp": "hidden",
    "commercial_fallback": "calculator"
  },
  "surface_reasons": {
    "matrix": "Matrix isn't available on this account."
  },
  "limits": {
    "calculator_runs": {
      "limit": 10,
      "surfaces": [
        "calculator",
        "matrix_calculator"
      ],
      "message": "This account has 10 calculator runs a day."
    }
  },
  "flags": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.finput.com.au/api/v1/feature-flags"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript
const url = 'https://api.finput.com.au/api/v1/feature-flags';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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://api.finput.com.au/api/v1/feature-flags"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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://api.finput.com.au/api/v1/feature-flags")

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

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

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://api.finput.com.au/api/v1/feature-flags")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.finput.com.au/api/v1/feature-flags', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.finput.com.au/api/v1/feature-flags");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.finput.com.au/api/v1/feature-flags")! 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()
```