Update template
Update an existing template. name, folder, file_id, and
signers are all optional in the request body.
- If
signersis provided, it replaces the saved signer blueprint completely and newfield_idvalues are generated for all elements. - If
signersis omitted, existing signers are preserved. - If
file_idis provided, it must belong to the authenticated user.
Authorization
bearerAuth Bearer token authentication — paste your access token below.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Template ID to update (template_...).
If provided, must belong to the authenticated user.
New template name.
New folder name.
If provided, replaces the saved signer blueprint completely and
regenerates all field_id values. If omitted, existing signers
are preserved.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/v1/templates/update" \ -H "Content-Type: application/json" \ -d '{ "client_id": "template_xxx", "name": "Employment Offer Template v2", "folder": "HR Updated", "signers": [ { "sign_type": "suresign", "max_retry": 2, "reason": "Employer sign updated", "accept_virtual_sign": true, "elements": [ { "x": 140, "y": 120, "page": 0, "alignment": "center", "type": "signature" } ] } ] }'{ "status_code": 0, "message": "string", "success": true, "data": { "client_id": "string", "name": "string", "file_id": "string", "folder": "string", "signers": [ { "sign_type": "aadhaar", "auth_mode": 0, "max_retry": 0, "pfx_id": "string", "reason": "string", "verify_email": true, "verify_mobile": true, "accept_virtual_sign": true, "verify_location": true, "location_source": "device", "enforce_geofence": true, "latitude": 0, "longitude": 0, "radius": 0, "elements": [ { "x": 0, "y": 0, "page": 0, "alignment": "string", "type": "signature", "field_id": "string", "width": 0, "height": 0, "font_size": 0, "format": "string", "value": "string" } ] } ] }}Save template POST
Save a reusable template blueprint for a file. A template stores the source `file_id` and an ordered `signers` array, where each signer contains its own PDF elements and optional signer-level defaults. - `signers` is ordered: the first template signer maps to the first runtime signer supplied later in `initialize-from-template`, and so on. - Every signer must contain at least one `signature` element. - A `field_id` is generated automatically for each saved element and returned in template reads; those values are what `initialize-from-template.signers[].element_values` uses later. - `file_id` must belong to the authenticated user.
Initialize Esign from template POST
Start an Esign session using a previously saved template. The template contributes `file_id`, signer elements, and signer defaults; the request contributes top-level Esign options plus runtime signer data in the **same order** as the template's `signers` array. - Runtime signer count must match the template signer count. - `element_values` overrides template element `value`s at runtime by template `field_id`; position and type still come from the template. - Template signer defaults are merged with runtime signer input before the normal `initialize-esign` validation flow runs. - `full_name` should be supplied, `reason` must be supplied unless saved in the template, and at least one of `email` or `mobile` must be present. - This endpoint creates a real Esign flow, just like `initialize-esign`.