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

# Get All Tokens

> Get all tokens across all modes in a tokenset

# Get All Tokens

Retrieves all tokens in a tokenset across all modes. Useful for getting a complete view of all tokens regardless of mode.

## Endpoint

```
GET /tokensets/{id}/tokens
```

## Request

### Path Parameters

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

## Response

**Status:** `200 OK`

```json theme={null}
{
  "tokens": [
    {
      "id": "token-1",
      "tokenset_id": "tokenset-123",
      "mode_id": "mode-light",
      "name": "colors.primary.500",
      "type": "color",
      "value": "#3b82f6",
      "description": "Primary brand color",
      "alias_to": null,
      "created_at": "2025-01-15T10:00:00Z",
      "updated_at": "2025-01-15T10:00:00Z"
    },
    {
      "id": "token-2",
      "tokenset_id": "tokenset-123",
      "mode_id": "mode-dark",
      "name": "colors.primary.500",
      "type": "color",
      "value": "#60a5fa",
      "description": "Primary brand color",
      "alias_to": null,
      "created_at": "2025-01-15T10:05:00Z",
      "updated_at": "2025-01-15T10:05:00Z"
    }
  ],
  "total": 2
}
```

## Examples

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

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

  // Group by mode
  const byMode = tokens.reduce((acc, token) => {
    if (!acc[token.mode_id]) acc[token.mode_id] = [];
    acc[token.mode_id].push(token);
    return acc;
  }, {});
  ```
</CodeGroup>

## Next Steps

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

  <Card title="Export" href="/api-reference/export/mode">
    Export tokens in multiple formats
  </Card>
</CardGroup>
