Skip to content

List template layers

Lists all layers of a template.
By default, locked layers are not returned. Set includeLockedLayers=true to include them.

Parameters

id string REQUIRED
The template id of the template that you want to retrieve the layers.

includeLockedLayers boolean
Defaults to false. When true, returns layers even if they are marked as locked in the template.

Sample Request

Here’s a sample request to list all layers of a template:

ENDPOINT
GET /v1/template/:id/layers
ENDPOINT (Include locked layers)
GET /v1/template/:id/layers?includeLockedLayers=true
REQUEST
fetch(`https://api.templated.io/v1/template/${id}/layers`, {
method: 'GET',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Response

The API returns an array of JSON objects with the layer details.

[
{
"layer": "text-1",
"type": "text",
"description": "",
},
{
"layer": "image-1",
"type": "image",
"description": "Profile image layer",
}
...
]

Each layer object contains the following properties:

layer string
The unique identifier of the layer.

type string
The type of layer (e.g., “text”, “image”, “shape”, etc.).

description string
Optional description of the layer.
The description can be added in the Editor.