---
title: "Deletes a template lock."
method: DELETE
path: "/v2.1/accounts/{accountId}/templates/{templateId}/lock"
tags: ["TemplateLocks"]
---

# Deletes a template lock.

`DELETE /v2.1/accounts/{accountId}/templates/{templateId}/lock`

Deletes the lock from the specified template.
The user deleting the lock must be the same user
who locked the template.

You must include the `X-DocuSign-Edit` header
as described in
[TemplateLocks: create](/docs/esign-rest-api/reference/templates/templatelocks/create/).

This method takes an optional query parameter
that lets you specify whether
changes made while the template was locked
are kept or discarded.


| Query Parameter | Description                                                                                                                                                                         |
| :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `save_changes`  | When **true** (the default), any changes made while the lock was active are saved. When **false,** any changes made while the template was locked are discarded. |


### Related topics

- [Common API Tasks: Locking and unlocking envelopes](https://www.docusign.com/blog/dsdev-common-api-tasks-locking-and-unlocking-envelopes)

## Path parameters

- `accountId` string, required
- `templateId` string, required

## Request body

- LockRequest — This request object contains information about the lock that you want to create or update.
  - `lockDurationInSeconds` string — The number of seconds to lock the envelope for editing. Must be greater than 0 seconds.
  - `lockedByApp` string — A friendly name of the application used to lock the envelope. Will be used in error messages to the user when lock conflicts occur.
  - `lockType` string — The type of lock. Currently `edit` is the only supported type.
  - `templatePassword` string — The [password for the template](https://support.docusign.com/s/document-item?bundleId=xry1643227563338&topicId=xwo1578456395432.html). If you are using a lock for a template that has a password or an envelope that is based on a template that has a password, you must enter the `templatePassword` to save the changes.
  - `useScratchPad` string — When **true,** a scratchpad is used to edit information.

## Response `200`

Successful response.

## Other responses

- `400` — Error encountered.

---

[API](https://skmtc.net/docusign/apis/docusign-esignature-rest-api.md) · [All operations](https://skmtc.net/docusign/apis/docusign-esignature-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/docusign/docusign-esignature-rest-api/revisions/77f1998c313d/schema)
