Surepass
Templates

Update template

PUT
/api/v1/templates/update

Update an existing template. name, folder, file_id, and signers are all optional in the request body.

  • If signers is provided, it replaces the saved signer blueprint completely and new field_id values are generated for all elements.
  • If signers is omitted, existing signers are preserved.
  • If file_id is provided, it must belong to the authenticated user.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication. Paste your access token below.

Request Body

application/json
  1. body
client_id*string

Template ID to update (template_...).

file_id?string

If provided, must belong to the authenticated user.

name?string

New template name.

folder?string

New folder name.

signers?array<>

If provided, replaces the saved signer blueprint completely and regenerates all field_id values. If omitted, existing signers are preserved.

Response Body

Template updated.

application/json
  1. response

Standard response envelope.

status_code?integer

HTTP status code echoed in the response body.

message?string

Human-readable result message.

success?boolean

true when the request succeeded.

data?
Example Request
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"
          }
        ]
      }
    ]
  }
}