# Upload a help center theme

Uploads a theme's folder as a zip in the file field of a multipart form. dimmi checks every file and parses every template; a theme with problems is refused with each one's file and line, and nothing is kept. A theme that passes is kept as a new version, not yet live. Returns the new theme version.

```http
POST https://trydimmi.com/api/v1/help-centers/{help_center}/themes
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `settings:write`.

## Path parameters

- `help_center` (string, required): Id of the help center, starting with hc_, such as hc_01jx2m8k4t. Find it with GET /help-centers.

## Body

- `filename` (string): filename of the file being uploaded
- `name` (string): general purpose name for multipart form value

## Response 201 (Created)

- `data` (object, required)
  - `api_version` (integer, required): The theme API the theme is written for, from its theme.json.
  - `content_hash` (string, required): A hash of every file of the theme; two versions with the same hash hold the same files.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `file_count` (integer, required): How many files the theme holds.
  - `help_center_id` (string, required): Id of the help center the theme belongs to, starting with hc_.
  - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
  - `live` (boolean, required): Whether this is the version the help center's pages wear now.
  - `name` (string, required): The theme's name, from its theme.json.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `settings` (object[] | null, required): The settings the theme declares in its theme.json, which the team may change without code.
    - `default` (any): The value used until the team sets one. Left out when the theme gives none.
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `info` (string): More words for the team about the setting. Left out when the theme gives none.
    - `label` (string, required): The setting's name as the team reads it.
    - `options` (string[] | null): The values a select setting allows. Left out for other types.
    - `type` (string, required): What the setting holds: text, textarea, color, checkbox, number, url or select.
  - `size_bytes` (integer, required): The size of all the theme's files together, in bytes.
  - `theme_version` (string, required): The theme author's own version label, such as 1.2.0. Empty when not set.
  - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `values` (object, required): The team's values for the theme's settings, by setting id. Settings left out use their defaults.
  - `version` (integer, required): The upload's number within the help center, counting up from 1.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request POST \
  --url 'https://trydimmi.com/api/v1/help-centers/{help_center}/themes' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "filename": "<string>",
  "name": "<string>"
}'
```

## Example response

```json
{
  "data": {
    "api_version": 123,
    "content_hash": "<string>",
    "created_at": "2026-11-01T09:30:00Z",
    "file_count": 123,
    "help_center_id": "<string>",
    "id": "<string>",
    "live": true,
    "name": "<string>",
    "object": "<string>",
    "settings": [
      {
        "default": null,
        "id": "<string>",
        "info": "<string>",
        "label": "<string>",
        "options": [
          "<string>"
        ],
        "type": "<string>"
      }
    ],
    "size_bytes": 123,
    "theme_version": "<string>",
    "updated_at": "2026-11-01T09:30:00Z",
    "values": {
      "<key>": null
    },
    "version": 123
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
