> ## Documentation Index
> Fetch the complete documentation index at: https://developers.circularo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload a file

> `POST /files/saveFile`

Stores an uploaded file and answers with its identifier, which is what every other endpoint taking a file expects. It is the first step of almost everything: a document is created from a file that was uploaded here, and so is an attachment, a stamp image or a template.

A freshly uploaded file belongs to nothing yet. It is kept as unclaimed until something references it, and an unclaimed file is eventually swept away on its own - so uploading and then never attaching the file leaves nothing behind.

Beyond storing the bytes the upload can also make sense of them, and the answer carries whatever was asked for: the signature and form fields already placed in the document, where the text anchors landed, and the file's own metadata. The same request can archive the document for the long term, and it says so when it declined to because doing it would have destroyed an existing signature.

Form fields, signature fields and text anchors are looked for in a PDF only. A Word or other file is stored as it is and none of them is returned, unless `usePdfA` converts it on upload - to find the signature fields of a Word file, call `/files/convert` on the stored file with `returnType` `hash` and `checkSignFields`.

The same request can also detect the contract's term in the stored PDF and answer with the suggestions; the answer then waits for the detection. A caller who may not detect the term has the whole upload refused, while a detection that fails or finds nothing never costs the upload: the file is stored and the answer says why nothing was detected. To detect the term in a file that is not a PDF, to repeat a detection that failed, or to detect it after the upload, convert the stored file to PDF with the same flag - that needs no new upload.

The upload is measured against the caller's storage quota before it is kept, so a file that would cross the limit is refused rather than stored and complained about afterwards. The answer carries the usage that was measured, this upload counted in.

---

**Token authorization:** Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.



## OpenAPI

````yaml /api-v1/openapi.json post /files/saveFile
openapi: 3.0.3
info:
  title: Circularo API v1
  description: >-
    Circularo API v1 is the REST API that powers the Circularo platform and its
    first-party clients — the web app, the mobile apps and the Microsoft 365
    add-ins.


    This API spans the full surface of Circularo's functionality — document
    management, signing and sharing, workflow processing, administration, and
    configuration. It is **not** a stable contract and may change between
    releases without prior notice. It stays available for existing integrations
    while they move to Circularo API v2; new integrations belong on API v2.


    ## Authentication


    Most endpoints act on behalf of a signed-in user and require a token. Obtain
    a session token by signing in with `POST /login` — when multi-factor
    authentication is active, the token stays locked until you unlock it with a
    second factor — or use a long-lived API key. Send it as the `token` query
    parameter or in an `Authorization: Bearer` header. A session token expires
    after a period without use. Each endpoint's description lists the rights and
    roles it requires.


    Endpoints usable without signing in identify the environment by the request
    address or by the `tenant` query parameter. Endpoints for share recipients
    authenticate with the share token instead, together with a one-time password
    where the share is protected.
  termsOfService: https://terms.circularo.com/
  contact:
    name: Circularo
    url: https://developers.circularo.com/
    email: support@circularo.com
  version: 26.2.0
servers:
  - url: https://sandbox.circularo.com/api/v1
security:
  - Token: []
tags:
  - name: ACLs
    description: >-
      An ACL (access control list) is a named bundle of rights carried by groups
      — a user holds a right only because one of their groups carries an ACL
      that grants it. Create, search, update and delete ACLs; which rights an
      ACL grants is set on the rights, and which groups carry it is set on the
      groups. Deleting an ACL detaches it from every right and group.
  - name: API Keys
    description: >-
      An API key is a long-lived credential for connecting an external system to
      Circularo. It acts with the rights of the user who owns it and stays valid
      as long as it is in regular use. Create, list and revoke your own API keys
      — the secret is returned only once, at creation, so store it securely. A
      key can also be issued for a SCIM client, in which case only the SCIM
      endpoints accept it.
  - name: Attachments
    description: >-
      An attachment is a supporting file filed alongside a document, separate
      from its main file. Add, download, replace, rename and delete the
      attachments of a document, download all of them at once as a ZIP archive,
      or read an attachment of a draft. An attachment is addressed by the
      document identifier and its file hash.
  - name: Certificates
    description: >-
      Download the signing certificates configured for the instance as a ZIP
      archive of PKCS#12 files, for use by external signing components, and
      check whether they have changed since your last download so you can skip
      an unnecessary one. Both endpoints are meant for those components and
      authenticate with a pre-shared key rather than a user token.
  - name: Configuration
    description: >-
      The signed-in user's own account — profile and preferences, password,
      authentication factors and recovery codes, saved search filters,
      signature, initials and profile images, device push tokens, and
      introductory guides. Every endpoint acts on the caller only; other users'
      accounts are managed through the user endpoints.
  - name: Contacts
    description: >-
      A contact is an address-book entry owned by the user who created it,
      optionally shared with other users and groups, who can then pick it as a
      recipient when sharing documents. Create, search, update and delete
      contacts, change who they are shared with, and import or export them as
      CSV or JSON, previewing an import file before it is applied.
  - name: Counters
    description: >-
      A counter issues sequential identifiers, such as document numbers,
      following a pattern that combines fixed text, date segments and
      incrementing digits or letters — for example `ID-{year}-{###}`. A counter
      can restart whenever one of its date segments changes, such as at the
      start of each year. Create, read and update counters, and take the next
      value from one.
  - name: Definitions
    description: >-
      Definitions describe how documents are structured and processed. A
      metadata definition is a document type — its fields, its form, its
      processing options and the workflow it follows; a workflow definition is a
      set of states and the actions that move a document between them. Create,
      read, update and delete both kinds, list the actions available in a
      workflow state, put individual transitions behind a right, and export a
      metadata definition together with everything it depends on.
  - name: Documents
    description: >-
      A document is the central record of Circularo — a main file together with
      the metadata its metadata definition describes, optional attachments, and
      the workflow that moves it through its states. Create, read, edit and
      delete documents; sign, seal or annotate them; convert or merge their
      files; clone, rename or transfer them to a new owner; control who may read
      and edit them; and download their audit trail. Operations that change a
      document carry the version you last read, so a change made in the meantime
      is not silently overwritten.
  - name: Drafts
    description: >-
      A draft is the unfinished state of a document being prepared — created,
      edited, cloned or signed — kept privately for the user who started it and
      never shared. Create, list, search, update and delete drafts; an update
      replaces the whole draft and carries the version you last read. A draft is
      removed automatically once the document operation it was prepared for
      succeeds.
  - name: Enums
    description: >-
      An enumeration is a tenant-wide reference list — a definition declaring
      its fields, some of which may be unique, and the records that fill it —
      that supplies the values of list-type metadata fields. Create, search,
      update and delete enumerations and their records, share records with users
      and groups, and import or export records as CSV or JSON. Fields can be
      added to an existing enumeration but never removed or retyped.
  - name: Export
    description: >-
      An exporter turns a selection of documents into a downloadable output —
      such as a CSV or XLSX listing, PDF files, the original files, or a ZIP
      archive of a folder tree. List the exporters available to you, select the
      documents with a search query, and tune the output with exporter-specific
      options. Large exports run in the background; count the documents first to
      learn whether the result comes back directly or as a background job.
  - name: Fields
    description: >-
      A global field is a metadata field declared once per tenant and reused by
      many metadata definitions, which makes its values searchable and
      aggregatable across document types. Create, read, search, export and
      delete global fields, see which definitions use a field, and check whether
      a field name is available. A global field is never updated in place —
      delete it and create it again.
  - name: Files
    description: >-
      A file is a stored binary, identified by its hash, that documents,
      attachments, signatures and profiles refer to. Upload, download (including
      byte ranges), inspect, rename, relabel and replace files; convert them to
      PDF or PDF/A, or merge several into one PDF; upload signature, initials
      and profile images; and check your storage capacity. Public files, such as
      branding assets, can be downloaded without authentication.
  - name: Folders
    description: >-
      A folder organizes documents into a tree — either your personal tree,
      which is yours alone, or the shared tree. Create, read, rename and delete
      folders, move items within a tree, hand documents over to the other tree,
      or take them out of a tree entirely. Moving documents into the shared tree
      can grant them the rights of the target folder; deleted folders go to the
      trash, from which they can be restored.
  - name: Groups
    description: >-
      A group bundles users and carries the permissions granted to them — it
      holds ACLs, and its members receive the rights those ACLs grant. An
      organization is represented as a group too. Create, search, update and
      delete groups, add them to and remove them from ACLs, find the groups that
      grant a particular right, and resolve group display names. Membership is
      managed from the user side.
  - name: Inbox
    description: >-
      The inbox is where internal users act on the documents in their workflow.
      Execute a workflow action on a document, comment on its workflow, cancel
      the workflow and archive the document, or reset it to its start state.
      Cancelling or resetting a workflow does not withdraw the shares already
      sent to recipients.
  - name: Languages
    description: >-
      Languages and their translation keys hold the interface texts of the
      tenant. Add, activate, deactivate and delete languages; create, update,
      rename and delete translation keys, one at a time or in bulk; read
      translations per key or per language, including as a flat map for client
      localization; and import or export languages as JSON files. An imported
      language always arrives inactive.
  - name: LDAP
    description: >-
      Synchronize users and groups from Active Directory into Circularo. The
      synchronization only creates and updates — it never deletes anything and
      never writes back to the directory — and a dry run previews its result
      without applying it.
  - name: Links
    description: >-
      A link connects two documents that relate to each other. Link two
      documents, list the links of a document, or remove a link. Links have no
      direction — each pair of documents is linked at most once.
  - name: Login
    description: >-
      Sign in and inspect the sessions of the signed-in user. Sign in with a
      username and password to obtain a session token; when multi-factor
      authentication is active, the token stays locked until you unlock it with
      a second factor or a recovery code, and you can have a new code sent. Read
      the current sign-in status, the rights you hold, and your active sessions.
  - name: Logout
    description: >-
      End sign-in sessions. Sign out of the current session or another of your
      own, or — as an administrator — end every session of a user at once, for
      example when an account may be compromised. Ending a user's sessions
      leaves their API keys working.
  - name: Logs
    description: >-
      The audit log is the record of significant actions across the system — who
      did what, to which entity, and when. Search it with a structured query and
      page through large results with a scroll, which you release when done, or
      read a single entry. What you see depends on your role: the activity that
      concerns you, your organization's activity, or the whole tenant's. Entries
      are written in batches, so the most recent actions may appear with a short
      delay.
  - name: Nafath
    description: >-
      Verify a person's identity through Nafath, the Saudi national digital
      identity platform — to sign in, to link the identity to an account, to
      verify a share recipient, or to authorize a signature. Start a check,
      which the person confirms in the Nafath app, and poll its status until it
      completes; Nafath reports the outcome through a callback.
  - name: Notifications
    description: >-
      A notification informs a user about an event that concerns them. These
      endpoints cover your in-app notifications: list and search them, count the
      unread ones, mark them as read, and delete them. You can also list the
      delivery channels — in-app, e-mail and push — and the notification types,
      which each user switches on or off per channel.
  - name: OAuth
    description: >-
      Connect to external identity and service providers over OAuth 2.0, such as
      Microsoft, Google or Dropbox. Sign in through a provider, which can also
      create the account, or connect a provider account to your own — such as a
      cloud storage — then obtain a fresh access token for it or disconnect it.
      A provider can also verify a share recipient or authorize a signature. A
      client that cannot rely on the session cookie, such as a native app,
      exchanges a one-time code for a login token.
  - name: Ping
    description: >-
      Check that Circularo API v1 is reachable and answering. No authentication
      is required; the check covers the API itself, not storage or background
      services.
  - name: Plans
    description: >-
      A plan is a named entry in the catalogue of service offerings that
      subscriptions refer to; it carries no limits or billing of its own — those
      belong to the subscription. Create, search and update plans, which is an
      administrative task, and read a single plan.
  - name: Revisions
    description: >-
      A revision is a snapshot of a whole document, taken by the operations that
      change it. List the revisions of a document, read one, compare two of
      them, restore a document to an earlier revision, or undo the changes made
      to its main file since the last snapshot, such as annotations or
      signatures. Restoring is refused for a document that is signed or waiting
      for action unless you force it.
  - name: Rights
    description: >-
      A right is a named permission to use a feature or perform an action. Users
      never hold rights directly: a right lists the ACLs that grant it, and
      users receive it through the ACLs of their groups. Create, read, search,
      update and delete rights, including rights scoped to particular metadata
      definitions, workflows and actions.
  - name: SAML
    description: >-
      Sign in through a SAML 2.0 identity provider configured for the tenant, an
      organization or a group. Start the sign-in, which redirects to the
      identity provider; the provider posts the result back to the callback,
      which either sets the session cookie or redirects to your client with a
      one-time code that you exchange for a login token. Download the service
      provider metadata to register Circularo with the identity provider.
  - name: SCIM
    description: >-
      Provision users and groups automatically from an identity provider over
      SCIM 2.0 (RFC 7643 and RFC 7644). Create, read, replace, patch and
      deprovision accounts and groups within your organization, and discover the
      supported schemas, resource types and service provider configuration. SCIM
      clients authenticate with a SCIM API key in an `Authorization: Bearer`
      header, SCIM must be enabled for the tenant, and errors follow the SCIM
      format instead of the common error body.
  - name: Search
    description: >-
      Search and analyze documents. Select documents with a structured query of
      filter, must, should and must-not clauses, and add aggregations, which are
      written in Elasticsearch syntax; page through results with an offset or a
      scroll, count documents for several searches at once, or locate the page a
      document is on. Run the stored dashboards for chart-ready analytics, or
      build reports that pair each document with its transaction across the
      organization.
  - name: Settings
    description: >-
      Settings configure the behaviour and appearance of Circularo at a chosen
      scope — tenant, organization, role, group or user. A value not set at one
      scope is inherited from the scope above it, down to the shipped defaults.
      Read the settings in force for you, the settings of one scope or what it
      inherits, and write them whole or property by property; tailor the e-mails
      sent at a scope and send a trial one; replace the single sign-on signing
      keys; and try out a language model configuration before saving it.
  - name: Share
    description: >-
      A share sends a document to one recipient — an internal user or an
      external person without a Circularo account — to view, edit, sign,
      approve, review or accept it; the shares of a document together form its
      transaction. As the sender, send a document to its recipients in parallel
      or in a set order, then edit, remind, search or call off the shares, or
      get the document's permanent public link. As a recipient, open the share
      with its share token — plus a one-time password where the share is
      protected by an SMS or e-mail code, a password or an identity check — then
      read and download the document, sign it or complete your action, comment
      on it, reject it, or delegate it to somebody else.
  - name: Stamps
    description: >-
      A stamp is a reusable visual mark — a design of shape, frame, colours and
      lines of text, rendered into an image — that is placed on documents during
      signing. A stamp is either personal, belonging to one user, or shared
      across an organization. Create, read, search, edit and delete stamps;
      deleting a stamp does not affect the documents already stamped with it.
  - name: Static
    description: >-
      Download the client-side installers that hardware signature capture
      requires: the Wacom tablet driver and the Wacom SigCaptX signature capture
      tool for Windows.
  - name: Stripe
    description: >-
      Self-service billing through Stripe for organization administrators. List
      the subscription products on sale, start paying for a new subscription,
      change what it holds or stop it from renewing, read its billing summary,
      and open the billing portal. Stripe itself reports payment events through
      the webhook endpoint.
  - name: Subscriptions
    description: >-
      A subscription holds what an organization or a user is entitled to — the
      limits of its plan, the usage consumed against them, its period and its
      commercial details. Create, read, search and edit subscriptions and search
      their recorded history; this is mostly administrative, and organization
      administrators may edit only the commercial details. Any user can ask the
      sales team about a larger plan.
  - name: Support
    description: >-
      Send a support ticket — a technical problem, a question, a feature request
      or a subscription inquiry — to the support address of your environment,
      with optional attachments. Replies come back to you by e-mail.
  - name: Tags
    description: >-
      Tags label documents for categorization and filtering. A private tag is
      visible only to the user who set it; a public tag is visible to everyone
      who can see the document and can be searched for. List the tags in use,
      and add, remove or replace tags on many documents at once. Tagging
      requires only read access to a document.
  - name: Templates
    description: >-
      A template is a reusable starting point for documents — a document
      together with recipient roles, the fields placed for each of them, and
      share settings — from which a transaction can be started again and again.
      Create, search, update and delete templates, share them with other users
      and groups, and export or import them, previewing an import file before it
      is applied.
  - name: Users
    description: >-
      A user is an account in the tenant. Create, search, update and delete
      accounts, in bulk where needed; manage their group membership, signing
      certificates, linked external identities, and signature, initials and
      profile images; and list the rights a user holds. The account flows that
      run before sign-in — self-registration, activation and password reset —
      belong here as well. A deleted account is kept as a historical record.
  - name: Verify
    description: >-
      Verify the signatures, seals and timestamps on a document — looked up by
      its identifier or by a signature identifier, or uploaded as a file, in
      which case the result also tells whether the file is known to Circularo
      and whether it has been modified. Verification works with or without
      signing in and can include the detailed validation reports of the DSS
      (Digital Signature Service).
  - name: Webhooks
    description: >-
      A webhook notifies an external system of document events in real time —
      such as a document being created, edited or deleted, a signature being
      requested, delegated, rejected or cancelled, and a document being signed
      or completed. Register a callback URL for your tenant or organization,
      secured by Basic authentication or a signing secret, and list, update or
      delete webhooks. Each event is delivered once, without retries.
  - name: WOPI
    description: >-
      Web Application Open Platform Interface (WOPI) endpoints through which an
      online office editor — Microsoft Office Online or Collabora Online — opens
      and edits files directly in the browser. Issue a token for the editor and
      list the file types it can open; the editor itself then reads the file
      information and content, manages locks, and writes the edited content back
      to Circularo.
  - name: WS
    description: >-
      Pass messages between a user's devices in real time over a WebSocket
      connection — for example, a phone sending a photo or a hand-drawn
      signature to the browser session where the user is working. The browser
      opens the connection with a session token, or with a share token and
      one-time password, and receives a connection token; the other device sends
      messages into the connection with that token alone.
paths:
  /files/saveFile:
    post:
      tags:
        - Files
      summary: Upload a file
      description: >-
        `POST /files/saveFile`


        Stores an uploaded file and answers with its identifier, which is what
        every other endpoint taking a file expects. It is the first step of
        almost everything: a document is created from a file that was uploaded
        here, and so is an attachment, a stamp image or a template.


        A freshly uploaded file belongs to nothing yet. It is kept as unclaimed
        until something references it, and an unclaimed file is eventually swept
        away on its own - so uploading and then never attaching the file leaves
        nothing behind.


        Beyond storing the bytes the upload can also make sense of them, and the
        answer carries whatever was asked for: the signature and form fields
        already placed in the document, where the text anchors landed, and the
        file's own metadata. The same request can archive the document for the
        long term, and it says so when it declined to because doing it would
        have destroyed an existing signature.


        Form fields, signature fields and text anchors are looked for in a PDF
        only. A Word or other file is stored as it is and none of them is
        returned, unless `usePdfA` converts it on upload - to find the signature
        fields of a Word file, call `/files/convert` on the stored file with
        `returnType` `hash` and `checkSignFields`.


        The same request can also detect the contract's term in the stored PDF
        and answer with the suggestions; the answer then waits for the
        detection. A caller who may not detect the term has the whole upload
        refused, while a detection that fails or finds nothing never costs the
        upload: the file is stored and the answer says why nothing was detected.
        To detect the term in a file that is not a PDF, to repeat a detection
        that failed, or to detect it after the upload, convert the stored file
        to PDF with the same flag - that needs no new upload.


        The upload is measured against the caller's storage quota before it is
        kept, so a file that would cross the limit is refused rather than stored
        and complained about afterwards. The answer carries the usage that was
        measured, this upload counted in.


        ---


        **Token authorization:** Authorize using a token — either a session
        token obtained from login or an API key — to call this endpoint.
      operationId: requestFilesPostFile
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/requestFilesPostFile'
      responses:
        '200':
          description: >-
            Returns the stored file, the caller's storage usage, and whatever
            was asked to be read out of the document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseFilesUpload'
        '400':
          description: >-
            No file was sent, the body is malformed, or the name it would be
            stored under is unusable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 400
                type: VALIDATION:INPUT_INVALID
                message: Invalid input
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 401
                type: AUTH:UNAUTHORIZED
                message: Authentication failed
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '402':
          description: >-
            The upload would cross the storage limit of the caller or of their
            organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 402
                type: SUBSCRIPTION:NOT_ACTIVE
                message: Subscription not active
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '403':
          description: >-
            The caller lacks a required right or access, or the AI features are
            not configured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 403
                type: AUTH:ACCESS_DENIED
                message: Access denied
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '429':
          description: >-
            Too many term detections were asked for in a short time; wait as
            long as the `Retry-After` header says. Calls without
            `extractTermDates` are not limited this way.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 429
                type: SYSTEM:RATE_LIMIT_EXCEEDED
                message: Rate limit exceeded
                requestId: 3fa85f6457174562b3fc2c963f66afa6
      security:
        - Token: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request POST \
              --url https://sandbox.circularo.com/api/v1/files/saveFile \
              --header 'Authorization: Bearer <token>' \
              --form 'category[0]=contracts' \
              --form 'category[1]=legal' \
              --form 'checkFormFields=false' \
              --form 'checkPassword=false' \
              --form 'checkSignFields=false' \
              --form 'extractTermDates=false' \
              --form 'file=@document.pdf' \
              --form 'fileName=Agreement_2023' \
              --form 'forcePdfA=false' \
              --form 'public=false' \
              --form 'signatureAnchors[0][id]=signature-1' \
              --form 'signatureAnchors[0][regexp]=sign(ed|ature)' \
              --form 'signatureAnchors[0][text]=Signature:' \
              --form 'usePdfA=false'
components:
  schemas:
    requestFilesPostFile:
      type: object
      properties:
        category:
          oneOf:
            - type: array
              items:
                type: string
                nullable: true
              uniqueItems: true
            - type: string
              nullable: true
          description: >-
            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:
            - contracts
            - legal
        checkFormFields:
          type: boolean
          description: >-
            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
          default: false
          nullable: true
        checkPassword:
          type: boolean
          description: >-
            Accepted and ignored - whether a PDF needs a password to open is
            recorded for every PDF upload.
          example: false
          default: false
          nullable: true
        checkSignFields:
          type: boolean
          description: >-
            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
          default: false
          nullable: true
        extractTermDates:
          type: boolean
          description: >-
            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
          default: false
          nullable: true
        file:
          type: string
          format: binary
          description: >-
            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:
          type: string
          description: >-
            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
          nullable: true
        forcePdfA:
          type: boolean
          description: >-
            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
          default: false
          nullable: true
        public:
          type: boolean
          description: >-
            Whether the file may be fetched by anyone holding its public link,
            with no credential at all. Turning it on is what makes the file
            usable from somewhere that cannot sign in - an image in a
            notification e-mail, a logo on a login screen - and the link comes
            back with the file's metadata.
          example: false
          default: false
          nullable: true
        signatureAnchors:
          type: array
          items:
            $ref: '#/components/schemas/requestGenericSignatureAnchor'
          maxItems: 100
          description: >-
            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.
        usePdfA:
          type: boolean
          description: >-
            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
          default: false
          nullable: true
    responseFilesUpload:
      type: object
      properties:
        anchorPositions:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsAnchors'
          description: >-
            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.
          nullable: true
        faultySignFields:
          type: array
          items:
            $ref: '#/components/schemas/responseFilesFaultySignField'
          description: >-
            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:
          allOf:
            - $ref: '#/components/schemas/responseFilesInfo'
          description: >-
            The stored file - its identifier above all, which is what every
            endpoint taking a file expects.
        formFields:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsSignatureFields'
          description: >-
            Fillable form fields found in the document, as read out of it. Empty
            unless the request asked for them.
        pdfASkippedDueToSignature:
          type: boolean
          description: >-
            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:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsSignatureFields'
          description: >-
            Signature fields already placed in the document, as read out of it.
            Empty unless the request asked for them.
        storage:
          allOf:
            - $ref: '#/components/schemas/responseFilesStorageCapacity'
          description: >-
            The storage usage this upload was measured against, with the
            uploaded file counted in.
          nullable: true
        termSuggestions:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestions'
          description: >-
            The contract term detected in the PDF the upload is stored as, when
            `extractTermDates` asked for it; `null` otherwise.
          nullable: true
    error:
      type: object
      description: The error response returned for all unsuccessful (non-2xx) requests.
      properties:
        status:
          type: integer
          description: The HTTP status code of the error.
          example: 404
        type:
          type: string
          description: >-
            Machine-readable error type in `NAMESPACE:CODE` form, intended for
            programmatic handling. The set of types is not exhaustive and may
            grow over time.
          example: RESOURCE:NOT_FOUND
        message:
          type: string
          description: Human-readable description of the error.
          example: Resource not found
        requestId:
          type: string
          description: >-
            Unique identifier of the request; include it when contacting
            support.
          example: 3fa85f6457174562b3fc2c963f66afa6
        details:
          type: object
          additionalProperties: true
          description: >-
            Optional structured details about the error. Present only for errors
            that carry them; the shape depends on the error type.
      required:
        - status
        - type
        - message
        - requestId
    requestGenericSignatureAnchor:
      type: object
      properties:
        id:
          type: string
          description: >-
            Label of the caller's own choosing, echoed back with the positions
            found, which is how several anchors asked for in one request are
            told apart in the answer.
          example: signature-1
        offset:
          allOf:
            - $ref: '#/components/schemas/requestGenericSignatureAnchorOffset'
          description: >-
            Where the signature belongs relative to the text once it has been
            found, and how large it should be.
        regexp:
          type: string
          maxLength: 500
          description: >-
            Pattern to look for instead of a fixed string, for a marker that
            varies. Matching runs line by line, so a pattern cannot reach across
            a line break. Letter case is ignored for the unaccented letters A to
            Z only. A pattern is refused when a counted repetition such as
            `{2,5}` has a bound above 1000, when the bounds of counted
            repetitions nested inside one another multiply to more than 100000,
            or when it takes too long to evaluate. Exactly one of `regexp` and
            `text` must be provided.
          example: sign(ed|ature)
          nullable: true
        text:
          type: string
          description: >-
            Exact text to look for in the document, letter case included.
            Matching runs line by line, so the text cannot reach across a line
            break. Exactly one of `regexp` and `text` must be provided.
          example: 'Signature:'
          nullable: true
      required:
        - id
        - offset
    responseDocumentsAnchors:
      type: object
      properties:
        fields:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsPageAndPosition'
          description: >-
            Every place the anchor's text was found, each with the page and the
            rectangle a signature would occupy there once the requested offset
            has been applied. The text may occur more than once, or not at all -
            an anchor that matched nothing comes back with none.
        id:
          type: string
          description: >-
            Label the anchor was asked for under, echoed back so the caller can
            tell which of them this answers.
          example: signature-1
    responseFilesFaultySignField:
      type: object
      properties:
        detail:
          type: string
          description: >-
            What exactly is wrong, in words meant for the template author, when
            the reason alone does not say.
          nullable: true
        notation:
          type: string
          description: >-
            Which notation the marker was written in: `JSON` for
            `signature_field_start:{...}:signature_field_end`, `TAG` for
            `{{cir:...}}`.
          nullable: true
        page:
          type: integer
          description: 1-based page the marker was found on.
        reason:
          type: string
          description: >-
            Why the marker could not be used: INVALID_JSON, UNREADABLE_TEXT,
            UNTERMINATED, EMPTY_TAG, MALFORMED_TAG, INVALID_TAG or NOT_IN_SHAPE.
        text:
          type: string
          description: >-
            The marker as it was read: the whole tag for `{{cir:...}}`, the bare
            JSON payload for a JSON marker found in a rectangle or in no shape,
            and the text from its opener for a marker that is unterminated or
            unreadable. Long text is cut after 1024 characters.
          nullable: true
    responseFilesInfo:
      type: object
      properties:
        additionalInfo:
          type: string
          description: >-
            What was read out of the document itself when it was processed, kept
            as a JSON-encoded object, so a client has to parse it before use:
            its own descriptive metadata, which archiving standards it turned
            out to comply with, what it carries as embedded attachments, and
            whether it has form fields at all. It is filled only for the formats
            the platform can inspect.
          nullable: true
        category:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Labels the file has been filed under. They carry no meaning to the
            platform and exist to let a client narrow a listing down.
          example:
            - contracts
            - legal
          nullable: true
        checksum:
          type: string
          description: >-
            Checksum of the stored content, computed when the file was written.
            It identifies the bytes rather than the record, so two files holding
            the same content share it.
          nullable: true
        createDate:
          type: string
          format: date-time
          description: When this revision of the file was stored.
          example: '2026-03-14T09:12:44.318Z'
          nullable: true
        createdBy:
          type: string
          description: User who uploaded the file.
          example: jane.doe@example.com
          nullable: true
        documentname:
          type: string
          description: >-
            Name the file is shown under, without an extension. It is the name
            given at upload, or the uploaded file's own name where none was
            given, and it is what a rename changes.
          example: Agreement_2023
          nullable: true
        encoding:
          type: string
          description: Transfer encoding the file arrived in, as reported by the upload.
          nullable: true
        fileExtension:
          type: string
          description: >-
            Extension the file is served under. It follows from the content type
            rather than from the uploaded name, so a mislabelled upload still
            downloads under the right one.
          example: pdf
          nullable: true
        fileId:
          type: string
          description: >-
            Identifier the successive revisions of one file share - a
            replacement gets a new `hash` but keeps this, which is what ties a
            revision chain together.
          nullable: true
        fileType:
          type: string
          description: >-
            Coarse family the format belongs to - a document, a spreadsheet, an
            image, an archive and so on - meant for picking an icon or a filter
            rather than for deciding how to process the file. Anything
            unrecognised falls into a catch-all.
          example: pdf
          nullable: true
        hash:
          type: string
          description: >-
            Identifier of the file, and the value every endpoint taking a file
            takes. It addresses one revision: replacing a file's content yields
            a new hash.
          example: s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj
          nullable: true
        hasPassword:
          type: boolean
          description: >-
            Whether the document itself is locked with a password, which is what
            keeps the platform from reading its pages. It is settled while an
            uploaded file is processed - a file that is not a document is
            recorded as not locked - and stays empty on a file that never went
            through that processing at all, such as a stored image.
          nullable: true
        id:
          type: string
          description: File hash (unique file identifier).
          example: da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f
        intent:
          type: string
          description: >-
            What the file is being kept for - a document's main file, an
            attachment, a signature image, a thumbnail and so on. It is what
            ties the file to the thing referencing it, and a file no longer
            claimed by anything is eventually swept away, so a freshly uploaded
            file that has not been attached yet is marked as unclaimed.
          example: main_file
          nullable: true
        isConvertible:
          type: boolean
          description: >-
            Whether this file can be turned into PDF, which is what it takes to
            make it signable. It stays empty where the file's content type is
            not known, so it cannot be decided either way.
        isSigned:
          type: boolean
          description: >-
            Whether the document was found to carry a signature when it was last
            processed. It matters because converting a signed document destroys
            the signature, which is why a conversion declines to run on one by
            default - though the conversion decides that by re-reading the
            document rather than by trusting this.
          nullable: true
        mimetype:
          type: string
          description: >-
            Content type of the stored file, worked out from the content itself
            rather than taken from the upload.
          example: application/pdf
          nullable: true
        organization:
          type: string
          description: >-
            Organization the file was uploaded within, taken from its uploader,
            or the share sender's organization for a file a recipient from
            outside it hands in. It is what the organization-wide storage usage
            is added up over.
          nullable: true
        originalname:
          type: string
          description: >-
            Name the file was uploaded under, extension included, kept as it
            arrived.
          example: agreement.pdf
          nullable: true
        ownedBy:
          type: string
          description: >-
            User the file belongs to, which is who may read and replace it. It
            starts out as the uploader and follows the file if it changes hands
            - a file a share's recipient from outside the sender's organization
            hands in passes to the share's sender, whose storage it then counts
            against.
          example: jane.doe@example.com
          nullable: true
        pages:
          type: integer
          description: >-
            Number of pages the document has. It is known only for the formats
            the platform can inspect.
          example: 3
          nullable: true
        path:
          type: string
          description: >-
            Where the bytes sit in the configured storage backend. It is
            internal bookkeeping and of no use to a client, which addresses a
            file by its hash.
          nullable: true
        pdfPreview:
          allOf:
            - $ref: '#/components/schemas/entityDocumentsPdfPreview'
          description: >-
            PDF rendition of an office file, generated so that the file can be
            previewed without an online editor. It belongs to this exact content
            - a replaced file gets a preview of its own - and stays empty for a
            file that is not an office format or has not been processed yet.
          nullable: true
        public:
          type: boolean
          description: >-
            Whether the file may be fetched without signing in. A public file is
            additionally reachable through a separate public link, which is
            handed out alongside it.
          nullable: true
        publicHash:
          type: string
          description: >-
            Link value that fetches the file without any authentication, made of
            the file's own hash and the secret held for it. It is answered only
            for a file marked public, and it is the only form in which that
            secret ever leaves the server.
          example: >-
            cir_s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwd3q9h8yfgc0mrvu7kx3.WBv2Jc8lXo3pQ9rT5uYhZaEwSdFgHjKmNbVcXzLqRt0
        revision:
          type: integer
          description: >-
            Which revision of the file this is. An uploaded document starts at
            one and each replacement of its content raises it, storing a new
            file rather than overwriting the old one; a file the platform stored
            for itself stays at zero.
          example: 1
          nullable: true
        size:
          type: integer
          description: >-
            Size of the stored file in bytes. It counts against the storage
            quota once the file has become a document's main file, one of its
            attachments or one of the files handed in on it, such as those the
            recipients of its share hand in; a file kept for anything else - an
            image, a thumbnail, a template - is not measured, and neither is one
            still waiting to be claimed.
          example: 102400
          nullable: true
        temp:
          type: boolean
          description: >-
            Whether the file is a working copy still being written - the state a
            file sits in while it is open for editing, before the finished
            content takes the place of the original.
          nullable: true
        thumbnail:
          type: string
          description: >-
            Hash of the preview image generated for this file. It is a file in
            its own right and is fetched like any other; it appears once a
            preview has been asked for.
          nullable: true
        usePdfA:
          type: boolean
          description: >-
            Whether the file was converted for long-term archiving. It records
            what happened to the file, not a request to do it.
          nullable: true
    responseDocumentsSignatureFields:
      type: object
      properties:
        align:
          type: string
          description: >-
            Horizontal alignment of the text rendered inside the field. Ignored
            when `maxCharacters` splits the field into character cells.
          example: center
        backgroundColor:
          type: string
          description: >-
            Hex color filled behind the field's text. Nothing is filled when it
            is empty.
          example: '#F5F5F5'
        bold:
          type: boolean
          description: Whether the text is rendered in bold.
        cancelled:
          type: boolean
          description: >-
            Indicates that the field is no longer expected to be filled, because
            the recipient it was assigned to was removed from the document or
            rejected it.
        color:
          type: string
          description: >-
            Hex color of the text rendered inside the field, and of the
            underline drawn for a link.
          example: '#1A1A1A'
        config:
          type: string
          description: >-
            Stringified JSON of the placement and editor settings a client keeps
            with the field. The platform stores it as it stands and does not
            interpret it, beyond reading the name a field extracted from a
            document is to be filled from.
          example: '{"multipageType":"all","multiPageCustom":"1"}'
          nullable: true
        fieldGroupId:
          type: integer
          description: >-
            Identifier shared by the fields that were placed together as one
            custom field group, so a client can move, resize and reassign them
            as a unit. It has nothing to do with `groupId`.
        filled:
          type: boolean
          description: >-
            Indicates that the field has already been filled, whether by a
            signature, an annotation or an image.
        font:
          type: string
          description: >-
            Key of the font family used for the field's text. It is resolved to
            a font file by the PDF signing service, so only the fonts that
            service ships are usable.
          example: default
          nullable: true
        fontSize:
          type: number
          description: Size of the field's text in points.
          example: 11
        groupId:
          type: integer
          description: >-
            Identifier shared by the radio buttons of one group, of which at
            most one may carry a selected value. It is unrelated to
            `fieldGroupId`.
        id:
          type: string
          description: >-
            Identifier of the field within the document, which is what a fill or
            a signature refers back to.
        link:
          type: string
          description: >-
            URL the field points to. When it is set, the whole field box becomes
            a clickable link in the rendered document.
          example: https://example.com/contracts/2024-114
        lockRatio:
          type: boolean
          description: Whether the field keeps its aspect ratio when a client resizes it.
          nullable: true
        maxCharacters:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 256
          description: >-
            Number of equal-width character cells the field's width is split
            into, one glyph per cell. Empty leaves the text flowing normally.
          nullable: true
        multipage:
          type: boolean
          description: >-
            Whether the field is repeated on every page listed in `pages` rather
            than placed once.
          nullable: true
        numberOfLines:
          type: integer
          description: >-
            Number of text lines the field is laid out for. `-1` leaves the line
            count automatic.
          example: 1
        order:
          type: integer
          description: >-
            Round the field belongs to when the recipients act one after
            another, matching the order of the recipient who fills it. It
            carries no meaning when they all act in parallel, and nothing to do
            with the paint order, which is `zIndex`.
        pages:
          type: array
          items:
            type: integer
            example: 3
          description: >-
            Pages the field is placed on, the first page being `1`. The same box
            is rendered on each of them.
        position:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsSignatureItem'
          description: Placement and size of the field's box on each of its pages.
        readOnly:
          type: boolean
          description: >-
            Whether the field only displays its `text` and the recipient cannot
            change it.
        required:
          type: boolean
          description: >-
            Whether the field must be filled before the recipient's action can
            complete.
        shareId:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Shares this field belongs to, which is how a field is tied to the
            particular recipient expected to fill it in rather than to a named
            user. A field read straight out of a file carries none - it gains
            one once the field has been attached to a document and sent out.
          nullable: true
        subtype:
          type: string
          description: >-
            What an annotation field collects or renders, refining `type` into a
            concrete kind. It is drawn from a fixed set only for an annotation -
            an image field's subtype comes from a separate vocabulary, and the
            subtype carrying the document's own identifier is the bare `docId`
            rather than an `annotation_` name.
          example: annotation_generic
        text:
          type: string
          description: >-
            Text content of the field - a value preset by the sender or entered
            by the recipient, or a `{{{path}}}` template resolved against the
            document's own data. On a checkbox or radio field the leading
            character encodes the toggle state and the rest is the label.
          example: 'Document validity: '
        timestamp:
          type: boolean
          description: >-
            Whether the signing time is drawn into the visual representation of
            the signature.
        tooltip:
          type: string
          description: Hint shown to the recipient when filling the field.
        type:
          type: string
          description: >-
            Kind of content the field collects - a signature, initials, a stamp,
            an organization stamp, a signature captured on a signature pad, an
            image or an annotation.
          example: signature
        usage:
          type: string
          description: >-
            How the field is meant to be filled: `manual` by a person,
            `autosign` by the server from the assigned user's stored signature
            during a workflow action, or `extracted` for a field derived from
            the form fields found in the uploaded document.
          example: extracted
        user:
          type: array
          items:
            type: string
            example: john.doe@example.com
          description: >-
            Recipients the field is assigned to, by username or email address.
            When several are listed, any one of them can fill it.
        userRoleId:
          type: integer
          description: >-
            Identifier of the recipient role the field belongs to. It matches
            the `userRoleId` of the sign entity that defines that role.
          example: 1
          nullable: true
        userRoleName:
          type: string
          description: >-
            Handle of the recipient role the field belongs to. The sign entity
            defining the role holds the authoritative name; this copy serves as
            a fallback.
          example: Buyer
          nullable: true
        values:
          type: array
          items:
            type: string
          description: >-
            Options a dropdown field offers. A value filled into such a field
            has to be one of them.
        zIndex:
          type: integer
          description: >-
            Paint order of the field among the fields and images placed on the
            same page - a lower value is drawn first, underneath the higher
            ones.
          example: 100000
          nullable: true
    responseFilesStorageCapacity:
      type: object
      properties:
        limit:
          type: number
          description: >-
            Most the caller alone may take up, in bytes. Empty means no personal
            limit is set.
          example: 1073741824
          nullable: true
        organizationLimit:
          type: number
          description: >-
            Most the caller's organization may take up altogether, in bytes -
            the pool its members share. For a caller outside an organization who
            holds a subscription of their own, it is that subscription's pool.
            It stays empty for any other caller who belongs to no organization,
            and also where the subscription sets no such limit.
          example: 10737418240
          nullable: true
        organizationUsed:
          type: number
          description: >-
            How much of that pool the organization has taken up, in bytes,
            counting every member - for a caller with a subscription of their
            own, how much they have taken up. It stays empty for any other
            caller who belongs to no organization.
          example: 4294967296
          nullable: true
        used:
          type: number
          description: How much the caller alone has taken up, in bytes.
          example: 52428800
          nullable: true
    responseDocumentsTermSuggestions:
      type: object
      properties:
        available:
          type: boolean
          description: >-
            Whether a list other than `reminders` holds a candidate that may be
            offered, one with `offerable` set.
        error:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionError'
          description: Why the detection failed, for `failed` only; `null` otherwise.
          nullable: true
        expiresOn:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionDate'
          description: Candidates for the date the document expires on (`expiresOn`).
        isAgreement:
          type: boolean
          description: >-
            Whether the model judged the document to be a binding agreement
            rather than, for example, a quotation or an offer; `null` when the
            model was not asked or did not say. The candidates are kept either
            way.
          nullable: true
        locatorAvailable:
          type: boolean
          description: >-
            Whether looking the passages up in the PDF worked. When it did not,
            the candidates still come back, but none of their passages is
            placed; it is `false` as well when the detection ended before any
            passage was to be looked up.
        nonFixedTermNoticePeriod:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionPeriod'
          description: >-
            Candidates for the termination notice of a contract that runs until
            it is terminated (`term.nonFixedTerm.noticePeriod`).
        nonFixedTermTerminationStartDate:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionDate'
          description: >-
            Candidates for the day the termination of a contract that runs until
            it is terminated started (`term.nonFixedTerm.terminationStartDate`).
            Applying one starts the termination, so none of them is ever
            preferred.
        omittedPages:
          type: object
          properties:
            from:
              type: integer
              minimum: 1
              description: First page left out.
            to:
              type: integer
              minimum: 1
              description: Last page left out.
          description: >-
            Pages left out of the analysis entirely because the document is too
            long, as one range; `null` when none was. A page only cut short
            counts toward `truncated` alone.
          nullable: true
        pageCount:
          type: integer
          minimum: 0
          description: >-
            Number of pages of the PDF the term was read from; `null` when the
            PDF was not read.
          nullable: true
        pagesWithText:
          type: integer
          minimum: 0
          description: >-
            How many of the pages read carry text. Fewer than `pageCount` means
            that some pages are images, such as scans, or were not read, so what
            they say could not be found; `null` when the PDF was not read.
          nullable: true
        reminders:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionReminder'
          description: >-
            Reminders suggested ahead of a detected renewal notice deadline,
            each in the form of an entry of `term.reminders`.
        renewalFinalDate:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionDate'
          description: >-
            Candidates for the date the renewals never extend the contract
            beyond (`term.renewal.finalDate`).
        renewalMaxRenewals:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionCount'
          description: >-
            Candidates for how many automatic renewals the contract allows
            (`term.renewal.maxRenewals`).
        renewalNoticePeriod:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionPeriod'
          description: >-
            Candidates for the notice the renewal requires ahead of the
            expiration date (`term.renewal.noticePeriod`) - the notice of
            non-renewal that stops an automatic renewal, or the notice by which
            a manual one has to be requested.
        renewalPeriod:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionPeriod'
          description: >-
            Candidates for how far each renewal moves the expiration date
            (`term.renewal.period`).
        renewalType:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionRenewalType'
          description: Candidates for how the contract is renewed (`term.renewal.type`).
        searchIncomplete:
          type: boolean
          description: >-
            Whether the time for looking the passages up in the PDF ran out
            before every passage was searched for in full, so that a passage
            left unplaced may still be printed in the document and a retry may
            place it. It is reported whether or not a candidate may be offered;
            when none may, the `status` is `failed` as well. `false` when no
            passage was looked up or the lookup gave no answer.
        status:
          type: string
          description: >-
            Outcome of the detection as a whole. The lists hold candidates only
            for a document that was read and analyzed - with `detected`,
            `nothing_detected` and, when placing the values in the document
            failed, `failed`; with any other status every list is empty.


            - `detected`: The document states at least one term value that can
            be offered.

            - `nothing_detected`: The document was read, but no value can be
            offered - it states none, or none of those found could be applied or
            placed in the document.

            - `no_text_layer`: The PDF carries too little text to read,
            typically because it is a scan, so nothing was looked for.

            - `not_pdf`: The file is not a PDF, or the document has no PDF, so
            nothing was looked for.

            - `password_protected`: The PDF needs a password to be opened, so
            nothing was looked for.

            - `unreadable`: The PDF is damaged and could not be read.

            - `file_too_large`: The PDF is too large to be analyzed.

            - `not_editable`: The document cannot be edited in its current
            workflow state, so its term cannot be changed and nothing was looked
            for.

            - `failed`: Reading the document, asking the model or placing the
            values in the document failed; `error` says why and whether asking
            again may succeed.
          enum:
            - detected
            - nothing_detected
            - no_text_layer
            - not_pdf
            - password_protected
            - unreadable
            - file_too_large
            - not_editable
            - failed
        truncated:
          type: boolean
          description: >-
            Whether part of the document was left out of the analysis because
            the document is too long, so a term stated in that part cannot have
            been found.
    requestGenericSignatureAnchorOffset:
      type: object
      properties:
        percentHeight:
          type: number
          minimum: 0
          maximum: 1
          description: How tall the signature should be, as a fraction of the page height.
          example: 0.08
        percentWidth:
          type: number
          minimum: 0
          maximum: 1
          description: How wide the signature should be, as a fraction of the page width.
          example: 0.25
        percentX:
          type: number
          minimum: -1
          maximum: 1
          description: >-
            How far to the side of the text found the signature belongs, as a
            fraction of the page width - negative to the left of it, positive to
            the right. Expressing it as a fraction is what keeps the placement
            right whatever the page size.
          example: 0.1
        percentY:
          type: number
          minimum: -1
          maximum: 1
          description: >-
            How far above or below the text found the signature belongs, as a
            fraction of the page height - negative upwards, positive downwards.
          example: -0.05
      required:
        - percentX
        - percentY
    responseDocumentsPageAndPosition:
      type: object
      properties:
        page:
          type: integer
          description: Page the anchor text was found on, the first page being `1`.
          example: 1
        position:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsSignatureItem'
          description: >-
            Where the signature field would sit on that page, with the requested
            offset and size already applied - so it is the placement to sign at,
            not the position of the text itself. It may fall outside the 0-1
            range; clamp it before using it.
    entityDocumentsPdfPreview:
      type: object
      properties:
        content:
          type: string
          description: >-
            Identifier of the PDF preview in the binary storage, set once the
            preview is ready. The preview is a separate stored file and is
            downloaded like any other file.
          example: p7kd2m4s9xq1v8b3n6c0z5w2e7r4t1y9u3i6o8a2s5d7f0g4h1j3k6l9z2x5c8v0b4
          nullable: true
        failureReason:
          type: string
          description: >-
            Why the last attempt to generate the preview failed; empty unless it
            failed.


            - `conversion_error`: The converter could not read the file, for
            example because it is damaged or its content does not match its
            type.

            - `file_too_large`: The file is larger than the biggest file a PDF
            preview is generated for.

            - `service_error`: The conversion service failed or could not be
            reached.

            - `timeout`: The conversion did not finish in time.
          enum:
            - conversion_error
            - file_too_large
            - service_error
            - timeout
            - null
          nullable: true
        status:
          type: string
          description: >-
            Where generating the preview stands.


            - `failed_irrecoverable`: The file cannot be turned into a PDF
            preview - its content was rejected or it is too large - and it is
            not tried again.

            - `failed_recoverable`: The last attempt failed for a reason that
            may pass, such as a timeout or an unavailable conversion service.
            The next request for the preview tries again once the retry cooldown
            has passed.

            - `finished`: The PDF preview is ready and `content` identifies it.

            - `in_progress`: The PDF preview is being generated.
          enum:
            - failed_irrecoverable
            - failed_recoverable
            - finished
            - in_progress
            - null
          nullable: true
        statusDate:
          type: string
          format: date-time
          description: >-
            When the preview last changed its status - when generating it
            started, finished or failed.
          nullable: true
    responseDocumentsSignatureItem:
      type: object
      properties:
        percentHeight:
          type: number
          description: Height of the element as a fraction of the page height.
          example: 0.06
        percentWidth:
          type: number
          description: Width of the element as a fraction of the page width.
          example: 0.25
        percentX:
          type: number
          description: >-
            Horizontal position of the element's top-left corner as a fraction
            of the page width, measured from the left edge of the page.
          example: 0.12
        percentY:
          type: number
          description: >-
            Vertical position of the element's top-left corner as a fraction of
            the page height, measured from the top edge of the page.
          example: 0.78
    responseDocumentsTermSuggestionError:
      type: object
      properties:
        message:
          type: string
          description: Human-readable explanation of the failure.
          example: The AI service did not answer in time.
        reason:
          type: string
          description: >-
            Why the failure happened, in more detail than `type`; `null` for a
            failure without a finer classification.


            - `timeout`: The AI service did not answer before the time allowed
            for the call ran out.

            - `cancelled`: The call was abandoned because the client that asked
            for it went away.

            - `invalid_configuration`: The configuration of the AI service
            cannot be used, such as a malformed service URL or a payload that is
            not a JSON object.

            - `connection_error`: The AI service could not be reached.

            - `context_length_exceeded`: The input was too long for the
            configured model.

            - `quota_exhausted`: The quota of the configured API key is
            exhausted.

            - `rate_limited`: The AI service turned the call down because too
            many calls were made in a short time.

            - `authentication`: The AI service did not accept the API key, or
            does not allow it what the call asked for.

            - `provider_unavailable`: The AI service was temporarily unavailable
            or overloaded.

            - `provider_rejected`: The AI service rejected the request as
            invalid, typically because of an option of the configured payload or
            model it does not support.

            - `empty_response`: The AI service returned no answer at all.

            - `provider_error`: The AI service reported that it failed to
            produce the answer.

            - `incomplete_max_output_tokens`: The answer was cut off because it
            reached the output limit.

            - `incomplete_content_filter`: The content filter of the AI service
            withheld the answer.

            - `unexpected_status`: The AI service reported the answer as not
            finished, such as still queued, in progress or cancelled.

            - `refusal`: The model refused to produce the requested content.

            - `empty_output`: The answer carried no content.

            - `invalid_json`: The answer was not the JSON document the call
            asked for.

            - `text_unavailable`: The text of the document could not be read,
            such as because its file or the service reading it was not
            available.

            - `text_time_budget`: Reading the text of the document took longer
            than allowed.

            - `service_busy`: The service reading the document was too busy to
            take the request.

            - `locator_unavailable`: The values could not be placed in the
            document, because looking up their passages failed or ran out of
            time.

            - `text_changed`: The text the passages were looked up in differs
            from the text the model was given, so the placements cannot be
            trusted.

            - `internal_error`: An unexpected error ended the detection.
          enum:
            - timeout
            - cancelled
            - invalid_configuration
            - connection_error
            - context_length_exceeded
            - quota_exhausted
            - rate_limited
            - authentication
            - provider_unavailable
            - provider_rejected
            - empty_response
            - provider_error
            - incomplete_max_output_tokens
            - incomplete_content_filter
            - unexpected_status
            - refusal
            - empty_output
            - invalid_json
            - text_unavailable
            - text_time_budget
            - service_busy
            - locator_unavailable
            - text_changed
            - internal_error
            - null
          nullable: true
        retryable:
          type: boolean
          description: >-
            Whether asking again may succeed; `false` when the same call would
            fail the same way.
        type:
          type: string
          description: >-
            Machine-readable classification of the failure, from the same
            catalogue as the `type` of an error response.
          example: INTEGRATION:CONNECTION_TIMEOUT
    responseDocumentsTermSuggestionDate:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        dateOrder:
          type: string
          description: >-
            How the order of day and month of the date as the document writes it
            was decided; `null` when the model reported none, such as for a date
            the platform worked out.


            - `unambiguous`: The written date can be read only one way, such as
            because it names the month or is written year first.

            - `proven_by_document`: The written date could be read two ways, but
            the document proves the order, such as by another date whose day is
            above 12.

            - `assumed`: Nothing in the document proves the order of day and
            month, so it was decided from cues such as the governing law or the
            addresses.
          enum:
            - unambiguous
            - proven_by_document
            - assumed
            - null
          nullable: true
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          type: string
          description: >-
            The calendar day, as `YYYY-MM-DD` - a day, not a moment, which may
            lie in the past; `null` when the candidate has `errors`.
          example: '2027-12-31'
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionPeriod:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        businessDays:
          type: boolean
          description: >-
            For a notice period: whether the document counts the notice in
            business days, as the model read it; `null` for a renewal period.
          nullable: true
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        purpose:
          type: string
          description: >-
            For a renewal notice period: what the notice does, as the model read
            it; `null` for any other period.


            - `non_renewal`: A notice of non-renewal - given in time, it stops
            the automatic renewal of the contract.

            - `renewal_request`: A notice requesting the renewal - unless it is
            given in time, the contract is not renewed.
          enum:
            - non_renewal
            - renewal_request
            - null
          nullable: true
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          type: string
          pattern: ^([1-9]\d{0,2})([yQMwd])$
          description: >-
            The period, as a count followed by one of the units `y`, `Q`, `M`,
            `w`, `d`; `null` when the candidate has `errors`.
          example: 1y
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionReminder:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          allOf:
            - $ref: '#/components/schemas/requestDocumentsBodyTermReminder'
          description: >-
            The reminder as it is added to the term's reminders - to the
            document's owner, at `09:00`, ahead of the renewal notice deadline;
            `null` when the candidate has `errors`.
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionCount:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          type: integer
          minimum: 1
          maximum: 100
          description: >-
            How many automatic renewals the contract allows - over its whole
            life, or for a rolled-forward candidate the ones it has left; `null`
            when the candidate has `errors`.
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionRenewalType:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          type: string
          description: >-
            How the contract is renewed; `null` when the candidate has `errors`.


            - `auto`: The platform extends the expiration date by the renewal
            period once the expiration day is over.

            - `manual`: The contract is renewed by hand — the expiration date
            moves only when somebody changes it.
          enum:
            - auto
            - manual
            - null
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionComputation:
      type: object
      properties:
        anchorDate:
          type: string
          description: >-
            For `model`: the day the model counted from, as `YYYY-MM-DD` and as
            the model wrote it; `null` when it named none.
          example: '2025-03-01'
          nullable: true
        businessDays:
          type: integer
          minimum: 1
          description: >-
            For `business_days`: how many business days the notice the value was
            converted from counts.
        from:
          type: string
          description: >-
            For `rolled_forward`: the expiration date found in the document that
            was moved forward, as `YYYY-MM-DD`.
          example: '2024-12-31'
        kind:
          type: string
          description: >-
            How the value was worked out; it decides which of the other
            properties are returned.


            - `model`: The model computed the value from a date and a duration
            the document states, such as twelve months after signature; the
            platform rechecks the arithmetic wherever the two allow it.

            - `rolled_forward`: The platform moved an expiration date found in
            the document that has passed forward by whole renewal periods of the
            automatic renewal - the last one only up to the final date, when the
            contract has one.

            - `business_days`: The platform converted a notice stated in
            business days to the whole weeks that span at least as many business
            days.

            - `notice_reminder`: The platform derived a reminder from a renewal
            notice period, to fire ahead of the notice deadline.
          enum:
            - model
            - rolled_forward
            - business_days
            - notice_reminder
        lead:
          type: string
          description: >-
            For `notice_reminder`: how long before the notice deadline the
            reminder fires - in days for a notice counted in days or weeks, in
            months for one counted in months, quarters or years.
          enum:
            - 30d
            - 1M
        noticePeriod:
          type: string
          pattern: ^([1-9]\d{0,2})([yQMwd])$
          description: >-
            For `notice_reminder`: the renewal notice period the reminder was
            derived from.
          example: 3M
        offset:
          type: string
          description: >-
            For `model`: the duration the model added to `anchorDate`, as the
            model wrote it; `null` when the rule is not a plain offset.
          example: 2y
          nullable: true
        period:
          type: string
          pattern: ^([1-9]\d{0,2})([yQMwd])$
          description: >-
            For `rolled_forward`: the renewal period the date was moved forward
            by.
          example: 1y
        recomputed:
          type: string
          description: >-
            For `model`: the day the platform arrives at by adding `offset` to
            `anchorDate`, as `YYYY-MM-DD`; `null` when the two do not allow the
            check.
          example: '2027-03-01'
          nullable: true
        renewals:
          type: integer
          minimum: 1
          description: >-
            For `rolled_forward`: how many renewal periods the date was moved
            forward by.
        rule:
          type: string
          description: >-
            For `model`: how the model says it computed the value, in one short
            sentence in the user's language.
          example: Two years after the date of signature.
          nullable: true
        verified:
          type: boolean
          description: >-
            For `model`: whether the value is `recomputed` or the day before it,
            the two ways contracts count the end of a duration; `null` when the
            check was not possible.
          nullable: true
    responseDocumentsTermSuggestionSource:
      type: object
      properties:
        documentText:
          type: string
          description: >-
            The document's own words under the placement - what a reader of the
            PDF sees there, which may differ from `quote` in spacing, accents or
            the words left out; `null` when the passage was not placed.
          example: This Agreement is concluded for a fixed term until 31 December 2027.
          nullable: true
        issues:
          type: array
          items:
            type: string
            description: >-
              One problem of the passage.


              - `quote_missing`: The model reported no passage.

              - `quote_too_short`: The passage is too short to be placed in the
              document reliably.

              - `quote_too_long`: The passage is longer than a passage looked up
              in the document may be.

              - `quote_contained_marker`: The passage contained page markers or
              other text the platform adds to the text the model is given; they
              were removed from it.

              - `page_out_of_range`: The page the model named is not a page of
              the text it was given, so no page is reported.
            enum:
              - quote_missing
              - quote_too_short
              - quote_too_long
              - quote_contained_marker
              - page_out_of_range
          description: >-
            Problems of the passage as the model reported it; empty when there
            are none.
        location:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionLocation'
          description: >-
            Where the passage is printed in the PDF and how certain that
            placement is.
        page:
          type: integer
          minimum: 1
          description: >-
            Page the model named for the passage, the first page being `1`;
            `null` when it named none, or one that is not a page of the text it
            was given.
          nullable: true
        quote:
          type: string
          description: >-
            The passage as the model reported it, with the page markers of the
            text it was given removed and its spacing collapsed - one too long
            to be looked up cut short right after the longest one that can be;
            `null` when the model reported none.
          example: This Agreement is concluded for a fixed term until 31 December 2027
          nullable: true
        role:
          type: string
          description: >-
            What the passage shows.


            - `value`: The passage the value is read from.

            - `anchor`: The passage stating the date a computed value is counted
            from.
          enum:
            - value
            - anchor
    requestDocumentsBodyTermReminder:
      type: object
      properties:
        notifyOwner:
          type: boolean
          description: >-
            Whether the reminder also goes to the document's owner, whoever that
            is at the moment it fires. A reminder without any `recipients` has
            to set it.
          nullable: true
        period:
          type: string
          pattern: ^([1-9]\d{0,2})([yQMwd])$
          description: >-
            How long before the expiration day the reminder fires, as a count
            followed by a unit - `y`, `Q`, `M`, `w` or `d`. Left empty, it fires
            on the expiration day itself.
          example: 30d
          nullable: true
        recipients:
          type: array
          items:
            type: string
          maxItems: 100
          description: >-
            Usernames of the users to send the reminder to. Each newly added one
            has to be a user the writer is allowed to see - the writer and the
            document's owner always are - and is given read access to the
            document when it is saved, so that the link in the reminder opens.
          example:
            - jane.doe@example.com
          nullable: true
        time:
          type: string
          pattern: ^(?:[01][0-9]|2[0-3]):(?:00|15|30|45)$
          description: >-
            Time of day the reminder fires at on its day, in the time zone of
            the user who configures it. Left empty, it fires at `09:00`.
          example: '09:00'
          nullable: true
    responseDocumentsTermSuggestionLocation:
      type: object
      properties:
        alternatives:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionAlternative'
          description: >-
            Other places the same wording is printed, in document order -
            reported only for a wording found as one uninterrupted run of text.
            Empty when there is none.
        ambiguous:
          type: boolean
          description: >-
            Whether the wording is printed more than once and nothing singled
            out the copy the value was read from, so `pages` may point at
            another copy.
          nullable: true
        coherent:
          type: boolean
          description: >-
            Whether the placed characters form one block on each page; `false`
            when they are scattered, which is what a table read out of order
            looks like.
          nullable: true
        complete:
          type: boolean
          description: >-
            Whether the whole passage was placed; `false` when only part of it
            could be, or when the placement starts or ends inside a word of the
            document.
          nullable: true
        exact:
          type: boolean
          description: >-
            Whether the passage matched with only spacing, letter case and
            character forms such as ligatures disregarded; `false` when dashes,
            the script of digits, quotation mark styles or accents had to be
            disregarded as well to find it.
          nullable: true
        hiddenText:
          type: boolean
          description: >-
            Whether the placed characters include text printed invisibly or too
            small to read, so the passage may not be what a reader of the PDF
            sees there.
          nullable: true
        hintHonoured:
          type: boolean
          description: >-
            Whether the placement touches the page the model named for the
            passage.
          nullable: true
        interrupted:
          type: boolean
          description: >-
            Whether unrelated text sits between the placed words on the same
            page, such as a column in another language or a footnote marker.
            Text skipped over a page break, such as a header or a footer, does
            not count.
          nullable: true
        matchedRatio:
          type: number
          minimum: 0
          maximum: 1
          description: Share of the passage's characters that were placed.
          nullable: true
        occurrences:
          type: integer
          minimum: 0
          description: >-
            How many times the placed wording is printed in the document,
            counted up to a cap.
          nullable: true
        occurrencesCapped:
          type: boolean
          description: Whether the wording is printed more often than `occurrences` counts.
          nullable: true
        pages:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionLocationPage'
          description: >-
            Where the passage is printed, one entry per page it covers, in
            reading order - two for a passage running over a page break. Empty
            when it was not placed.
        readingOrder:
          type: boolean
          description: >-
            Whether the passage was found only once the page text was re-read in
            its visual reading order, because the order the PDF stores its text
            in gave no complete placement - typical of columns and tables.
          nullable: true
        status:
          type: string
          description: >-
            How certain the placement is. The flags and counts beside it give
            the detail behind it; each of them is `null` when the passage was
            not looked up.


            - `located`: The whole passage was placed as one continuous passage
            on one unambiguous spot, possibly running over a page break.

            - `ambiguous`: The passage is printed more than once, and nothing
            singled out the copy the value was read from.

            - `partial`: Only part of the passage could be placed, or the
            placement starts or ends inside a word.

            - `scattered`: The placed characters do not form one continuous
            passage.

            - `hidden_text`: The placed passage includes characters printed
            invisibly or too small to read, so it may not be what a reader of
            the document sees.

            - `not_found`: The passage is not in the document's text.

            - `not_attempted`: The passage was not looked up - it is not
            suitable for placing, such as too short or too long, or looking it
            up was not possible.
          enum:
            - located
            - ambiguous
            - partial
            - scattered
            - hidden_text
            - not_found
            - not_attempted
        tokenBoundary:
          type: boolean
          description: >-
            Whether the placement starts and ends on the boundaries of words of
            the document; `false` when it starts or ends inside one.
          nullable: true
    responseDocumentsTermSuggestionAlternative:
      type: object
      properties:
        pages:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionLocationPage'
          description: >-
            Where this copy of the wording is printed, one entry per page it
            covers, in reading order.
    responseDocumentsTermSuggestionLocationPage:
      type: object
      properties:
        page:
          type: integer
          minimum: 1
          description: Page, the first page being `1`.
        rectangles:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsSignatureItem'
          description: >-
            Boxes covering the passage on the page, one per printed line, in
            reading order - the first one is where the passage starts.
  securitySchemes:
    Token:
      type: apiKey
      in: query
      name: token
      description: >-
        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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.