---
title: "Publish"
method: POST
path: "/companies/{company_id}/templates/{template_id}/publish"
tags: ["creatives"]
---

# Publish

`POST /companies/{company_id}/templates/{template_id}/publish`

## 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/{template_id}/publish`
- Auth: none declared

The draft becomes the next version: the one renders and feeds use.

Refused (409 ``published-since``) when another version was published
after the draft started, until ``force``; (409 ``draft-changed``) when the
draft was saved again after the revision the editor publishes; and (409
``nothing-to-publish``) without a draft. A template that makes its
creatives automatically makes them again for the new version.

## Path parameters

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

## Request body

- TemplatePublishRequest
  - `revision` integer, required
  - `notes` string, nullable
  - `force` boolean

## Response `201`

Successful Response

- TemplateVersionOut
  - `id` string, uuid, required
  - `template_id` string, uuid, required
  - `version` integer, required
  - `document` object, required
  - `document_hash` string, required
  - `notes` string, nullable, required
  - `created_by` string, uuid, nullable
  - `created_by_name` string, nullable
  - `created_at` string, date-time, required

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