Skip to main content
GET
Export Mode

Export Mode

Exports tokens from a specific mode in your chosen format. This is the most commonly used export endpoint.
This /api/v1 endpoint exports raw mode data and does not resolve organization environment releases. For environment-targeted exports, use: /api/organizations/{orgId}/environments/{environmentId}/export.

Endpoint

Request

Path Parameters

Query Parameters

Supported Formats

Response Examples

JSON Format (W3C)

Content-Type: application/json

CSS Format

Content-Type: text/css

iOS Format (Swift)

Content-Type: text/plain

Android Format (XML)

Content-Type: application/xml

Examples

JavaScript Example

Python Example

Error Responses

400 Bad Request

404 Not Found

Use Cases

1. Web Development

Import CSS variables:

2. React/Next.js

Fetch at build time:

3. iOS Development

Add to Xcode project:

4. Android Development

Add to res/values:

5. CI/CD Integration

GitHub Actions example:

Token Resolution

Aliases are automatically resolved in exports:

Best Practices

1. Separate Files by Mode

Keep themes in separate files:

2. Automate Syncing

Don’t manually download tokens:

3. Version Control

Commit generated files:

4. Add Comments

Include metadata in exports:

Next Steps

GitHub Actions

Automate token syncing

JavaScript Integration

Use tokens in your app

List Modes

Get all available modes

Export Tokenset

Export all modes at once