# Update a template document (/docs/reference/Rest-API/api-docs/template-documents/updateTemplateDocument)


{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

## PATCH /v2/template-documents/{document_id}

`PATCH https://api.verdocs.com/v2/template-documents/{document_id}`

### Path parameters

- `document_id` (string, uuid, required): The ID of the document to update.

### Request body

Content type `application/json`, required. Body Parameters.

- `name` (string): New name for the document.
- `order` (integer): New 1-based position for the document. A position past the end moves it last.

### Responses

#### 200: Success

Content type `application/json`.

Type: `ITemplate`

A reusable template for creating signable instruments. Templates are used to create Envelopes which contain Documents to sign.

- `counter` (integer, required): Number of times the template has been used.
- `created_at` (string, required): Creation date/time.
- `data` (string, required): Storage for arbitrary data that may be used e.g. to track source database/record IDs to relate Templates back to internal systems/applications.
- `data_catalog_id` (string): The data catalog its fields' data keys come from. Templates start with the organization's default and keep it if the default changes.
- `description` (string): Optional description for the template.
- `followup_reminders` (string, required): Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable.
- `id` (string, required): The unique ID of the template.
- `initial_reminder` (string, required): Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable.
- `is_personal` (boolean, required): If true, the template is only visible to the creator. If false, the template will also be visible to the user's organization, if any. @deprecated. See "visibility".
- `is_public` (boolean, required): If true, the template is visible publicly. Note that this does not necessarily mean it is also visible to the user's organization. It may be desirable to create documents that are public but that do not appear in the organization's shared templates list. To achieve this, set both.
- `is_sendable` (boolean, required): If true, the template is considered "sendable" (it has at least one signer, and every signer has at least one field.).
- `last_used_at` (string, required): Last-used date/time (when the template was used to create a document).
- `max_reminder_days` (integer, required): Maximum number of days (after envelope creation) for which reminders will be sent. Defaults to 14.
- `organization_id` (string, required): Organization the template lives in.
- `profile_id` (string, required): The template's owner/creator.
- `sender` (string, required): Who will "own" envelopes created from this template. Note that while either option is technically allowed for all visibility settings, "template_owner" only has an effect if visibility is "shared" or "public".
- `star_counter` (integer, required): Number of times the template has been "starred".
- `template_documents` (string): @deprecated. Use documents instead.
- `updated_at` (string, required): Last-update date/time.
- `visibility` (string): If set, the visibility level for the template.

#### 400: Request Error

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 401: Access Denied

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 404: Not Found

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 406: Invalid Parameter

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

### Example request

```bash
curl -X PATCH "https://api.verdocs.com/v2/template-documents/DOCUMENT_ID" \
    -H "Authorization: Bearer ACCESS_TOKEN" \
    -H "content-type: application/json" \
    -d '{"param": "value"}'
```
