Templates

Get a template with its presets

GET
/preset/templates/{template_id}

Only accessible if the user created the template, reaches it through a preset shared with one of their groups, or if it is a system template.

Authorization

token_auth
headerAuthorizationBearer <token>

Token-based authentication using access tokens.

Path Parameters

template_id*string

Query Parameters

include_presets?Include Presets

Set false to fetch only the template metadata (e.g. resolving an id to a name) without shipping every preset's instruction_data.

Defaulttrue

Response Body

Successful Response

application/json
  1. response

A single template plus everything a client needs to render it correctly for the caller.

Subclasses the list DTO deliberately: GET /preset/templates returns up to hundreds of rows and must not grow fields it cannot populate per row, so its shape stays byte-identical for existing API consumers.

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.

viewer_role*Viewer Role

How the caller reaches this template. 'owner' (they created it), 'system' (a default template), 'team' (reached through a preset shared with one of their groups), or 'admin' (reached only because the caller is an admin).

Value in"owner""team""system""admin"
can_edit*Can Edit

True only when the caller may rename or delete this template and edit the presets inside it — i.e. viewer_role == 'owner'. Mirrors the ownership check enforced by PATCH and DELETE /preset/templates/<id>.

can_manage_presets*Can Manage Presets

True when the caller may assign or unassign presets to this template — owners and group members. False for admins viewing someone else's template: the endpoint would accept them, but restructuring a customer's template is deliberately not offered.

owner_user_id?|

Numeric id of the template owner, for linking to the account. Populated only for admin callers; null for everyone else and for system templates.

Defaultnull
presets?array<>|

The template's non-hidden presets, newest first. Null when the request passed include_presets=false.

Defaultnull
curl -X GET "https://example.com/preset/templates/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    }  ],  "viewer_role": "owner",  "can_edit": true,  "can_manage_presets": true,  "owner_user_id": null,  "presets": null}