Docs

Save Document As Template

POST /documents/{documentId}/save-as-template

POST/documents/{documentId}/save-as-template

Snapshots the document (its file name as title, content, filter definitions with entity-typed defaults cleared) into a new org template, or over replaceTemplateId, which keeps its id. Needs View on the doc's file and org admin on its organization. Shares and links are not copied, nor are data tables' stamps and authors. A replace that races another write to the template answers 409 with currentVersion and saves nothing. The new template's scope follows the doc's drive; replacing an Organization template with content that uses event-only filters or tokens answers 400.

Path Parameters

FieldTypeRequiredDescription
documentIduuidRequired

Request Body

FieldTypeRequiredDescription
namestringOptional
descriptionstringOptional
categorystringOptional
replaceTemplateIduuidOptional

Response

Type: uuid