Skip to main content
cURL

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Path Parameters

hash
string
required

Unique hash (identifier) of the file.

Minimum string length: 1
Pattern: ^[a-z0-9]+$
Example:

"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"

Body

multipart/form-data
category

Labels to file the upload under. They mean nothing to the platform and exist so that a client can narrow a listing down later; a single label may be sent on its own rather than in an array.

Example:
checkFormFields
boolean | null
default:false

Whether to look through the document for fillable form fields and report what was found. Only a PDF is looked through - see checkSignFields for a Word or other file. Reading the document costs time, so ask for it only where the answer is going to be used.

Example:

false

checkPassword
boolean | null
default:false

Accepted and ignored - whether a PDF needs a password to open is recorded for every PDF upload.

Example:

false

checkSignFields
boolean | null
default:false

Whether to look through the document for signature fields already placed in it and report what was found - which is how a form prepared elsewhere is turned into something signable here. Only a PDF is looked through: a Word or other file is stored as it is and no fields are returned, unless usePdfA converts it first. To find the fields of a Word file, upload it and then call /files/convert on it with returnType hash and checkSignFields. Every notation is read: AcroForm signature fields, signature_field_start:{...}:signature_field_end markers in a rectangle, and {{cir:...}} tags written into the document text - in a drawing shape or in ordinary text flow. A tag found in text flow is also removed from the file. A marker that cannot be used - a {{cir:...}} tag with an unknown type, property or flag or a value of the wrong shape, or a JSON marker that is not valid JSON or is in no rectangle - does not fail the request: it is left in the document and returned in faultySignFields with the reason. A JSON marker naming an invalid field still fails the request. A field from a tag gets the userRoleId its role: stands for in the document - the id a JSON marker already pairs with that role name, or else the next free number, in reading order. Tag fields with the same group: form one radio group or checkbox group and share a groupId, the next number above those the file already uses; a group whose fields differ in type, role or signing order, or are not all required or all optional, fails the request. w: and h: are fractions of the page, between 0 and 1 (w:0.3 is 30 % of the page width). Reading the document costs time, so ask for it only where the answer is going to be used.

Example:

false

extractTermDates
boolean | null
default:false

Whether to also detect the contract's term in the stored PDF - its expiration date, renewal and notice periods - and return every value found as a suggestion with the passage it was read from and where that passage is printed. It is read from the PDF this upload is stored as, after any archiving conversion; a file that is not a PDF is reported as such instead of being analyzed. The answer waits for the detection, which can take up to about two minutes for a long contract. Asking for it requires the rights to use the AI features (llm_extraction) and the document term (use_document_terms).

Example:

false

file
file

The file itself, sent as multipart form data. Any format may be stored; whether it can be turned into a signable document depends on the conversion the deployment offers, which GET /files/convert lists.

fileName
string | null

Name to show the file under, without an extension - the extension is taken from the content. Left out, the uploaded file's own name is used.

Example:

"Agreement_2023"

forcePdfA
boolean | null
default:false

Whether to archive an already-signed document even though converting destroys the signature. Left off, a signed document is stored as it came and the answer says the conversion was skipped, so a client can tell the difference between a file that was archived and one that was spared.

Example:

false

signatureAnchors
object[]

Pieces of text to look for in the document, each with an offset saying where a signature belongs relative to the text found. It is how a signature is placed without knowing the page layout in advance - put a marker in the template, and the answer says where on which page it landed. Only a PDF is searched - see checkSignFields for a Word or other file.

Maximum array length: 100
usePdfA
boolean | null
default:false

Whether to convert the document for long-term archiving. A Word or other convertible file is converted to PDF first, so it is stored as a PDF/A and analyzed like any PDF. The conversion embeds everything the document needs to render the same way years later, which can change how it looks now.

Example:

false

Response

Returns the new revision of the file, the caller's storage usage, and whatever was asked to be read out of the document.

anchorPositions
object[] | null

Where each requested text anchor was found, page and position, so a signature field can be placed against it. Empty unless anchors were asked for.

faultySignFields
object[]

Signature field markers found in the file that could not be used - a {{cir:...}} tag that describes no usable field, or an original signature_field_start:{...}:signature_field_end marker that is not valid JSON, cannot be read, or is in no rectangle to take its position from. Each is left in the document so it stays visible, and the request still succeeds with the fields that could be used.

file
object

The stored file - its identifier above all, which is what every endpoint taking a file expects.

formFields
object[]

Fillable form fields found in the document, as read out of it. Empty unless the request asked for them.

pdfASkippedDueToSignature
boolean

True when PDF/A conversion was requested but skipped because the file is already signed and forcePdfA was not set. The original signed file is kept and is not PDF/A compliant.

signFields
object[]

Signature fields already placed in the document, as read out of it. Empty unless the request asked for them.

storage
object | null

The storage usage this upload was measured against, with the uploaded file counted in.

termSuggestions
object | null

The contract term detected in the PDF the upload is stored as, when extractTermDates asked for it; null otherwise.