Skip to navigation

TemplateLocks Resource

View as Markdown

The TemplateLocks resource provides methods that allow you to manage locks on a template.

To prevent users from changing a template while another user is modifying it, you can lock the template and set the time until the lock expires.

For example, you would use the following flow:

  1. Lock the template.
  2. Make changes to template.
  3. Delete the template lock and save the changes. If the template has a password, you must supply the template password to save the changes.

Note: To use template locks, the user must have envelope locking capability enabled.

Methods supported

MethodDescription
createPOST /restapi/v2.1/accounts/{accountId}/templates/{templateId}/lock
Locks a template.
deleteDEL /restapi/v2.1/accounts/{accountId}/templates/{templateId}/lock
Deletes a template lock.
getGET /restapi/v2.1/accounts/{accountId}/templates/{templateId}/lock
Gets template lock information.
updatePUT /restapi/v2.1/accounts/{accountId}/templates/{templateId}/lock
Updates a template lock.

TemplateLocks properties

PropertyTypeDescription
errorDetailserrorDetailsThis object describes errors that occur. It is only valid for responses and ignored in requests.
lockDurationInSecondsstringThe number of seconds until the lock expires when there is no activity on the template.

If no value is entered, then the default value of 300 seconds is used. The maximum value is 1,800 seconds.

The lock duration can be extended.
lockedByAppstringSpecifies the friendly name of the application that is locking the envelope.
lockedByUseruserInfoA complex type containing information about the user that has the envelope or template locked.
lockedUntilDateTimestringThe date and time that the lock expires.
lockTokenstringA unique identifier provided to the owner of the lock. You must use this token with subsequent calls to prove ownership of the lock.
lockTypestringThe type of lock. Currently edit is the only supported type.
useScratchPadstringWhen true, a scratchpad is used to edit information.