---
title: "Publish a template"
method: POST
path: "/v1/templates"
tags: ["templates"]
---

# Publish a template

`POST /v1/templates`

## Request

- Base URL: `https://api.framelane.io`
- URL: `https://api.framelane.io/v1/templates`
- Auth: HTTP bearer

Admin workspaces only. List one of your template projects in the gallery. `status: published` makes it public, which needs every media URL in its composition on the shared CDN (`template_assets_not_shared` lists the rest) and no `webhook_url` (`template_has_webhook`), since every copy inherits it; a `draft` is visible to admin workspaces only.

## Request body

- TemplateListingCreate
  - `project_id` string, required: A kind=template project in your workspace.
  - `slug` string, required: Stable public handle, e.g. `stock-montage`.
  - `title` string, required
  - `description` string, nullable
  - `category` string, nullable
  - `tags` string[]
  - `priority` integer: Sorts rows and carousels, highest first.
  - `premium` boolean
  - `status` 'draft' | 'published': `published` makes the template public. Publishing needs every media URL in its composition to sit on the shared CDN (422 template_assets_not_shared) and no webhook_url (422 template_has_webhook).
  - `preview_url` string, uri, nullable: A finished render of the template.
  - `family` string, nullable: Links the size variants of one design.

## Response `201`

Successful Response

- TemplateListingOut: A gallery listing as stored.
  - `id` string, required: Listing id.
  - `project_id` string, required: The listed template project.
  - `slug` string, required
  - `title` string, required
  - `description` string, nullable
  - `category` string, nullable
  - `tags` string[]
  - `priority` integer, required
  - `premium` boolean, required
  - `status` 'draft' | 'published', required
  - `preview_url` string, nullable
  - `published_at` string, date-time, nullable
  - `family` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `401`: Missing or invalid API key.
- `403`: admin_only: not an admin workspace.
- `404`: project_id is not a project in your workspace.
- `409`: The slug is taken, or the project already has a listing.
- `422`: Not a template, or template_assets_not_shared or template_has_webhook when publishing.

---

[API](https://skmtc.dev/framelane/apis/framelane-api.md) · [All operations](https://skmtc.dev/framelane/apis/framelane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/framelane/apis/framelane-api/revisions/a223001ca8e5?raw)
