> ## 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.

# Report on documents and their transactions

> `POST /search/reports`

Reports on the documents a search matches, one row per document, pairing what each document is with how the transaction on it has gone.

A row carries the document's own facts - its title, identifier, metadata definition, category, owner and creator, its size and page count, its tags, permissions and metadata field values - next to the transaction: where it stands, who started it, when it began and ended, how long it ran and what closed it. The actions asked for on the document come with it, sorted by where each of them stands: carried out, awaited now, still to come, and no longer needed because the round they belonged to was satisfied without them. Handovers are listed apart from those, as a ledger of who passed which action to whom.

The report reaches past the documents the caller has to do with, out to those of the whole organization they belong to, which is what separates it from a plain search; the query then narrows that down. Rows are paged by the search's own paging, so a report is read a page at a time like any other result set.

Because a row is a large object of which most reports need only a handful of properties, `fields` cuts it down to the ones asked for. A search matching no document at all is answered as not found rather than as an empty report.

---

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

**Required user rights:** `use_all_documents_export`



## OpenAPI

````yaml /api-v1/openapi.json post /search/reports
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:
  /search/reports:
    post:
      tags:
        - Search
      summary: Report on documents and their transactions
      description: >-
        `POST /search/reports`


        Reports on the documents a search matches, one row per document, pairing
        what each document is with how the transaction on it has gone.


        A row carries the document's own facts - its title, identifier, metadata
        definition, category, owner and creator, its size and page count, its
        tags, permissions and metadata field values - next to the transaction:
        where it stands, who started it, when it began and ended, how long it
        ran and what closed it. The actions asked for on the document come with
        it, sorted by where each of them stands: carried out, awaited now, still
        to come, and no longer needed because the round they belonged to was
        satisfied without them. Handovers are listed apart from those, as a
        ledger of who passed which action to whom.


        The report reaches past the documents the caller has to do with, out to
        those of the whole organization they belong to, which is what separates
        it from a plain search; the query then narrows that down. Rows are paged
        by the search's own paging, so a report is read a page at a time like
        any other result set.


        Because a row is a large object of which most reports need only a
        handful of properties, `fields` cuts it down to the ones asked for. A
        search matching no document at all is answered as not found rather than
        as an empty report.


        ---


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


        **Required user rights:** `use_all_documents_export`
      operationId: requestSearchPostReports
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestSearchPostReports'
      responses:
        '200':
          description: Returns a report row for every document the search matched.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseSearchReportsMultiple'
        '400':
          description: >-
            The query cannot be built, or the selection of properties would
            leave a row with nothing in it.
          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
        '403':
          description: The caller lacks the required right.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 403
                type: AUTH:ACCESS_DENIED
                message: Access denied
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '404':
          description: The search matched no document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 404
                type: RESOURCE:NOT_FOUND
                message: Resource not found
                requestId: 3fa85f6457174562b3fc2c963f66afa6
      security:
        - Token: []
components:
  schemas:
    requestSearchPostReports:
      type: object
      properties:
        fields:
          type: array
          items:
            type: string
          description: >-
            Properties of a report row to keep, everything else being left out.
            Left empty, a row comes back whole. A name nothing in a row answers
            to is ignored, and a selection that would leave a row with nothing
            in it at all is refused.
          example:
            - documentTitle
            - shareStateName
            - transactionDuration
          nullable: true
        query:
          allOf:
            - $ref: '#/components/schemas/requestGenericDocumentSearch'
          description: >-
            The search that decides which documents the report covers, in the
            same shape `POST /search` takes. It carries the ordering and the
            paging as well, since the report describes the page of documents the
            search returns rather than the whole result set.
    responseSearchReportsMultiple:
      type: object
      properties:
        aggs:
          type: object
          additionalProperties: false
          description: >-
            Results of the aggregations the search carried, answered as the
            search engine produced them and describing the whole matched set
            rather than this page. Absent where the search asked for none.
        from:
          type: integer
          description: >-
            Zero-based position of the first returned row within the whole
            result set, as the search asked for it.
          example: 0
        results:
          type: array
          items:
            $ref: '#/components/schemas/responseSearchReportsSingle'
          description: >-
            The report, one row per matched document, in the order the search
            produced them.
        scrollId:
          type: string
          description: >-
            Cursor to send with the next request to continue the walk through
            the results. Present only while a scroll context is in use, and to
            be closed with `DELETE /search/scroll` once the walk is over.
          example: 8kZtoG59p8qvO4a5LepHCNaR7LGH7BKFIAU1rd5DAEBPi4pxxIA6NVOAd0GXKB1m
        total:
          type: integer
          description: >-
            Number of documents the search matched in total, which is what to
            page through - not the number of rows in this answer.
          example: 137
    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
    requestGenericDocumentSearch:
      type: object
      properties:
        activity:
          type: object
          additionalProperties: false
          description: >-
            Narrows the results by where their workflow stands. It takes
            `states` and `requests`, each a list of names, and keeps a document
            that is in one of the given workflow states or whose last request is
            of one of the given kinds.
          example:
            states:
              - signing
            requests:
              - sign
        aggs:
          type: object
          additionalProperties: false
          description: >-
            Elasticsearch aggregations, passed through as sent and answered
            alongside the results. Two kinds are refused because they would
            reach past the caller's own view of the data: a `global`
            aggregation, which escapes the access filter, and anything carrying
            a script. A `top_hits` aggregation is accepted only where the
            endpoint runs it inside that same filter.
        allowFolders:
          type: boolean
          description: >-
            Whether folders may appear among the results. Left off, only
            documents come back.
        assignedToGroups:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Narrows the results to the documents whose workflow addresses any of
            the given groups, or a member of one of them. Membership is resolved
            as the search runs.
          example:
            - accounting
          nullable: true
        createdByGroups:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Narrows the results to the documents created by a member of any of
            the given groups. Membership is resolved as the search runs, so the
            filter follows the groups as they stand now rather than as they
            stood when a document was created.
          example:
            - accounting
          nullable: true
        esFilters:
          oneOf:
            - type: array
              items:
                type: object
                additionalProperties: false
            - type: object
              additionalProperties: false
          description: >-
            Raw Elasticsearch clauses, passed through untouched, all of which
            have to match without contributing to the relevance score. This is
            the escape hatch for a condition no curated filter covers.
        esQuery:
          type: array
          items:
            type: object
            additionalProperties: false
          description: >-
            Raw Elasticsearch clauses, passed through untouched, all of which
            have to match. They are for a condition the curated restrictions
            cannot express, and they contribute to the relevance score; the
            non-scoring counterpart is `esFilters`.
        exclude:
          type: array
          items:
            type: string
          description: >-
            Dotted paths to strip out of every returned document, so that a
            listing does not have to carry the parts of a document it will never
            render. They are removed from the results once fetched rather than
            from the search itself, which leaves the endpoints answering with a
            count or a file untouched by it.
          example:
            - file
            - workflow.history
          nullable: true
        fields:
          type: array
          items:
            $ref: '#/components/schemas/requestGenericDocumentQueryField'
          description: >-
            Restrictions on the document's own top-level fields, all of which
            have to match. They contribute to the relevance score, so a better
            match is ordered higher - which makes them the right place for the
            conditions the ranking of the results should follow. A condition
            that only narrows the set belongs in `filters.document`, where it
            costs less.
        filters:
          allOf:
            - $ref: '#/components/schemas/requestGenericDocumentFilter'
          description: >-
            Restrictions grouped by the part of the document they apply to, all
            of which have to match. Unlike `fields` they do not contribute to
            the relevance score, which makes them the cheaper choice for plain
            narrowing.
        folder:
          allOf:
            - $ref: '#/components/schemas/requestSearchDocumentsFolder'
          description: >-
            Narrows the results to one folder, of the caller's own tree or of
            the tenant's shared one. It says where to look, not whether folders
            themselves may come back - that is `allowFolders`.
        from:
          type: integer
          description: >-
            Zero-based offset of the first result, used with `size` to page
            through them. It has to stay at zero while a `scroll` context is in
            use, and `page` together with `limit` overrides it.
          example: 0
          default: 0
        highlight:
          type: object
          additionalProperties: false
          description: >-
            Elasticsearch highlighting settings, passed through as sent - a
            `fields` object inside is what makes it act. The one addition is the
            field name `CONTENT`, which the platform expands into the full-text
            content fields of the metadata definitions in play; where the
            endpoint works without definitions it expands to nothing.
        inbox:
          type: boolean
          description: >-
            Narrows the results to what is waiting for the caller - the
            documents whose workflow addresses them personally, or one of their
            groups, or lists them among the participants whose turn it currently
            is. Trashed documents stay out of it.
        lastAction:
          type: array
          items:
            $ref: '#/components/schemas/requestGenericDocumentQueryField'
          description: Restriction on last action
        lastActivity:
          type: array
          items:
            $ref: '#/components/schemas/requestGenericDocumentQueryField'
          description: Restriction on last activity (action/request)
        lastRequest:
          type: array
          items:
            $ref: '#/components/schemas/requestGenericDocumentQueryField'
          description: Restriction on last request
        limit:
          type: integer
          description: >-
            Page size, the other half of the `page`/`limit` way of paging. Both
            have to be sent, and when they are they take precedence over `from`
            and `size`.
          example: 20
        nested_queryStrings:
          type: array
          items:
            type: object
            additionalProperties: false
        page:
          type: integer
          description: >-
            Zero-based index of the page to return, used together with `limit`.
            Both have to be sent for either of them to take effect.
          example: 0
        query_string:
          type: object
          additionalProperties: false
          description: >-
            Full-text search across the documents, shaped like an Elasticsearch
            `query_string` but not handed over untouched: the text is escaped
            first, so a trailing `*` for a prefix and quotes for a phrase still
            work while field names, ranges, grouping and fuzziness are taken
            literally. Matching is lenient, a trailing `*` is tried a second
            time without it, and the text is matched against the main file's
            extension as well. A field named with a dotted path is turned into a
            nested query on its own.
        scroll:
          allOf:
            - $ref: '#/components/schemas/requestGenericSearchScroll'
          description: >-
            Cursor for walking a result set deeper than plain offset paging
            reaches. It holds a point-in-time view of the index open, so the
            walk sees a consistent snapshot - and so the context has to be
            closed once the walk is over, whether or not it ran to the end.
        signable:
          type: boolean
          description: Return only documents that are signable and folders.
        size:
          type: integer
          minimum: 0
          maximum: 100
          description: >-
            Maximum number of results to return. Zero is allowed and asks for
            the total count and the aggregations without the documents
            themselves.
          example: 10
          default: 10
        sort:
          oneOf:
            - type: array
              items:
                type: object
                additionalProperties: false
            - type: object
              additionalProperties: false
          description: >-
            Elasticsearch sort specification, passed through as sent. Without it
            the results arrive in the search engine's own order, which is by
            relevance wherever anything was scored.
        tags:
          allOf:
            - $ref: '#/components/schemas/requestGenericDocumentTags'
          description: >-
            Narrows the results by tag. Every group of tags that is filled in
            has to be satisfied, so the groups narrow each other rather than
            widening the search.
        trash:
          type: boolean
          description: >-
            Whether to look in the trash instead of among the live documents.
            Only what the caller trashed themselves comes back; left off, every
            search leaves trashed documents out.
        type:
          type: string
          description: >-
            Narrows the results to a single metadata definition, matched on the
            document's own definition name. To accept several of them at once,
            send a `terms` restriction on that field through `filters.document`
            instead.
          example: d_default
        unreadOnly:
          type: boolean
          description: Narrows the results to the documents the caller has not opened yet.
        workflow:
          type: string
          description: Workflow type.
          example: wf_archive
    responseSearchReportsSingle:
      type: object
      properties:
        alreadyProcessed:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/responseSearchReportsSingleItem'
            nullable: true
          description: >-
            Actions that have been carried out, oldest first. The owner signing
            their own document appears here too.
          nullable: true
        createDate:
          type: string
          format: date-time
          description: When the document was created.
          nullable: true
        createName:
          type: string
          description: User who created the document.
          example: john.doe@example.com
          nullable: true
        customMetadata:
          type: object
          additionalProperties:
            description: Additional properties
          description: >-
            Values of the fields the document's metadata definition declares,
            keyed by field name. What a value looks like follows the kind of
            field it belongs to.
          example:
            D_DEFAULT_DESCRIPTION: Quarterly maintenance contract
          nullable: true
        delegations:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/responseSearchReportsSingleDelegation'
            nullable: true
          description: >-
            Every handover of an action to somebody else, as a record of who
            passed what to whom and when. A handed-over action still appears
            once in the lists above, under whoever holds it now, so this adds to
            them rather than being a fifth list.
          nullable: true
        documentCategory:
          type: string
          description: Category the document is filed under.
          example: Contracts
          nullable: true
        documentDefinition:
          type: string
          description: Metadata definition the document was created with.
          example: d_default
          nullable: true
        documentId:
          type: string
          description: Identifier of the document this row reports on.
          example: a0d01c9d-f72f-4c57-af11-e26bda19cc59
          nullable: true
        documentTitle:
          type: string
          description: Title of the document.
          example: Client agreement
          nullable: true
        organization:
          type: string
          description: Identifier of the organization the document belongs to.
          example: d0a72e51-728e-4a1d-9a5c-13796122b6f8
          nullable: true
        owner:
          type: string
          description: >-
            User who owns the document now, which need not be the one who
            created it.
          example: john.doe@example.com
          nullable: true
        pages:
          type: integer
          description: >-
            Number of pages of the document's PDF rendition. Empty where the
            document has no such rendition.
          example: 3
          nullable: true
        rights:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/responseSearchReportsSingleRights'
            nullable: true
          description: Users and groups allowed to read or edit the document.
          nullable: true
        sender:
          type: string
          description: >-
            User who sent the document out and thereby started the transaction.
            Empty where none has been started, and where the only signature on
            it is the owner's own.
          example: john.doe@example.com
          nullable: true
        sharedWith:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Users the document is shared with for viewing only, as opposed to
            those asked to act on it.
          example:
            - jane.roe@example.com
          nullable: true
        shareStateName:
          type: string
          description: >-
            Where the transaction on the document stands. A document that has
            never been sent out reports `not-started`.
          example: completed
          nullable: true
        signingTemplate:
          type: string
          description: >-
            Identifier of the signing template the document's transaction was
            built from.
          example: 0a2d3b2a-2e91-4de0-a2f6-6bb2c72b9d31
          nullable: true
        size:
          type: integer
          description: Size of the document's main file, in bytes.
          example: 215040
          nullable: true
        tags:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Tags everybody who can see the document sees; the private tags of
            individual users are left out.
          example:
            - contract
            - '2026'
          nullable: true
        totalActions:
          type: integer
          description: >-
            Everything ever done with the document counted together - every
            action asked for, every share that only grants viewing or editing,
            and every handover, from every round of sending it out and including
            what was cancelled or has expired. It is the broadest count here and
            normally larger than `totalRecipients`.
          example: 6
          nullable: true
        totalProcessed:
          type: integer
          description: >-
            Number of actions already carried out, that is the size of
            `alreadyProcessed`.
          example: 2
          nullable: true
        totalRecipients:
          type: integer
          description: >-
            Number of actions asked for on the document, counted across the four
            lists below. It counts actions and not people, so somebody asked
            twice counts twice.
          example: 3
          nullable: true
        totalWaitingFor:
          type: integer
          description: >-
            Number of actions being waited for right now, that is the size of
            `waitingFor`.
          example: 1
          nullable: true
        transactionDuration:
          type: integer
          description: >-
            How long the transaction ran, in milliseconds, from being sent out
            to reaching its final state. Empty while it is still running.
          example: 86400000
          nullable: true
        transactionEndDate:
          type: string
          format: date-time
          description: >-
            When the transaction reached its final state. Empty while it is
            still running or has never started.
          nullable: true
        transactionEndReason:
          type: string
          description: >-
            What closed the transaction, named after the event that did it - the
            actions being completed, or the transaction being rejected,
            cancelled or run out of time. Empty while it is still running.
          example: share_actions_completed
          nullable: true
        transactionStartDate:
          type: string
          format: date-time
          description: When the transaction was started.
          nullable: true
        uniqueProcessedParticipants:
          type: integer
          description: >-
            Number of distinct people behind the actions already carried out. It
            falls below `totalProcessed` where the same person acted more than
            once, or where one recipient of a round acted for the whole round.
          example: 2
          nullable: true
        unused:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/responseSearchReportsSingleItem'
            nullable: true
          description: >-
            Actions that will not be carried out any more: the round of the
            sequential transaction they belonged to was satisfied by other
            recipients of that same round, so these were never needed.
          nullable: true
        waitingFor:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/responseSearchReportsSingleItem'
            nullable: true
          description: Actions whose turn it is now and which the document is waiting on.
          nullable: true
        waitingForTurn:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/responseSearchReportsSingleItem'
            nullable: true
          description: >-
            Actions of a later round of a sequential transaction, whose turn has
            not come yet.
          nullable: true
    requestGenericDocumentQueryField:
      type: object
      properties:
        field:
          type: string
          description: >-
            Name of the field to restrict. Inside a nested group of `filters` it
            is the name relative to that group - `state`, not the group's own
            prefix followed by it - while everywhere else it is the document's
            own top-level field name, dotted path included.
          example: documentType
        inverse:
          type: boolean
        type:
          type: string
          description: >-
            Kind of Elasticsearch restriction to build - `term`, `terms`,
            `range`, `prefix`, `wildcard`, `match` and the like. It wraps
            `field` and `value`, so it is what decides the shape `value` has to
            take.
          example: term
        value:
          description: >-
            Value the restriction matches against. Its shape follows from
            `type`: a single value for `term`, a list for `terms`, an object of
            bounds for `range`.
          example: d_default
      required:
        - field
        - type
    requestGenericDocumentFilter:
      type: object
      properties:
        document:
          type: array
          items:
            $ref: '#/components/schemas/requestGenericDocumentQueryField'
          description: >-
            Restrictions on the document's own top-level fields, all of which
            have to match.
        history:
          type: array
          items:
            $ref: '#/components/schemas/requestGenericDocumentQueryField'
          description: >-
            Restrictions on the workflow history, all of which have to match
            within one and the same history record - which is what makes it
            possible to ask for an action of a given kind performed by a given
            user, rather than merely for both appearing somewhere in the
            history. Field names are given relative to the history record.
        workflow:
          type: array
          items:
            $ref: '#/components/schemas/requestGenericDocumentQueryField'
          description: >-
            Restrictions on the document's workflow, all of which have to match
            within one and the same workflow record. Field names are given
            relative to the workflow, so `state` rather than the full path to
            it.
    requestSearchDocumentsFolder:
      type: object
      properties:
        folder:
          type: string
          description: >-
            Identifier of the folder to search in. Left empty, the search starts
            at the root of the tree.
          example: 8b312068-ecdf-4fa6-8f13-c6183da85f43
          nullable: true
        global:
          type: boolean
          description: >-
            Whether the folder belongs to the tenant's shared folder tree
            instead of the caller's own. Where a folder identifier is given, the
            endpoints that resolve the folder take this from the folder itself,
            so it decides the tree only for a search starting at the root.
          example: false
          default: false
        recursive:
          type: boolean
          description: >-
            Whether to search the folder together with everything nested
            underneath it, rather than only what sits directly in it.
          example: false
          default: false
    requestGenericSearchScroll:
      type: object
      properties:
        id:
          type: string
          description: >-
            Cursor handed back by the previous page. Send it with the query
            otherwise unchanged to get the page after it, and leave it out to
            open a new context. It is opaque - it carries the snapshot the walk
            is reading and the position within it, so it cannot be composed or
            reordered by hand.
          nullable: true
        timeout:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 60
          description: >-
            How long the context stays alive, in seconds, counted from this
            request. It has to be sent to open a new context, and sending it
            again on a following page extends the one already open.
          example: 30
          nullable: true
    requestGenericDocumentTags:
      type: object
      properties:
        and:
          type: boolean
          description: >-
            Whether a document has to carry every tag listed in a group, or just
            one of them.
          example: false
          default: false
        any:
          type: array
          items:
            type: string
          description: >-
            Tags to look for among all the tags the caller may see - the
            tenant's public ones and their own private ones alike. Which of the
            two are actually searched follows from the rights the caller holds.
          example:
            - invoice
        global:
          type: array
          items:
            type: string
          description: >-
            Tags to look for among the tenant's public tags, the ones shared by
            everybody. Searching them takes the right to view public tags;
            without it this group is not applied.
          example:
            - invoice
        user:
          type: array
          items:
            type: string
          description: >-
            Tags to look for among the caller's own private tags. Searching them
            takes the right to use private tags; without it this group is not
            applied.
          example:
            - to-review
    responseSearchReportsSingleItem:
      type: object
      properties:
        date:
          type: string
          format: date-time
          description: >-
            When the action was carried out. Empty for anything not carried out
            yet - when the turn began is `dateOfReceivingTheAction`.
          nullable: true
        dateOfReceivingTheAction:
          type: string
          format: date-time
          description: >-
            When it became this person's turn. Empty for an action of a round
            that has not been reached yet.
          nullable: true
        delegatedUser:
          type: boolean
          description: >-
            Whether the action reached the person holding it by being handed on
            from somebody else.
          nullable: true
        duration:
          type: integer
          description: >-
            How long the person took to act, in milliseconds, counted from the
            moment it became their turn.
          example: 120000
          nullable: true
        expiration:
          type: string
          format: date-time
          description: The person's own deadline to act.
          nullable: true
        lastAction:
          type: boolean
          description: >-
            Marks the most recent of the carried-out actions. At most one action
            of a document is marked, and only among those already carried out.
          nullable: true
        order:
          type: integer
          description: >-
            Round of a sequential transaction the action belongs to, which is
            what decides who is on turn when. It is not there at all where the
            transaction runs in parallel.
          example: 1
          nullable: true
        reminder:
          type: string
          format: date-time
          description: When the last reminder was sent to the person.
          nullable: true
        rights:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            What the person may do with the document besides the action itself,
            such as printing it, handing it on, or filling in its metadata.
          example:
            - print
            - metadata
          nullable: true
        seen:
          type: boolean
          description: Whether the person has opened the document.
          nullable: true
        selfSign:
          type: boolean
          description: >-
            Whether this is the owner signing their own document rather than
            somebody being asked to act on it.
          nullable: true
        shareId:
          type: string
          description: >-
            Identifier of this participation in the transaction. Where the
            action has been handed on, it is the identifier of the latest hop;
            the owner's own signature has none.
          example: sd0oAvfpB4k0yDf787x4
          nullable: true
        shareType:
          type: string
          description: >-
            What the person was asked to do with the document. Only the acting
            kinds reach a report - to sign, to accept, to approve, to review -
            since granting a view or an edit is not an action to be waited for.
          example: sign
          nullable: true
        user:
          type: string
          description: >-
            Person the action rests with - the username of an account of the
            tenant, or the e-mail address of somebody outside it. Where the
            action was handed on, this is whoever holds it now rather than who
            was asked first.
          example: jane.roe@example.com
          nullable: true
        verification:
          type: string
          description: >-
            How the person's identity is checked before they may act: the method
            they actually passed once they have acted, and the protection still
            standing in their way until then. Empty where their access is not
            protected at all.
          example: sms
          nullable: true
    responseSearchReportsSingleDelegation:
      type: object
      properties:
        date:
          type: string
          format: date-time
          description: When the action was handed on.
          nullable: true
        from:
          type: string
          description: Person who handed the action on.
          example: jane.roe@example.com
          nullable: true
        fromShareId:
          type: string
          description: Identifier of the participation the action was handed on from.
          example: sd0oAvfpB4k0yDf787x4
          nullable: true
        order:
          type: integer
          description: Round of a sequential transaction the handed-on action belongs to.
          example: 1
          nullable: true
        to:
          type: string
          description: Person the action was handed to.
          example: john.roe@example.com
          nullable: true
        toShareId:
          type: string
          description: >-
            Identifier of the participation created for the person it was handed
            to. It is the one the action is followed under from then on.
          example: Ck4tPq7fMz1wLb92Xr0v
          nullable: true
        type:
          type: string
          description: The action that was handed on.
          example: sign
          nullable: true
    responseSearchReportsSingleRights:
      type: object
      properties:
        editGroups:
          type: array
          items:
            type: string
            nullable: true
          description: Groups whose members are allowed to edit the document.
          example:
            - d0a72e51-728e-4a1d-9a5c-13796122b6f8
          nullable: true
        editUsers:
          type: array
          items:
            type: string
            nullable: true
          description: Users allowed to edit the document.
          example:
            - john.doe@example.com
          nullable: true
        readGroups:
          type: array
          items:
            type: string
            nullable: true
          description: Groups whose members are allowed to read the document.
          example:
            - d0a72e51-728e-4a1d-9a5c-13796122b6f8
          nullable: true
        readUsers:
          type: array
          items:
            type: string
            nullable: true
          description: Users allowed to read the document.
          example:
            - john.doe@example.com
          nullable: true
  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.