**Version: 202601**

# Update edit session file

**PATCH** `/openapi/2026-01/themes/edit-sessions/:oseid/files/:doc_id`

Overwrite a template file in the edit session with the given card configs; cards missing from the list are removed. For partial changes, use Batch edit operations.

## Request

**Path Parameters**

- `oseid` string (required)

  Edit session ID
- `doc_id` string (required)

  Document ID of the file within the session

**application/json**

**Body | Example**

**Body (required)**

- `config` object[]

  The file's complete, ordered list of section configs. This is a whole-file write: the list REPLACES the file's current sections and any section omitted here is removed. Array order is the on-page render order. For incremental edits use the batch-operations endpoint

  *   Array \[

  - `id` int64

    Numeric section instance ID (the timestamp-style id stored in the file). Name-addressed global cards (`header`, `footer`, `announcement`, `cart_drawer`) cannot be expressed here
  - `settings` object

    Section settings object
  - `with_hook_set` boolean

    Read-only render flag echoed back from the rendering service; sending it in a request has no effect. Defaults to false
  *   \]
- `global_config` object

  Global config

  - `libs` string

    Theme-level library (libs) config. This whole-file write endpoint does not consume it — it only reads each config item's id and settings, plus layout. Pass `""` here
- `layout` string

  Layout name, e.g. theme

```json
{
  "config": [
    {
      "id": 0,
      "settings": {},
      "with_hook_set": true
    }
  ],
  "global_config": {
    "libs": "string"
  },
  "layout": "string"
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `template_data` object

    Updated template data (`{sections, content_for_page}`)

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "template_data": {}
  }
}
```
