# org.designtxt.getTokens

> Published by [bomberstudios.com](https://lexicon.garden/identity/did:plc:34yvx4hv64znmh2i2fezoyqx)

✓ This is the authoritative definition for this NSID.

## Description

XRPC Query to retrieve a design token collection, optionally at a specific subtree path, and optionally with alias references resolved.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:34yvx4hv64znmh2i2fezoyqx/org.designtxt.getTokens)
- [Documentation](https://lexicon.garden/lexicon/did:plc:34yvx4hv64znmh2i2fezoyqx/org.designtxt.getTokens/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:34yvx4hv64znmh2i2fezoyqx/org.designtxt.getTokens/examples)

## Definitions

### `org.designtxt.getTokens`

**Type**: `query`

Retrieve design tokens from a tokenCollection record. If no input modifiers are provided, returns the raw token document. If an input object is given (matching a resolver document's modifiers), tokens are resolved against that context.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `ref` | `string` (at-uri) | Yes | AT-URI of the org.designtxt.tokenCollection record to retrieve. |
| `path` | `string` | No | JSON Pointer path to a specific subtree within the token collection. When set, only the sub-tree at this path is returned. |
| `resolveReferences` | `boolean` | No | If true, resolve alias references ({token.name}) inline in the response. Defaults to false. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tokens` | `unknown` | Yes | The requested token data. Either the full token collection, the subtree at the requested path, or the resolved token values. |
| `resolvedAt` | `string` (datetime) | No | Timestamp when the response was produced. |

## Raw Schema

```json
{
  "id": "org.designtxt.getTokens",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "tokens"
          ],
          "properties": {
            "tokens": {
              "type": "unknown",
              "description": "The requested token data. Either the full token collection, the subtree at the requested path, or the resolved token values."
            },
            "resolvedAt": {
              "type": "string",
              "format": "datetime",
              "maxLength": 64,
              "description": "Timestamp when the response was produced."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "ref"
        ],
        "properties": {
          "ref": {
            "type": "string",
            "format": "at-uri",
            "maxLength": 8192,
            "description": "AT-URI of the org.designtxt.tokenCollection record to retrieve."
          },
          "path": {
            "type": "string",
            "maxLength": 1024,
            "description": "JSON Pointer path to a specific subtree within the token collection. When set, only the sub-tree at this path is returned."
          },
          "resolveReferences": {
            "type": "boolean",
            "description": "If true, resolve alias references ({token.name}) inline in the response. Defaults to false."
          }
        }
      },
      "description": "Retrieve design tokens from a tokenCollection record. If no input modifiers are provided, returns the raw token document. If an input object is given (matching a resolver document's modifiers), tokens are resolved against that context."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "XRPC Query to retrieve a design token collection, optionally at a specific subtree path, and optionally with alias references resolved."
}
```
