---
title: "Change Hero"
method: PATCH
path: "/companies/{company_id}/heroes/{hero_id}"
tags: ["heroes"]
---

# Change Hero

`PATCH /companies/{company_id}/heroes/{hero_id}`

## Request

- Base URL: `https://app.zalster.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zalster.com/companies/{company_id}/heroes/{hero_id}`
- Auth: none declared

The draft changed: a website shows the change only once it is published —
``publish: true`` does it with the change.

## Path parameters

- `company_id` string, uuid, required: Company id
- `hero_id` string, uuid, required

## Request body

- HeroUpdate: What changes in the draft: each part given replaces that part, a settings section a key at a time (``null`` in ``texts`` or ``animation.layers`` takes one away).
  - `name` string, nullable
  - `drawing` object, nullable
  - `settings` object, nullable
  - `publish` boolean
  - `preview` boolean

## Response `200`

Successful Response

- HeroOut
  - `id` string, uuid, required
  - `name` string, required
  - `status` 'draft' | 'published' | 'changed', required
  - `width` integer, required
  - `height` integer, required
  - `tall` boolean, required
  - `made_by` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `published_at` string, date-time, nullable
  - `zalia_url` string, required
  - `drawing` object, required
  - `settings` object, required
  - `frames` HeroFrameOut[], required
    - `name` 'wide' | 'tall', required
    - `width` integer, required
    - `height` integer, required
    - `slots` integer, required
    - `pages` integer, required
    - `layers` HeroLayerOut[], required
      - `id` string, required
      - `type` string, required
      - `text` string, nullable
      - `product` integer, nullable
      - `top` boolean
  - `products` HeroProductOut[], required
    - `product_id` string, uuid, required
    - `title` string, required
    - `price` string, nullable
    - `was` string, nullable
    - `url` string, nullable
    - `picture` 'cutout' | 'photo', nullable
  - `links` HeroLinksOut, required: Where the hero shows: the public ones only once it is published.
    - `embed_url` string, nullable
    - `image_url` string, nullable
    - `script_url` string, required
    - `snippet` string, nullable
    - `iframe_snippet` string, nullable
  - `notes` string[]
  - `preview` string, nullable
  - `preview_media_type` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zalster/apis/zalster-feed-processor.md) - [All operations](https://skmtc.dev/zalster/apis/zalster-feed-processor/llms.txt) - [OpenAPI document](https://skmtc.dev/zalster/apis/zalster-feed-processor/revisions/d0b9dc66ad36?raw)
