---
title: "Update theme CSS variables for a quiz"
method: PUT
path: "/quizzes/css-variables"
---

# Update theme CSS variables for a quiz

`PUT /quizzes/css-variables`

Replace or merge the theme-level CSS variables. Default mode is
`merge` (shallow merge over current variables). To clear a variable
without switching to replace, pass it as `null`. Screens are not
affected — only the design tokens change. A new quiz version is
created so the change can be rolled back.

## Headers

- `api_key` string, required

## Request body

- object
  - `quiz_id` integer, required
  - `css_variables` object, required — Map of `--var-name` to value. Null deletes a key (merge mode only).
  - `mode` 'merge' | 'replace' — `merge` (default) shallow-merges with current variables; `replace` overwrites the entire variable set.

## Response `200`

Variables updated

- object
  - `success` boolean
  - `quiz_id` integer
  - `mode` string
  - `css_variables` object

## Other responses

- `422` — Validation error

---

[API](https://skmtc.net/web2wave/apis/web2wave-api.md) · [All operations](https://skmtc.net/web2wave/apis/web2wave-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/web2wave/web2wave-api/versions/c88545119271/schema)
