---
title: "Create a template message"
method: POST
path: "/chats/templates"
---

# Create a template message

`POST /chats/templates`

Creates a template message in one of the creator's folders. Provide a `folderUuid` from GET /chats/templates/folders. A template must have text or at least one media attachment.

## Headers

- `X-Fanvue-API-Version` string, required

## Request body

- object
  - `folderUuid` string, uuid, required — UUID of the folder to create the template in (see GET /chats/templates/folders)
  - `text` string — Message text content
  - `price` union — Message price in cents (0 or null for free messages)
    - 0
    - number
  - `mediaUuids` string[] — Media UUIDs to attach to the template, in display order
  - `mediaPreviewUuid` string, uuid — Media UUID to use as the paywall preview
  - `name` string — Optional template name

## Response `201`

Template message created

- object
  - `uuid` string, uuid, required — Template message UUID
  - `name` string, nullable, required — Template name as given on create, or null when the template is unnamed
  - `text` string, nullable, required — Message text content
  - `price` number, nullable, required — Message price in cents (null for free messages)
  - `mediaUuids` string[], required — Array of media UUIDs attached to the message
  - `mediaPreviewUuid` string, uuid, nullable, required — Media UUID used as the paywall preview (null when the template has none)
  - `folderUuid` string, uuid, nullable, required — UUID of the folder containing this template
  - `folderName` string, nullable, required — Name of the folder containing this template

## Other responses

- `400` — Bad Request - API version not supported OR validation failed
- `401` — Unauthorized Response
- `403` — Unauthorized Response
- `404` — Folder not found
- `410` — API version no longer supported (sunset)
- `429` — Too many requests - rate limit exceeded

---

[API](https://skmtc.net/fanvue/apis/fanvue-api.md) · [All operations](https://skmtc.net/fanvue/apis/fanvue-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fanvue/fanvue-api/revisions/c5ddcd5c7e72/schema)
