> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://customix.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Etsy get print files from template

# Public Print Files API

**Base URL:** `https://app.customix.io/api`

**Authentication:** [How can get Customix Api key](/en/article/how-can-get-customix-api-key-h9s04f/)

```
Authorization: Bearer {your-api-token}
```

**Rate Limit:** 100 requests per minute (per user)

---

## Overview

Submit a product customization as plain multi-line text and get back a list of
print file URLs for that submission.

---

## Create Print Files

```
POST /print-files
```

### Request body

| Field       | Type   | Required | Description                                                                                |
|-------------|--------|----------|--------------------------------------------------------------------------------------------|
| `shop_name` | string | Yes      | Your shop name (e.g. `my-etsy-shop`)                                                       |
| `name`      | string | Yes      | Name of a template you own on this shop. The first template matching the name is used.    |
| `content`   | string | Yes      | Multi-line customization. Each line is `<option name>: <value>`. Leading `- ` is optional. |

### Content format

Each line maps one customizable option on the template to a value.

- **Option names** are matched case-insensitively, with surrounding whitespace ignored.
- **Text / color / date** options take the value literally — for example
  `Harry`, `#ffffff`, `2026-12-25`.
- **Swatch** options (font, image, color, layout, etc.) take an integer that
  selects one of the available swatch values. By default `1` selects the first
  value, `2` the second, and so on.

Example:

```
- Enter your name: Harry
- Text color: #ffffff
- Font: 1
```

### Response `201`

```json
{
  "id": "01jyz5kqxz2hrcwqzdq4jdv7r9",
  "print_file_urls": [
    "https://.../1.png",
    "https://.../2.png"
  ]
}
```

| Field             | Type     | Description                                                       |
|-------------------|----------|-------------------------------------------------------------------|
| `id`              | string   | Identifier for the submission                                     |
| `print_file_urls` | string[] | One URL per print file on the template, in template order         |

Print files become available at the returned URLs once generation finishes
(typically a few seconds after the response).

### Error responses

| Status | Body                                                                | Cause                                                       |
|--------|---------------------------------------------------------------------|-------------------------------------------------------------|
| `401`  | `{"message": "Unauthenticated."}`                                   | Missing or invalid bearer token                             |
| `403`  | `{"message": "Unauthenticated"}`                                    | Token is valid but the caller doesn't have access to `shop_name` |
| `404`  | `{"message": "Template not found: …"}`                              | No template with that `name` exists on this shop            |
| `422`  | `{"errors": {"shop_name": […], "name": […], "content": […]}}`       | Missing required fields                                     |
| `422`  | `{"message": "Unknown option: <name>"}`                             | A line references an option that doesn't exist on the template |
| `422`  | `{"message": "Swatch index N is out of range for option '…' …"}`    | Swatch index is outside the available range                 |
| `422`  | `{"message": "Option '…' expects an integer swatch index, got …"}`  | Non-integer value passed to a swatch option                 |

---

## Sample request

```bash
curl -X POST 'https://app.customix.io/api/print-files' \
  -H 'Authorization: Bearer 01jyz0z…|abc…' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
    "shop_name": "my-etsy-shop",
    "name": "My Template",
    "content": "- Enter your name: Harry\n- Text color: #ffffff\n- Font: 1"
  }'
```
