---
title: "Compose Design"
method: POST
path: "/companies/{company_id}/templates/compose"
tags: ["creatives"]
---

# Compose Design

`POST /companies/{company_id}/templates/compose`

## 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}/templates/compose`
- Auth: none declared

A design laid out on a picture, as a template document in the brand (decision 242).

Each part — words, the product's picture, its price, a sale badge, the logo, a
library picture, a shape, a button, a built-in element — is placed by shares of
the picture and becomes a layer that reads the product where it shows one, its
colours and words linked to the brand kit; each format is laid out from the
picture. Nothing is saved: create a template with the document, or save it as a
draft. 400 ``invalid-design`` names the part that cannot be made, and why.

## Path parameters

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

## Request body

- TemplateDesignIn: A design laid out on a picture, to be made a template (decision 242).
  - `picture` DesignPictureIn: The picture a design was laid out on (decision 242): only its shape counts.
    - `width` integer, required
    - `height` integer, required
  - `formats` string[], nullable
  - `background` DesignBackgroundIn: What a design stands on: one of a library picture, a colour, a gradient.
    - `picture` string, nullable
    - `color` string, nullable
    - `gradient` string[], nullable
    - `angle` number
  - `parts` DesignPartIn[], required
    - `kind` 'text' | 'product_image' | 'price' | 'regular_price' | 'discount_badge' | 'logo' | 'picture' | 'shape' | 'button' | 'builtin', required
    - `box` number[], required
    - `name` string, nullable
    - `show_when` 'always' | 'on_sale' | 'not_on_sale' | 'in_stock' | 'sold_out', nullable
    - `text` string, nullable
    - `style` string, nullable
    - `color` string, nullable
    - `fill` string, nullable
    - `align` 'left' | 'center' | 'right', nullable
    - `lines` integer, nullable
    - `weight` integer, nullable
    - `uppercase` boolean, nullable
    - `size` number, nullable
    - `picture` string, nullable
    - `fit` 'contain' | 'cover', nullable
    - `shadow` boolean
    - `radius` number, nullable
    - `opacity` number, nullable
    - `shape` 'rect' | 'circle' | 'burst' | 'tag' | 'ribbon' | 'arrow' | 'bubble' | 'pointer', nullable
    - `builtin` string, nullable
    - `look` string, nullable
    - `on_dark` boolean
    - `image` integer
    - `rotation` number, nullable
    - `stroke` string, nullable
    - `stroke_width` number, nullable
    - `repeat` boolean
    - `photo` 'main' | 'lifestyle' | 'packshot' | 'close_up', nullable
  - `notes` string, nullable

## Response `200`

Successful Response

- TemplateDesignOut: The design as a template document, in the brand; nothing is saved.
  - `document` object, required
  - `layers` string[], required
  - `warnings` string[]

## 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)
