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.

Anyone who has a person's signing link can sign as that person. Three responses carry links:

EndpointReturns
Send a template and Send a draftThe link of each person invited by that send, in invites[].url
Get each person's current signing linkThe link each person can use now. Reading it changes nothing
Make a new signing linkA 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.

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.

ToCallWhat it changes
Copy a templateCopy a templateA new template with its own copy of the PDF. The original is not changed
Put a new PDF behind a templateReplace a template's PDFThat template only. Documents already made from it keep their own copy
Copy a documentCopy a document as a new draftA new draft from a document in any status, with no people on it
Put a new PDF behind a draftReplace a draft's PDFThat draft only. A sent document cannot change
Turn a document into a templateSave a document as a new templateA 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 needsChoice and a report, and nothing changes. Send the file again with missingPageFields set to delete or lastPage. Moved fields keep their place on the page and may overlap boxes already there; report.movedFieldIds names 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. layoutVersion goes up by one, so a save made with the old baseVersion answers 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 previousPdfs keeps 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.

On this page