Get a template
Permission: signing:read @ 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.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/signing/templates/RVeFlYdDGgoESUXespsR?workspaceId=ws_a1b2c3"{ "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" } ] }}Upload a PDF as a new template POST
Makes a template from one PDF, with no roles or fields yet. Add them with [Change a template](/docs/api-reference/signing/templates/updateSigningTemplate). The PDF can be up to 25 MB and 200 pages. A password protected PDF is refused. To put a different file behind the same fields later, use [Replace a template's PDF](/docs/api-reference/signing/templates/replaceSigningTemplatePdf). Send `workspaceId` in the query string. A `workspaceId` placed only in the form fields is not read. **Permission:** `signing:manage` @ `workspace/{workspaceId}` #### Request ```bash curl -X POST "$HOS_API/signing/templates?workspaceId=ws_a1b2c3" \ -H "Authorization: Bearer $HOS_KEY" \ -F "[email protected]" \ -F "name=Service agreement" ```
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}`