---
title: "Design a new slide template from a description or HTML"
method: POST
path: "/v1/templates"
tags: ["Templates"]
---

# Design a new slide template from a description or HTML

`POST /v1/templates`

## Request

- Base URL: `https://infoslides.app`
- URL: `https://infoslides.app/v1/templates`
- Auth: none declared

Creates a workspace-owned template. `title` is required, plus exactly one of code mode (`html` + `css`; every `{{field}}` in the HTML becomes a data field) or AI mode (`prompt` describing the design + `sampleJson`, an example of the data it shows). `"dataMode": "push"` makes a template whose data an outside system pushes (see `POST /v1/sources/{id}/data`). Example: `{"title": "Queue", "html": "<h1>Now serving {{number}}</h1>", "css": "h1{font-size:12vh}", "dataMode": "push"}`. Try a design with `POST /v1/templates/preview` first. Supports `?dryRun=true`. Needs a plan that includes AI Studio, except one code-mode push template on any plan (the free live data slide); otherwise `EntitlementRequired` with `upgradeUrl`.

## Query parameters

- `dryRun` boolean

## Headers

- `Idempotency-Key` string

## Request body

- V1CreateTemplateRequest
  - `title` string, nullable
  - `prompt` string, nullable
  - `sampleJson` unknown
  - `html` string, nullable
  - `css` string, nullable
  - `dataMode` string, nullable

## Response `200`

OK

---

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