List template pages
Lists all pages of a template.
This endpoint returns all pages defined in a multi-page template.
Parameters
id string
REQUIRED
The template id of the template that you want to retrieve the pages.
Sample Request
Here’s a sample request to list all pages of a template:
GET /v1/template/:id/pages
fetch(`https://api.templated.io/v1/template/${id}/pages`, { method: 'GET', headers: { 'Authorization' : `Bearer ${API_KEY}` }})
Response
The API returns an array of JSON objects with the page details.
[ { "page": "page-1", "layers": { "text-1": { "layer": "text-1", "type": "text", "description": "Title text" }, "image-1": { "layer": "image-1", "type": "image", "description": "Cover image" } } }, { "page": "page-2", "layers": { "text-2": { "layer": "text-2", "type": "text", "description": "Body text" } } } ...]
Each page object contains the following properties:
page string
The unique identifier of the page.
layers object
An object containing all layers within this page, where each key is the layer ID and the value is the layer object with its properties (layer, type, description, etc.).