---
title: "List my feature flags"
---

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

# List my feature flags

Path: Nicer API › identity

`GET /identity/flag`

URL: `https://api.nicer.travel/identity/flag`

Returns the feature flags that apply to the caller (their own, their active agency's and the global ones), one per flag, with a true value winning. Any signed-in person, for themself.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.identity.flag.list();
```

### Nicer CLI

```bash
nicer identity flag list
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/identity/flag \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/identity/flag';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/identity/flag"

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "items": [
    {
      "createdBy": "string",
      "description": "string",
      "lastModifiedBy": "string",
      "rules": [
        {
          "attribute": "string",
          "operator": "equals",
          "value": "string"
        }
      ],
      "state": "active",
      "value": true,
      "createdAt": "string",
      "updatedAt": "string",
      "flag": "string",
      "type": "FeatureFlag",
      "targetType": "USER",
      "userId": "string"
    }
  ],
  "nextToken": "string"
}
```

- `items` (`identity.flag.list.response.200.items`; array of FeatureFlag, required) — The items of this page.
  - every option has:
    - `state` (`<option>.state`; string, required)
      - one of `"active"`, `"inactive"`
    - `value` (`<option>.value`; any of, required)
      - any of the following: `boolean`, `number`, `string`, `map<unknown>`
    - `createdAt` (`<option>.createdAt`; string, required)
    - `updatedAt` (`<option>.updatedAt`; string, required)
    - `flag` (`<option>.flag`; string, required)
    - `type` (`<option>.type`; string, required)
    - `targetType` (`<option>.targetType`; string, required)
    - `createdBy` (`<option>.createdBy`; string, optional)
    - `description` (`<option>.description`; string, optional)
    - `lastModifiedBy` (`<option>.lastModifiedBy`; string, optional)
    - `rules` (`<option>.rules`; array of object, optional)
      - `attribute` (`<option>.rules.attribute`; string, required)
      - `operator` (`<option>.rules.operator`; string, required)
        - one of `"equals"`, `"contains"`, `"startsWith"`, `"endsWith"`, `"regex"`
      - `value` (`<option>.rules.value`; any of, required)
        - any of the following: `string`, `number`, `boolean`
  - one of the following, each adding:
    - `object` (`identity.flag.list.response.200.items.1`)
      - `userId` (`identity.flag.list.response.200.items.1.userId`; string, required)
        - minLength: `1`
    - `object` (`identity.flag.list.response.200.items.2`)
      - `companyName` (`identity.flag.list.response.200.items.2.companyName`; string, required)
        - minLength: `1`
    - `object` (`identity.flag.list.response.200.items.3`)
- `nextToken` (`identity.flag.list.response.200.nextToken`; any of, required) — Send it back as nextToken to read the next page; null on the last page.
  - any of the following: `string`, `null`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.flag.list.response.400.errorCode`; string, required)
- `errorMessage` (`identity.flag.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.flag.list.response.401.errorCode`; string, required)
- `errorMessage` (`identity.flag.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.flag.list.response.403.errorCode`; string, required)
- `errorMessage` (`identity.flag.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/identity/identity.flag.list/index.md
