**Version: 202601**

# Save page-builder block

**POST** `/openapi/2026-01/themes/page-builder/blocks`

Apply edit operations (`ops`) to a page-builder template and save the result as a new card, then place it at the target position in the edit session; when `event_type` is not `theme`, the card is only saved and not placed on the page.

## Request

**application/json**

**Body | Example**

**Body (required)**

- `event_type` string (required)

  Event type of the card. With `theme`, the response also carries `type` and `block`; other event types only save the card and do not create the single-page block
- `origin_template_id` string (required)

  Source template ID the new card derives from. The new card's own id is returned in the response
- `title` object

  Block title as an i18n map, e.g. `{"en-US": "...", "zh-CN": "..."}`
- `action` string (required)

  Save action: `save`, `save_as`, `update`
- `category` string

  Category, e.g. `image_with_text`
- `second_category` string

  Second category, e.g. `Carousal`
- `image` string

  Preview image filename
- `origin` string

  Base template scope: `custom` or `global`. Empty looks up `custom` first, then `global`
- `ops` object[]

  Operations applied to the base template before saving. At least one op is required; an empty list is rejected with 400
- `oseid` string (required)

  Edit session ID to insert the new card into
- `doc_id` string (required)

  Document (template file) ID for the session insert
- `section_id` string (required)

  Target section ID whose content is replaced with the new card
- `theme_id` string (required)

  Theme ID for the render context url of the session insert
- `template_name` string

  Template name for the session insert; defaults to file location without `.liquid`
- `locale` string

  Rendering locale for the session insert; defaults to en\_US

```json
{
  "event_type": "string",
  "origin_template_id": "string",
  "title": {},
  "action": "string",
  "category": "string",
  "second_category": "string",
  "image": "string",
  "origin": "string",
  "ops": [
    {}
  ],
  "oseid": "string",
  "doc_id": "string",
  "section_id": "string",
  "theme_id": "string",
  "template_name": "string",
  "locale": "string"
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `id` string

    Created/updated block ID
  - `series_id` string

    Series ID
  - `show_templates` int32

    Number of show templates in the series after the save
  - `type` string

    Full block type of the saved card, e.g. `shoplazza://apps/page-builder/blocks/custom-{id}/{hash}`. Use it as the card's type when placing the card on a page
  - `block` object

    Single-block payload (name/type/settings/source) for inserting as a new section

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "id": "string",
    "series_id": "string",
    "show_templates": 0,
    "type": "string",
    "block": {}
  }
}
```
