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

# List Modes

> Get all modes for a tokenset

# List Modes

Retrieves all modes (themes/variations) for a specific tokenset.

## Endpoint

```
GET /tokensets/{id}/modes
```

## Request

### Path Parameters

| Parameter | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| `id`      | string | Yes      | Tokenset ID |

## Response

**Status:** `200 OK`

```json theme={null}
{
  "modes": [
    {
      "id": "mode-light",
      "tokenset_id": "tokenset-123",
      "name": "Light",
      "is_default": true,
      "created_at": "2025-01-15T10:00:00Z",
      "updated_at": "2025-01-15T10:00:00Z"
    },
    {
      "id": "mode-dark",
      "tokenset_id": "tokenset-123",
      "name": "Dark",
      "is_default": false,
      "created_at": "2025-01-15T10:05:00Z",
      "updated_at": "2025-01-16T14:30:00Z"
    }
  ],
  "total": 2
}
```

### Response Fields

| Field   | Type   | Description           |
| ------- | ------ | --------------------- |
| `modes` | array  | Array of mode objects |
| `total` | number | Total number of modes |

### Mode Object

| Field         | Type    | Description                       |
| ------------- | ------- | --------------------------------- |
| `id`          | string  | Unique mode identifier            |
| `tokenset_id` | string  | Parent tokenset ID                |
| `name`        | string  | Mode name (e.g., "Light", "Dark") |
| `is_default`  | boolean | Whether this is the default mode  |
| `created_at`  | string  | ISO 8601 timestamp                |
| `updated_at`  | string  | ISO 8601 timestamp                |

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer tkc_your_token_here" \
    https://app.tokencraft.dev/api/v1/tokensets/tokenset-123/modes
  ```

  ```javascript JavaScript theme={null}
  const { modes } = await fetch(
    `https://app.tokencraft.dev/api/v1/tokensets/${tokensetId}/modes`,
    { headers: { 'Authorization': `Bearer ${token}` } }
  ).then(r => r.json());

  // Export each mode
  for (const mode of modes) {
    const tokens = await exportMode(tokensetId, mode.id);
    console.log(`${mode.name}:`, tokens);
  }
  ```

  ```python Python theme={null}
  response = requests.get(
      f'https://app.tokencraft.dev/api/v1/tokensets/{tokenset_id}/modes',
      headers={'Authorization': f'Bearer {token}'}
  )

  modes = response.json()['modes']
  print(f'Found {len(modes)} modes')
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Get Tokens" href="/api-reference/tokens/list">
    List tokens in a mode
  </Card>

  <Card title="Export Mode" href="/api-reference/export/mode">
    Export a specific mode
  </Card>
</CardGroup>
