Docs
Save Document As Template
POST /documents/{documentId}/save-as-template
POST
/documents/{documentId}/save-as-templateSnapshots 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
| Field | Type | Required | Description |
|---|---|---|---|
| documentId | uuid | Required |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | |
| description | string | Optional | |
| category | string | Optional | |
| replaceTemplateId | uuid | Optional |
Response
Type: uuid