Change a draft
Changes a document that has not been sent. A draft saves what you send even when it is incomplete; every check runs when it is sent.
roles and fields change this document only, never its template, and
must be sent together, with baseVersion (the document's layoutVersion
when you read it). If someone saved them since, the answer is 409 and
nothing is saved. When they fail the check, the 400 lists every problem in
issues. prefills are values you fill in for the signer, by
fieldId; the signer sees them filled and read only, unless the field is
in prefillEditable.
Permission: signing:send @ workspace/{workspaceId}/signingRequest/{signingRequestId},
plus contact:read @ workspace/{workspaceId} when any signer is a CRM contact.
Authorization
ServiceAccountKey A service account API key, sent whole as a bearer token:
hsk_<40 hex>.hss_<64 hex>.
In: header
Path Parameters
The document to act on. IDs come from List documents.
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/requests/sZG0nWcpWKBF7zT8CqcN?workspaceId=ws_a1b2c3" \ -H "Content-Type: application/json" \ -d '{}'{ "success": true, "request": { "id": "string", "templateId": "string", "templateName": "string", "name": "string", "message": "string", "status": "draft", "order": "parallel", "delivery": "email", "sendFrom": { "email": "[email protected]", "phone": "string" }, "layoutVersion": 0, "layoutChangedBy": null, "previousPdfs": [ { "sha256": "string", "fileName": "string", "pageCount": 0, "replacedAt": "2019-08-24T14:15:22Z", "replacedBy": "string" } ], "snapshot": { "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 } ] }, "signerSummary": { "total": 0, "completed": 0 }, "prefills": { "property1": "string", "property2": "string" }, "prefillEditable": [ "string" ], "expiresAt": "2019-08-24T14:15:22Z", "remindEveryDays": 2, "createdAt": "2019-08-24T14:15:22Z", "sentAt": "2019-08-24T14:15:22Z", "allSignedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "declinedAt": "2019-08-24T14:15:22Z", "voidedAt": "2019-08-24T14:15:22Z", "expiredAt": "2019-08-24T14:15:22Z", "result": null, "finalizeError": "string" }, "signers": [ { "id": "string", "roleId": "string", "name": "string", "email": "string", "contactId": "string", "phone": "string", "order": 0, "status": "pending", "consentAt": "2019-08-24T14:15:22Z", "openedAt": "2019-08-24T14:15:22Z", "lastEmailAt": "2019-08-24T14:15:22Z", "lastSmsAt": "2019-08-24T14:15:22Z", "lastLinkAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "declinedAt": "2019-08-24T14:15:22Z", "declineReason": "string", "ip": "string", "userAgent": "string", "timezone": "string", "remindersSent": 0, "nextReminderAt": "2019-08-24T14:15:22Z" } ], "warnings": [ { "code": "string", "level": "error", "fieldId": "string", "roleId": "string", "otherFieldId": "string", "message": "string" } ]}Delete a document DELETE
Removes the document, its files, the people on it and its activity record. Refused while it is out for signing or while its finished PDF is being made; cancel it first. A finished document still verifies after it is deleted: [Check a finished document](/docs/api-reference/signing/finished-documents/verifySignedDocument) answers `found: true` with `deleted: true`. **Permission:** `signing:manage` @ `workspace/{workspaceId}/signingRequest/{signingRequestId}`
Send a draft POST
Sends a draft. Every role needs a person and at least one field, the name must be set, and the sign-by date must be more than an hour away. All problems are returned in one sentence list. CRM contacts are read again now, so a changed address is used and a contact who opted out since the draft was saved is refused. The response carries each invited person's link in `invites`, and the link of each person in a later turn in `laterLinks` (made now, sent on their turn); **a link is a secret**. **Permission:** `signing:send` @ `workspace/{workspaceId}/signingRequest/{signingRequestId}`, plus `email:send` @ `workspace/{workspaceId}` (or `email:me:use` with the address assigned to you) to send from a workspace email address, and `phone:send` @ `workspace/{workspaceId}` to send text messages. The HumaDocs address (`[email protected]`) needs nothing more.