Template Update
Replaces the contents of an existing signature template. The request body is the same shape as signatures-template-create, and it replaces the template entirely: documents, recipients, sign groups and fields are all overwritten by what is sent, not merged into what is already there. Settings under template are replaced the same way, so re-send every value you want to keep.
Updating a template does not touch envelopes already created from it. Changes apply only to envelopes created from the template afterwards, so an update is safe to run against a template that is already in use.
To move a template between folders without replacing its contents, use signatures-template-edit instead, which changes folderId and nothing else.
template.templateName remains the only value the server requires, and every templateRole must still be unique across recipients and sign groups together. Documents must already be in Storage: upload each one with signatures-document-upload and reference the returned id in documents[].urn, within the 24-hour Storage window. Replacing the document list means re-supplying those ids, not just the ones that changed.
This operation is not metered.
JWT token to authenticate the request.
In: header
API key, sent as a request header.
In: header
Path Parameters
GUID of the template to replace, as returned by signatures-template-create in result.data.template.id.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Body for creating or updating a signature envelope template. It mirrors signatures-envelope-create, with three differences: the envelope-level settings sit under template rather than envelope; that object carries templateName, templateDescription and folderId; and recipients and sign groups are placeholders identified by templateRole rather than real people.
templateName is the only value the server requires. documents, recipients, fields and signGroups may all be absent or empty — a template can be saved as a stub and filled in later, which signatures-envelope-create does not allow.
The sections are linked by client-assigned reference ids, exactly as on signatures-envelope-create: each document, recipient and sign group carries an id you choose, fields points at those ids, and every id must be unique within the request — duplicates are rejected with DUPLICATE_REFERENCE_DOCUMENT_ID, DUPLICATE_REFERENCE_RECIPIENT_ID or DUPLICATE_REFERENCE_SIGNGROUP_ID.
Response Body
application/json
application/json
application/json
curl -X PUT "https://example.com/signatures/template/17e540aa-d1dd-4714-9cb3-2d28504a048d/update" \ -H "Content-Type: application/json" \ -d '{ "documents": [ { "referenceDocumentId": 0, "name": "Q3 Sales Report.pdf", "loadMethod": "string", "urn": "string", "externalContext": {} } ], "fields": [ { "referenceSignerId": 0, "referenceSignGroupId": 0, "referenceDocumentId": 0, "name": "Full Name Field", "value": "Approved", "type": "signature", "anchorString": "@sign_here@", "page": 0, "height": 0, "width": 0, "positionX": 0, "positionY": 0, "isRequired": true, "tooltip": "Sign here", "properties": { "fontFamily": "Helvetica", "fontSize": 0, "color": "#000000", "bold": true, "italic": true, "underline": true, "textAlign": "center", "placeholder": "Type here", "isSignedDate": true, "selectionGroup": "group1", "selectionValue": "Option A" } } ], "recipients": [ { "referenceSignerId": 0, "referenceSignGroupId": 0, "name": "Alex Johnson", "email": "name@example.com", "role": "signer", "templateRole": "Approver", "signOrder": 0, "mandatory": true, "hostEmail": "name@example.com", "isMfaEnabled": true, "phoneNumber": "+1-555-0100", "externalContext": {} } ], "signGroups": [ { "referenceSignGroupId": 0, "name": "Jane Doe", "role": "signer", "signOrder": 0, "mandatory": true, "templateRole": "Approver" } ], "template": { "subject": "Please review and sign", "message": "Please review and sign at your earliest convenience.", "senderName": "John Smith", "senderEmail": "name@example.com", "isSignOrder": true, "expireInDays": 0, "alertDaysBeforeExpiry": 0, "firstReminderDays": 0, "repeatingReminderDays": 0, "notifyWhenOpened": true, "notifyWhenSigned": true, "templateName": "NDA Template", "templateDescription": "Standard non-disclosure agreement template", "folderId": "2350a03d-c2fb-4aee-8d18-ed21b55c6686", "locale": "en-US", "timezone": "America/New_York" }, "externalContext": {} }'{ "result": { "statusCode": 200, "message": "OK", "data": { "template": { "id": "17e540aa-d1dd-4714-9cb3-2d28504a048d" }, "documents": [ { "id": "469c51e6-698c-432a-b7a4-badfee503682", "externalContext": { "id": "123" } } ], "recipients": [ { "id": "8eead47b-9eb4-447b-9d89-b2d822182c83", "externalContext": { "id": "456" } } ], "signGroups": [], "fields": [ { "id": "6f20908f-8f71-4d28-9c65-bb546d45458f", "recipientId": "8eead47b-9eb4-447b-9d89-b2d822182c83", "signGroupId": "", "documentId": "469c51e6-698c-432a-b7a4-badfee503682" } ] } }, "origin": "PUT https://api.doctavian.com/v1/signatures/template/{templateId}/update", "dateTime": "2026-07-20T12:00:00.000Z", "externalContext": { "id": "789" }, "userId": "12f0a7b9-ec67-4232-863d-46e3d4e5ba44", "operationId": "e2a9c74b0f6d485193ac5e08b21d7f6c"}{ "error": { "statusCode": 400, "message": "The template name is required.", "innerErrors": [ { "code": "TEMPLATE_NAME_REQUIRED", "message": "The template name is required.", "userMessage": "Give the template a name before saving it." } ] }, "origin": "PUT https://api.doctavian.com/v1/signatures/template/{templateId}/update", "dateTime": "2026-07-20T12:00:00.000Z", "userId": "29eeeed1-6575-4cd6-87eb-0c9f978da19a", "operationId": "8c4018a60ae91bb5346e291890d45210"}{ "error": { "statusCode": 500, "message": "An unexpected error occurred while updating the template.", "innerErrors": [ { "code": "FUNCTION_EXECUTION_ERROR", "message": "An unexpected error occurred while updating the template.", "userMessage": "Something went wrong. Please try again or contact support." } ] }, "origin": "PUT https://api.doctavian.com/v1/signatures/template/{templateId}/update", "dateTime": "2026-07-20T12:00:00.000Z", "userId": "b08de32e-e596-45ae-ac5e-5c9e263755aa", "operationId": "123e21e74ff2a16e18f56f7f44fc75f0"}