> ## Documentation Index
> Fetch the complete documentation index at: https://developers.paysum.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Write theme files

> Creates or replaces draft files and deletes others in one request. Drafts are not live until you publish. On a store without drafts, the current theme is copied in first, so writing one file never leaves a one-file project.

`PUT /api/store-api/theme/files`

Creates or replaces draft files and deletes others in one request. Drafts are not live until you publish. On a store without drafts, the current theme is copied in first, so writing one file never leaves a one-file project.

Permission: `themes:write`

| Name | In | Type | Required | Description |
| - | - | - | - | - |
| `files` | body | object\[] | no | Up to 300 files. Each file is at most 512 KB. |
| `deleted` | body | string\[] | no | Paths to delete. |

```json theme={null}
{
  "files": [
    {
      "path": "src/styles.css",
      "content": ":root { --primary: #6571ff; }"
    }
  ],
  "deleted": [
    "src/components/OldBanner.tsx"
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.