---
title: "Create a branded design template"
method: POST
path: "/api/v1/design-templates"
tags: ["design-templates"]
---

# Create a branded design template

`POST /api/v1/design-templates`

## Request

- Base URL: `https://app.qrtap.kg`
- URL: `https://app.qrtap.kg/api/v1/design-templates`
- Auth: HTTP bearer

A reusable look (brand module colour + centre logo + default caption) referenced by codes via `design_template_id`. The logo is accepted only as a data URI (never a URL — no server-side fetching), then sanitised and re-encoded server-side to a bounded clean PNG (metadata/EXIF stripped). A decode-QA gate protects readability at render time: if the logo or colour breaks the read, the logo is shrunk or dropped.

## Request body

- CreateDesignTemplateRequest
  - `name` string, required
  - `module_color` string: Brand module colour (dark hex, e.g. #16613F). Applied only when it keeps contrast; QA has the final say.
  - `logo` string: Centre logo/image as a data URI: data:image/(png|jpeg|webp);base64,... Never a URL. Sanitised and re-encoded server-side.
  - `caption` string

## Response `201`

Template created. Logo bytes are never echoed back — only `has_logo`.

- DesignTemplate
  - `id` string, uuid, required
  - `name` string, required
  - `module_color` string, nullable, required
  - `caption` string, nullable, required
  - `has_logo` boolean, required
  - `created_at` string, date-time, required

## Other responses

- `400`: `invalid_request` (schema violation, see `detail`) or `invalid_image` (the logo failed sanitisation).
- `401`: Missing, invalid or revoked API key.
- `429`: Limit exceeded — the request had no effect. `error` is `rate_limited` with `scope: "minute"` (a burst brake: wait `retry_after` seconds and continue) or `quota_exceeded` with `scope: "day"` (the workspace's daily quota, counted in UTC; it returns at `reset_at`, the next UTC midnight, and only a higher plan raises it before then).

---

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