---
title: "Create Template"
method: POST
path: "/v1/template"
tags: ["Templates"]
---

# Create Template

`POST /v1/template`

## Request

- Base URL: `https://layerre.com` (the document declares no server; this is the origin it was published from)
- URL: `https://layerre.com/v1/template`
- Auth: HTTP bearer

Create a template from a Canva URL.

This endpoint processes a Canva URL and extracts template information
including layers, dimensions, and other metadata.

## Request body

- TemplateCreateRequest
  - `canva_url` string, required: Canva share URL
  - `tags` string[], nullable: Initial tags for the template.

## Response `201`

Template created successfully

- TemplateResponse
  - `id` string, uuid, required
  - `name` string, required: Template name
  - `width` integer, required: Template width in pixels
  - `height` integer, required: Template height in pixels
  - `source_url` string, required: Original Canva URL
  - `background_color` string, required: Background color of the first page (page 0) in hex format
  - `page_backgrounds` object: Per-page background colors keyed by page index as a string. Page 0 is also available in background_color.
  - `preview_url` string, nullable: Preview image URL
  - `layers` Layer[]: List of layers in the template
    - `id` string, uuid, required
    - `template_id` string, uuid, required
    - `name` string, required: Layer name
    - `layer_type` 'image' | 'text', required: Enum for layer types
    - `x` number: X position in pixels
    - `y` number: Y position in pixels
    - `position` integer: Z-order position (0=bottom/back, higher=top/front)
    - `page_number` integer: Page index within a multi-page template (0-based)
    - `properties` FlexibleLayerProperties, required: Flexible layer properties that can handle any combination of text and image properties
      - `width` number, nullable: Layer width in pixels
      - `height` number, nullable: Layer height in pixels
      - `color` string, nullable: Color in hex format (#RRGGBB)
      - `rotation` number, nullable: Rotation angle in degrees
      - `text` string, nullable: Text content
      - `font_size` number, nullable: Font size in pixels
      - `font_name` string, nullable: Font family name
      - `font_style` FontStyle: Font styling properties
        - `weight` string, nullable
        - `italic` boolean, nullable
        - `underline` boolean, nullable
      - `text_align` 'left' | 'center' | 'right' | 'justify': Text alignment options
      - `text_direction` 'rtl', nullable: Text direction; only set for right-to-left text (Arabic, Hebrew, etc.). Absent/null means LTR.
      - `letter_spacing` number, nullable: Letter spacing in pixels
      - `line_spacing` number, nullable: Line spacing in pixels
      - `vertical_align` string, nullable: Vertical alignment for text (e.g. 'middle')
      - `img_url` string, nullable: Image URL for image layers: public HTTPS, data URI, or Google Drive link shared for viewing.
      - `image_fit` 'cover' | 'contain'
      - `image_position` 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'
      - `signed_url_expiry` string, date-time, nullable
      - `opacity` number, nullable: Opacity value (0.0 = fully transparent, 1.0 = fully opaque)
      - `flip_horizontal` boolean, nullable: Flip the layer horizontally
      - `flip_vertical` boolean, nullable: Flip the layer vertically
  - `tags` string[]: User-defined tags for organizing designs into folders
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `warnings` string[], nullable
  - `page_count` integer: Number of pages in this template (derived from layers)
  - `variant_count` integer, nullable: Number of variants for this template (only included in list endpoint)

## Other responses

- `400`: Invalid or inaccessible Canva URL (format, sharing, or no design content returned—e.g. Brand Template without access).
- `403`: Plan limit exceeded
- `404`: Canva URL not found
- `422`: Design type is not supported
- `500`: Internal server error
- `504`: Import timeout — retry the same request

---

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