M20 · REST API reference

The Contracts & E-Signature surface, one page.

The designed e-signature API surface for M20 — 28 operations organized into 5 functional areas. The document side (contracts, fields), the delivery side (recipients and sign order), the signer side (the tokenized e-sign session), and the evidence behind every executed e-signature. The module’s database schema ships today; its stored-procedure layer is being built against exactly this surface. Skim any area below.

At a glance

28 operations. Upload, build, send, sign.

Everything is POST + JSON body — no verb quirks. The builder side works on contracts, fields, and recipients; the signer side runs on tokenized links with no account required; evidence endpoints hand back what a lawyer would ask for. Every operation shares the request/response envelope used everywhere else in the CleenUI API.

28
designed operations across the Contracts surface — schema shipped, procedure layer in progress
5
functional areas (contracts, fields, recipients, signing, evidence & audit)
12
field types — signature and initials down to checkboxes — placed by one drag-and-drop builder
POST
the only method — consistent JSON body across every endpoint
Contracts

Contracts.

The document itself — a PDF in blob storage plus a status that derives from its recipients: Draft, Sent, Partially Signed, Fully Executed, with Voided and Expired kept distinct. Templates are contracts with a flag; clone records lineage, so any executed contract traces back to the template it came from.

10 operations
POST/contract/contract/saveSave a contract: name, description, source PDF.
POST/contract/contract/detailGet one contract with its fields, recipients, and status.
POST/contract/contract/filterGet a page of contracts — the working list, or templates only.
POST/contract/contract/cloneCopy a contract; the clone records its lineage back to the source.
POST/contract/contract/sendCreate tokenized signing links and send the contract to its recipients.
POST/contract/contract/voidVoid a sent contract.
POST/contract/contract/inactivateRetire a contract from the working list without deleting it.
POST/contract/contract/reactivateBring an inactivated contract back to the working list.
POST/contract/contract/downloadDownload the PDF — the executed document once fully signed.
POST/contract/contract/deleteDelete a contract. Executed signatures are never deleted.
Fields

Fields.

The drag-and-drop builder’s unit: one placed box with a type (one of twelve), a page, geometry, and the recipient who must fill it. Required and read-only flags, tab order, format masks, and default values for pre-filling from consumer data. Values store typed — string, date, boolean, decimal — one row per field per recipient.

6 operations
POST/contract/field/savePlace, size, or reassign a field: type, page, position, recipient.
POST/contract/field/detailGet one field with its geometry and settings.
POST/contract/field/filterGet every field on one contract.
POST/contract/field/deleteDelete a field.
POST/contract/field/value/saveSave what a recipient entered in a field — typed, not stringly.
POST/contract/field/value/filterGet the entered values of one contract.
Recipients

Recipients.

Who signs, and in what order. A recipient is a platform party or just a name and an email — outside counsel signs without an account. Sign order is the whole parallel-vs-sequential mechanism: empty means everyone at once, numbered means recipients unlock in sequence, shared numbers sign together.

5 operations
POST/contract/recipient/saveAdd or update a signer: party or name + email, and their sign order.
POST/contract/recipient/detailGet one recipient with their sent / viewed / signed state.
POST/contract/recipient/filterGet the recipients of one contract, in sign order.
POST/contract/recipient/deleteRemove a recipient from an unsent contract.
POST/contract/recipient/resendRe-deliver a signing link; the resend count is recorded.
Signing

Signing.

The signer’s side, opened from a tokenized link — no login, no account. The session walks the recipient through their assigned fields only; required fields gate the finish. The final completion flips the contract Fully Executed and notifies consumers — an M19 engagement goes Active the same moment.

5 operations
POST/contract/sign/detailOpen a signing session from a tokenized link — the recipient’s fields only.
POST/contract/sign/field-value/saveSave one field at a time as the signer works through the document.
POST/contract/sign/signature/saveAdopt and apply an e-signature — drawn, typed, or uploaded.
POST/contract/sign/declineDecline to sign, with a reason.
POST/contract/sign/completeFinish signing; the last recipient flips the contract Fully Executed.
Evidence & audit

Evidence & audit.

The e-signing act is evidence, not form data. Every e-signature records how the mark was made, the IP address and user agent it came from, which version of the consent text the signer accepted, and a SHA-256 hash of the exact bytes signed. The audit trail covers everything else that happened to the contract.

2 operations
POST/contract/signature/filterGet the signature evidence of a contract: type, IP, user agent, consent version, document hash.
POST/contract/history/filterGet the full audit trail of a contract.

Want a walkthrough of any endpoint?

Book a 30-minute review and we’ll trace any operation end to end — from React component to stored procedure — using your team’s actual use case.