List Templates
The list templates endpoint allows you to retrieve a list of all your templates.
Request
GET /v1/templates
Query Parameters
Parameter | Type | Description |
---|---|---|
pageIndex | number | Optional. The 1-based page index to retrieve. Defaults to 1. |
Response
{
"pageSize": number,
"pageIndex": number,
"templates": TemplateMetadata[]
}
See the GET Template endpoint response description for more
information on the TemplateMetadata
type.
Response Fields
Field | Type | Description |
---|---|---|
pageSize | number | The maximum number of templates to return per page. Always 100. |
pageIndex | number | 1-based index of the current page |
templates | array | Array of template objects |
Examples
const apiKey = "Your_API_Key";
const response = await fetch("https://templatedocs.io/api/v1/templates", {
headers: {
"Authorization": `Bearer ${apiKey}`
}
});
const templates = await response.json();
console.log(templates);