Gets template lock information
Retrieves general information about a template lock.
The user requesting the information must be the same user who locked the template.
You can use this method to recover the lock information,
including the lockToken,
for a locked template.
The X-DocuSign-Edit header is included in the response.
See
TemplateLocks: create
for a description of the X-DocuSign-Edit header.
Related topics
Authorization
OAuth2 OAuth 2.0 access token obtained via Authorization Code Grant or JWT Grant.
In: header
Path Parameters
The external account number (int) or account ID GUID.
The ID of the template.
Response Body
application/json
application/json
curl -X GET "https://example.com/v2.1/accounts/string/templates/string/lock"{ "errorDetails": { "errorCode": "string", "message": "string" }, "lockDurationInSeconds": "string", "lockedByApp": "string", "lockedByUser": { "accountId": "string", "accountName": "string", "activationAccessCode": "string", "email": "string", "errorDetails": { "errorCode": "string", "message": "string" }, "ipAddress": "string", "loginStatus": "string", "membershipId": "string", "sendActivationEmail": "string", "uri": "string", "userId": "string", "userName": "string", "userStatus": "string", "userType": "string" }, "lockedUntilDateTime": "string", "lockToken": "string", "lockType": "string", "useScratchPad": "string"}Updates a template document PUT
This methods updates an existing template document.
Locks a template POST
This method locks the specified template and sets the time until the lock expires to prevent other users or recipients from changing the template. The response to this request includes a `lockToken` parameter that you must use in the `X-DocuSign-Edit` header for every PUT method (typically a method that updates a template) while the template is locked. If you do not provide the `lockToken` when accessing a locked template, you will get the following error: ``` { "errorCode": "EDIT_LOCK_NOT_LOCK_OWNER", "message": "The user is not the owner of the lock. The template is locked by another user or in another application" } ``` ### The X-DocuSign-Edit header The `X-DocuSign-Edit` header looks like this and can be specified in either JSON or XML. **JSON** ``` { "LockToken": "token-from-response", "LockDurationInSeconds": "600" } ``` **XML** ``` <DocuSignEdit> <LockToken>token-from-response</LockToken> <LockDurationInSeconds>600</LockDurationInSeconds> </DocuSignEdit> ``` In the actual HTTP header, you would remove the linebreaks: ``` X-DocuSign-Edit: {"LockToken": "token-from-response", "LockDurationInSeconds": "600" } or X-DocuSign-Edit:<DocuSignEdit><LockToken>token-from-response</LockToken><LockDurationInSeconds>600</LockDurationInSeconds></DocuSignEdit> ``` ### Related topics - [Common API Tasks: Locking and unlocking envelopes](https://www.docusign.com/blog/dsdev-common-api-tasks-locking-and-unlocking-envelopes)