Skip to content
Proud to collaborate with Microsoft for Startups

docusign.template-locks.put-template-lock ​

Updates the lock information for a locked template. You must include the X-DocuSign-Edit header as described in TemplateLocks: create. Use this method to change the duration of the lock (lockDurationInSeconds) or the lockedByApp string. The request body is a full lockRequest object, but you only need to specify the properties that you are updating. For example: { "lockDurationInSeconds": "3600", "lockedByApp": "My Application" }

Updates a template lock.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-docusign
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
templateidstringYes—The ID of the template.
lockdurationinsecondsstringNo—The number of seconds to lock the envelope for editing. Must be greater than 0 seconds.
lockedbyappstringNo—A friendly name of the application used to lock the envelope. Will be used in error messages to the user when lock conflicts occur.
locktypestringNo—The type of lock. Currently edit is the only supported type.
templatepasswordstringNo—The password for the template. 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.
usescratchpadstringNo—When true, a scratchpad is used to edit information.

Output Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
templateidstringYes—The ID of the template.
lockdurationinsecondsstringNo—The number of seconds to lock the envelope for editing. Must be greater than 0 seconds.
lockedbyappstringNo—A friendly name of the application used to lock the envelope. Will be used in error messages to the user when lock conflicts occur.
locktypestringNo—The type of lock. Currently edit is the only supported type.
templatepasswordstringNo—The password for the template. 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.
usescratchpadstringNo—When true, a scratchpad is used to edit information.
status_codeintegerNo—HTTP status code of the completed call
responsejsonNo—Parsed JSON response body
failure_reasonstringNo——
failure_typestringNo——
failed_atstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeWaiting to call PUT /v2.1/accounts/{accountId}/templates/{templateId}/lock
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform PUT /v2.1/accounts/{accountId}/templates/{templateId}/lock
* (any state)failfailedRecord the failure reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "docusign.template-locks.put-template-lock",
  "initial_data": {
    "base_url": "value",
    "accountid": "value",
    "templateid": "value"
  }
}