Update Template
The update template endpoint allows you to modify a specific template's metadata.
Request
PUT /v1/templates/{template_id}
Path Parameters
Parameter | Type | Description |
---|---|---|
template_id | string | The unique identifier of the template to update |
Request Body
{
"name": string
}
Request Fields
Field | Type | Description |
---|---|---|
name | string | New name for the template. Must end with ".docx" |
Currently, only the template name can be updated. The name must be unique within your templates and end with ".docx".
Response
A successful request returns an empty response with a 200 status code.
Examples
const apiKey = "Your_API_Key";
const templateId = "template_123";
const response = await fetch(`https://templatedocs.io/api/v1/templates/${templateId}`, {
method: 'PUT',
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "new-template-name.docx"
})
});