HumaDocs
Upload templates, send documents for signature, follow who has signed, and download the sealed result.
These endpoints send PDFs for signature and track them to the finished, sealed document. The signer's own page has no API here: a signer only ever uses the private link they were sent.
export HOS_API="https://hos-api-1.onrender.com/api/v1"export HOS_KEY="hsk_4f8a....hss_..."New to this? HumaDocs covers templates, documents, signing order and what signers see. Security and the audit record covers encryption, links, the audit pages and the seal. This page describes the API surface.
This reference tells you which permission an endpoint needs. It does not explain how roles, policies, and assignments fit together. That model is in Access control.
Sending a document
Find the template.
List templates gives you a
templateId and the roleId of each role. To make one,
upload a PDF, then
add roles and fields.
Send it.
Send a template with one
person for each roleId. Each person is invited by email, text message, or not at all,
depending on delivery.
Follow it. Get a document shows each person's status, and List a document's activity shows everything that happened.
Download the result.
When status is completed,
download the finished PDF.
Signing links are secrets
Anyone who has a person's signing link can sign as that person. Three responses carry links:
| Endpoint | Returns |
|---|---|
| Send a template and Send a draft | The link of each person invited by that send, in invites[].url |
| Get each person's current signing link | The link each person can use now. Reading it changes nothing |
| Make a new signing link | A new link for one person. Their previous link stops working |
Do not log these responses, and send each link only to its person.
Changing roles and fields safely
A template, and a document that is still a draft, carries a layoutVersion that goes up by
one every time its roles or fields change. When you change them, send the version you read
as baseVersion. If someone saved in between, nothing is saved and the answer is 409 with
the version stored now: read again and make your change on that.
- Check a template's roles and fields
runs the same check a save runs, without saving. A failed save returns the same list as
issues. - Read the printed words on a page and find the blanks to fill in help you place fields where a person writes. Every box uses the same units as fields.
- Each has a document version under Fields as well.
- Replacing the PDF also raises
layoutVersion(below).
Copying, and putting in a new version of the PDF
When a document's wording changes but its layout does not, keep the fields and swap the file behind them. Positions are fractions of the page, so every field keeps its place.
| To | Call | What it changes |
|---|---|---|
| Copy a template | Copy a template | A new template with its own copy of the PDF. The original is not changed |
| Put a new PDF behind a template | Replace a template's PDF | That template only. Documents already made from it keep their own copy |
| Copy a document | Copy a document as a new draft | A new draft from a document in any status, with no people on it |
| Put a new PDF behind a draft | Replace a draft's PDF | That draft only. A sent document cannot change |
| Turn a document into a template | Save a document as a new template | A new template. No existing template changes |
To keep the old template and make a new one with the new file, copy it, then replace the copy's PDF:
curl -X POST "$HOS_API/signing/templates/tpl_a1b2c3/duplicate?workspaceId=ws_a1b2c3" \
-H "Authorization: Bearer $HOS_KEY"curl -X POST "$HOS_API/signing/templates/tpl_d4e5f6/pdf?workspaceId=ws_a1b2c3" \
-H "Authorization: Bearer $HOS_KEY" \
-F "[email protected]"Four things to know about a replace:
- Fewer pages needs a choice. If fields sit on pages the new file does not have, the
answer is 409 with
needsChoiceand areport, and nothing changes. Send the file again withmissingPageFieldsset todeleteorlastPage. Moved fields keep their place on the page and may overlap boxes already there;report.movedFieldIdsnames them. - A page of a different size is not refused. It is listed in
report.resizedPages. The fields there keep their place on the page but may stretch. - It counts as a change.
layoutVersiongoes up by one, so a save made with the oldbaseVersionanswers 409. Read the template or draft again after a replace. - The old file is not kept. The new file overwrites it at the same place, and
previousPdfskeeps a note of the old one: its SHA-256, name and page count.
HumaDocs never edits the text inside a PDF. Change the file elsewhere, then replace it.
What needs you
List what needs you returns the documents waiting for the caller: their turn to sign (matched by account email, so never for an API key), and documents they sent that were declined, expired or could not be finished.
Two things that surprise people
A document is a copy. Sending copies the template's PDF, roles and fields into the document. Changing the template afterwards never changes it. To change one document's fields, change the draft with Change a draft.
Errors are sentences. error is a plain sentence meant for a person, such as
Add a person for "Client"., and is not a stable code. Sending a draft returns every
problem at once.
Checking a finished document
Check a finished document needs no key. Send the file's SHA-256 fingerprint and it says whether HumanikOS made that exact file.
Cancel a booking POST
Deletes the appointment at the provider and notifies everyone on it. Cancelling frees the slot for somebody else and releases it from the link's daily and per-slot caps. No body. The token is the whole request.
List templates GET
Templates in the workspace, without archived ones unless you ask. **Permission:** `signing:read` @ `workspace/{workspaceId}`