Skip to main content
POST
Create Mode

Create Mode

Creates a new mode (theme variation) within a tokenset.
Write access policy - This endpoint requires the write:tokens scope.
  • TEAM-owned workspace: owner, admin, editor can write; viewer is blocked (403).
  • Non-TEAM workspace: only the workspace owner can write.
  • If the workspace owner plan has no API write access (for example FREE), write is blocked.

Endpoint

Authentication

Requires a valid API token in the Authorization header.

Request

Headers

Path Parameters

Body Parameters

If is_default is true, all other modes in this tokenset will be set to non-default.

Request Body

Response

Success Response

Status: 201 Created

Examples

Error Responses

400 Bad Request

404 Not Found

Common Mode Names

Theme Variations

  • Light
  • Dark
  • High Contrast

Platform Variations

  • Web
  • Mobile
  • Desktop

Brand Variations

  • Primary Brand
  • Secondary Brand

Context Variations

  • Marketing
  • Product
  • Admin

Use Cases

1. Create Light/Dark Themes

2. Create Multi-Platform Modes

Default Mode Behavior

When setting a mode as default:
  1. The new mode’s is_default is set to true
  2. All other modes in the tokenset are set to is_default: false
  3. Only one mode can be default per tokenset

Next Steps

Update Mode

Update mode details

Create Tokens

Add tokens to your mode