Download Template
The download template endpoint allows you to download the actual template file.
Request
GET /v1/templates/{template_id}/content
Path Parameters
Parameter | Type | Description |
---|---|---|
template_id | string | The unique identifier of the template to download |
Response
The response will be the template file in its original format (a Word document) with the appropriate Content-Type
header.
The response is a binary file stream, not a JSON response. Make sure to handle the response accordingly in your code.
Examples
const apiKey = "Your_API_Key";
const templateId = "template_123";
const response = await fetch(`https://templatedocs.io/api/v1/templates/${templateId}/content`, {
headers: {
"Authorization": `Bearer ${apiKey}`
}
});
const blob = await response.blob();