Skip to content
Open with AI

Get a template

GET
/v1/templates/{template_id}
curl --request GET \
--url 'https://api.editsquare.com/v1/templates/tpl_8f2c1d4e6a7b9c0d1e2f3a4b5c6d7e8f?project_id=proj_jd71dcg41pjy7rax1v2h4pvcmd7gtar9' \
--header 'Authorization: Bearer <token>'

Retrieves one template, including every field it exposes - the keys a render’s values object can set.

template_id
required

Template ID

string
>= 1 characters
Example
tpl_8f2c1d4e6a7b9c0d1e2f3a4b5c6d7e8f

Template ID

project_id
required

Project ID

string
>= 1 characters
Example
proj_jd71dcg41pjy7rax1v2h4pvcmd7gtar9

Project ID

The template

Media typeapplication/json
object
id
required
string
name
required
string
description
required
string | null
project_id
required
string
target_composition_id
required

The composition the primary target renders. Superseded by targets.

string
targets
required

What the template renders, in order. The first is the primary; a render picks one by target.

Array<object>
object
key
required

The value a render’s target takes.

string
name
required

The name of the composition or sequence it renders.

string
width
required
number
height
required
number
duration
required

Seconds.

number
field_count
required
number
fields
required
Array<object>
object
key
required

The key to use in a render’s values object.

string
label
required
string | null
description
required
string | null
kind
required

What the field drives.

string
widget
required

How the editor renders the input.

string | null
default_value
required
Any of:
string
reaches
required

The keys of the targets whose render this field can change: each renders a variable the field sets. A field that reaches no target is still accepted.

Array<string>
fonts

A font field that offers only some fonts: the values it accepts. Absent when any font is accepted.

Array<string>
Example
{
"id": "tpl_8f2c1d4e6a7b9c0d1e2f3a4b5c6d7e8f",
"name": "Welcome video",
"description": "One clip per new customer.",
"project_id": "proj_jd71dcg41pjy7rax1v2h4pvcmd7gtar9",
"target_composition_id": "comp_4f1f0f7c",
"targets": [
{
"key": "story",
"name": "Story 9:16",
"width": 1080,
"height": 1920,
"duration": 6
}
],
"field_count": 3,
"fields": [
{
"key": "customer_name",
"label": "Customer name",
"description": "Shown on the opening card.",
"kind": "control",
"widget": "text",
"default_value": "Acme",
"reaches": [
"story",
"square"
],
"fonts": [
"inter",
"playfair-display"
]
}
]
}

Template not found

Media typeapplication/json
object
error
required
string
Example
{
"error": "Render not found"
}