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

List Modes

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

Endpoint

GET /api/v1/tokensets/{id}/modes

Request

Path Parameters

ParameterTypeRequiredDescription
idstringYesTokenset ID

Response

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

FieldTypeDescription
modesarrayArray of mode objects
totalnumberTotal number of modes

Mode Object

FieldTypeDescription
idstringUnique mode identifier
tokenset_idstringParent tokenset ID
namestringMode name (e.g., “Light”, “Dark”)
is_defaultbooleanWhether this is the default mode
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Examples

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

Next Steps