Templates

Create template

POST
/preset/templates

Authorization

token_auth
headerAuthorizationBearer <token>

Token-based authentication using access tokens.

Request Body

application/json
  1. body
name*Name

Template display name.

description?|

Optional description of the template.

Defaultnull
thumbnail_url?|

Optional template thumbnail URL.

Defaultnull

Response Body

Successful Response

application/json
  1. response
id*Id

Template unique identifier.

name*Name

Template display name.

description*|

Optional description of the template.

thumbnail_url*|

Optional template thumbnail URL.

visibility*Visibility

Visibility level of the template.

Value in"shared""private""system"
created_by*|

Email of the template creator (null for system templates).

created_at*Created At

Creation datetime (UTC) in ISO 8601 format.

swatch_source?|

Fields for the derived cover swatch, from any one preset in the template. Null for an empty template, and for a template whose presets carry none of the three fields. Only populated by GET /preset/templates.

Defaultnull
preset_count?Preset Count

Number of non-hidden presets attached to this template.

Default0
preset_types?array<>

Distinct tool types of the non-hidden presets in this template, sorted (usually exactly one — a template is single-tool in practice). Empty for an empty template. Only populated by GET /preset/templates.

groups?array<string>

Group names this template is shared with through any non-hidden preset.

preset_previews?array<>

Up to 8 non-hidden presets, newest first (mirrors the template editor rail order). Only populated by GET /preset/templates.

curl -X POST "https://example.com/preset/templates" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "string",  "name": "string",  "description": "string",  "thumbnail_url": "string",  "visibility": "shared",  "created_by": "string",  "created_at": "string",  "swatch_source": null,  "preset_count": 0,  "preset_types": [    "flat_2_model"  ],  "groups": [    "string"  ],  "preset_previews": [    {      "preset_code": "string",      "name": "string",      "preview_url": null,      "framing": null,      "angle": null    }  ]}