Templates
Update template
PUT
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.
bearerAuthheader
AuthorizationBearer <token>Bearer token authentication. Paste your access token below.
application/json- body
client_id*stringTemplate ID to update (template_...).
file_id?stringIf provided, must belong to the authenticated user.
name?stringNew template name.
folder?stringNew folder name.
signers?array<>If provided, replaces the saved signer blueprint completely and
regenerates all field_id values. If omitted, existing signers
are preserved.
Template updated.
application/json- response
Standard response envelope.
status_code?integerHTTP status code echoed in the response body.
message?stringHuman-readable result message.
success?booleantrue when the request succeeded.
data?curl -X PUT 'https://prod-esign-api-v2.surepass.app/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"
}
]
}
]
}'Example Response
{
"status_code": 0,
"message": "string",
"success": true,
"data": {
"client_id": "string",
"name": "string",
"file_id": "string",
"folder": "string",
"signers": [
{
"sign_type": "aadhaar",
"auth_mode": 1,
"max_retry": 1,
"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",
"label": "string",
"field_id": "string",
"width": 0,
"height": 0,
"font_size": 0,
"format": "string",
"value": "string"
}
]
}
]
}
}