List Templates

The list templates endpoint allows you to retrieve a list of all your templates.

Request

GET /v1/templates

Query Parameters

ParameterTypeDescription
pageIndexnumberOptional. 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

FieldTypeDescription
pageSizenumberThe maximum number of templates to return per page. Always 100.
pageIndexnumber1-based index of the current page
templatesarrayArray 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);