Change a template
Changes the name, description, roles or fields. Send only what changes;
roles and fields each replace the whole list.
A template has 1 to 10 roles and up to 500 fields. Every field must point at a role in the template, sit on a page that exists, and fit inside the page. Documents already made from this template do not change.
Send baseVersion (the template's layoutVersion when you read it) with
roles or fields. If someone saved them since, nothing is saved and the
answer is 409. A successful save returns warnings: things worth a look
that did not stop the save.
Permission: signing:manage @ workspace/{workspaceId}/signingTemplate/{signingTemplateId}
Authorization
ServiceAccountKey A service account API key, sent whole as a bearer token:
hsk_<40 hex>.hss_<64 hex>.
In: header
Path Parameters
The template to act on. IDs come from List templates.
Query Parameters
The workspace the template or document belongs to. Send it in the query string on every call, including the PDF upload. IDs come from List workspaces.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/signing/templates/RVeFlYdDGgoESUXespsR?workspaceId=ws_a1b2c3" \ -H "Content-Type: application/json" \ -d '{}'{ "success": true, "template": { "id": "string", "name": "string", "description": "string", "pdf": { "fileName": "string", "pageCount": 0, "pageSizes": [ { "w": 0, "h": 0 } ], "sha256": "string", "md5": "string", "bytes": 0 }, "roles": [ { "roleId": "client", "label": "Client", "order": 1 } ], "fields": [ { "fieldId": "client_sig", "roleId": "client", "type": "signature", "label": "string", "required": true, "page": 0, "x": 0, "y": 0, "w": 0, "h": 0 } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "archivedAt": "2019-08-24T14:15:22Z", "layoutVersion": 0, "layoutChangedBy": null, "duplicatedFrom": "string", "previousPdfs": [ { "sha256": "string", "fileName": "string", "pageCount": 0, "replacedAt": "2019-08-24T14:15:22Z", "replacedBy": "string" } ] }, "warnings": [ { "code": "string", "level": "error", "fieldId": "string", "roleId": "string", "otherFieldId": "string", "message": "string" } ]}Archive a template DELETE
Hides the template from the list. It is not deleted, and documents already made from it are not affected. **Permission:** `signing:manage` @ `workspace/{workspaceId}/signingTemplate/{signingTemplateId}`
Download a template's PDF GET
The original PDF, as uploaded. **Permission:** `signing:read` @ `workspace/{workspaceId}/signingTemplate/{signingTemplateId}`