Skip to content

List folder templates

Lists all templates of a folder.
You can filter and customize the results using various query parameters.

Parameters

id string REQUIRED The folder id that you want to retrieve the templates.

Query Parameters

ParameterTypeDefaultDescription
querystring-Filter templates by name
pageinteger0Page number for pagination
limitinteger25Number of results per page
widthinteger-Filter templates by width
heightinteger-Filter templates by height
tagsstring-Filter templates by tags
includeLayersbooleanfalseInclude template layers in response

Sample Request

Here’s a sample request to list all templates of a folder:

ENDPOINT
GET /v1/folder/:id/templates
fetch(`https://api.templated.io/v1/folder/${id}/templates`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
},
// Example with all query parameters
params: {
query: 'Template Name',
page: 0,
limit: 25,
width: 1920,
height: 1080,
tags: 'tag1,tag2',
includeLayers: true
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Response

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

[
{
"id": "tpl_123abc",
"name": "Instagram Post",
"width": 1080,
"height": 1080,
"thumbnail": "https://templated-assets.s3.amazonaws.com/thumbnail-123.png",
"folderId": "fld_456def",
"layersCount": 5,
"createdAt": "2024-03-20T10:30:00Z",
"updatedAt": "2024-03-20T10:30:00Z",
}
]