Update Template

The update template endpoint allows you to modify a specific template's metadata.

Request

PUT /v1/templates/{template_id}

Path Parameters

ParameterTypeDescription
template_idstringThe unique identifier of the template to update

Request Body

{
  "name": string
}

Request Fields

FieldTypeDescription
namestringNew name for the template. Must 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"
    })
});