Skip to main content
GET
/
api
/
v1
/
tokensets
/
{id}
/
tokens
Get All Tokens
curl --request GET \
  --url https://app.tokencraft.dev/api/v1/api/v1/tokensets/{id}/tokens \
  --header 'Authorization: Bearer <token>'

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 /api/v1/tokensets/{id}/tokens

Request

Path Parameters

ParameterTypeRequiredDescription
idstringYesTokenset ID

Response

Status: 200 OK
{
  "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

curl -H "Authorization: Bearer dtk_your_token_here" \
  https://app.tokencraft.dev/api/v1/tokensets/tokenset-123/tokens

Next Steps