Skip to content

List template layers

Lists all layers of a template.
Locked layers will not be returned.

Parameters

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

Sample Request

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

ENDPOINT
GET /v1/template/:id/layers
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.