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

# Search the audit log

> `POST /logs/search`

Searches the record of what has happened in the tenant - who did what, to which object and when - which is what an audit, a security review or a usage report is built from. Entries are written for actions across the whole platform and are never changed or removed afterwards.

How much of that record a caller sees depends on who they are. An ordinary user sees only entries that concern them personally - what they did, and what was done to their documents, shares and account. An organization administrator sees those plus everything belonging to their own organization. A global administrator sees the whole tenant, and is the only one shown entries about payment. Some parts of an entry are withheld the same way, and cannot be searched on by a caller who would not be shown them.

Large results are read a page at a time: ask for paging in `scroll`, then send back the handle each page returns until the entries run out, and release the paging with `DELETE /logs/scroll` when you stop early. Note that entries are written in batches, so an action taken a moment ago may not be searchable yet.

---

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

**Required user rights:** `view_logs`



## OpenAPI

````yaml /api-v1/openapi.json post /logs/search
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:
  /logs/search:
    post:
      tags:
        - Logs
      summary: Search the audit log
      description: >-
        `POST /logs/search`


        Searches the record of what has happened in the tenant - who did what,
        to which object and when - which is what an audit, a security review or
        a usage report is built from. Entries are written for actions across the
        whole platform and are never changed or removed afterwards.


        How much of that record a caller sees depends on who they are. An
        ordinary user sees only entries that concern them personally - what they
        did, and what was done to their documents, shares and account. An
        organization administrator sees those plus everything belonging to their
        own organization. A global administrator sees the whole tenant, and is
        the only one shown entries about payment. Some parts of an entry are
        withheld the same way, and cannot be searched on by a caller who would
        not be shown them.


        Large results are read a page at a time: ask for paging in `scroll`,
        then send back the handle each page returns until the entries run out,
        and release the paging with `DELETE /logs/scroll` when you stop early.
        Note that entries are written in batches, so an action taken a moment
        ago may not be searchable yet.


        ---


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


        **Required user rights:** `view_logs`
      operationId: requestLogsPostSearch
      parameters:
        - in: query
          name: photoSize
          description: >-
            Which rendition of the profile pictures to return. It only matters
            when the people behind the entries are being returned as well.
          required: false
          schema:
            type: string
            enum:
              - nano
              - small
              - medium
              - big
            example: nano
            default: nano
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestLogsPostSearch'
      responses:
        '200':
          description: >-
            Returns the matching entries and how many there are altogether.
            Matching nothing is a success with an empty list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseLogsMultiple'
        '400':
          description: >-
            The query is malformed, it refers to a field the caller may not
            search on, or the paging handle is not one this endpoint issued.
          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
      security:
        - Token: []
components:
  schemas:
    requestLogsPostSearch:
      type: object
      properties:
        includeUsers:
          type: boolean
          description: >-
            Looks up the people the returned entries refer to and returns them
            alongside, so a client can show names and pictures rather than bare
            usernames.
          example: false
          default: false
        logsQuery:
          allOf:
            - $ref: '#/components/schemas/internalSearchQueryUnlimited'
          description: >-
            Which entries to return, as a search query over the fields of an
            audit entry. A caller who is not an administrator may not query the
            fields that are withheld from them, and a query that mentions one is
            refused rather than quietly narrowed.
        scroll:
          allOf:
            - $ref: '#/components/schemas/requestGenericSearchScroll'
          description: >-
            Ask for the results a page at a time. Send it on the first call to
            open the paging, then send back the handle each page returns to get
            the next one. Do not combine it with an offset in the query.
    responseLogsMultiple:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/responseLogsSingle'
          description: >-
            The matching entries, newest sorting first unless the search asked
            otherwise.
        scrollId:
          type: string
          description: >-
            Handle for fetching the next page of this same search. It changes
            with every page, so always send back the one that came last. It is
            only present when the search was started with paging.
          example: 8kZtoG59p8qvO4a5LepHCNaR7LGH7BKFIAU1rd5DAEBPi4pxxIA6NVOAd0GXKB1m
        total:
          type: number
          description: >-
            How many entries match the search altogether, not just how many came
            back in this page.
          example: 51221
        users:
          type: array
          items:
            $ref: '#/components/schemas/responseUsersMinimum'
          description: >-
            Details of the people the returned entries refer to, so a client can
            show names and pictures instead of bare usernames. It is filled in
            only on request, and it leaves out anyone the caller may not see.
    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
    internalSearchQueryUnlimited:
      type: object
      properties:
        from:
          type: integer
          minimum: 0
          description: Starting position in the result set.
          example: 0
          default: 0
          nullable: true
        query:
          allOf:
            - $ref: '#/components/schemas/internalSearchQueryObject'
          description: >-
            Root boolean query the records are matched against. Omit it to match
            all records the caller may see.
        size:
          type: integer
          minimum: 0
          maximum: 50000
          description: Maximum number of results to return.
          example: 100
          default: 100
          nullable: true
        sort:
          type: array
          items:
            $ref: '#/components/schemas/internalSearchQuerySort'
          description: >-
            Ordering of the results, applied in the given order. Without it the
            records come back in the search engine's own order.
    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
    responseLogsSingle:
      type: object
      properties:
        activityTarget:
          type: string
          description: >-
            What kind of object the entry is about. Together with `activityType`
            it identifies the event - the same type recurs under several
            targets, so neither is meaningful on its own.
          example: document
          nullable: true
        activityType:
          type: string
          description: What happened to that object.
          example: signed
          nullable: true
        actorId:
          type: string
          description: >-
            Username of the person who caused the event. It is empty when the
            platform acted on its own, and also on a failed sign-in, where the
            name that was tried is recorded on the attempt itself instead.
          example: john.doe@example.com
          nullable: true
        actorType:
          type: string
          description: >-
            Whether a person or the platform itself caused the event. It says
            the platform exactly when no `actorId` could be established.
          example: user
          nullable: true
        authentication:
          allOf:
            - $ref: '#/components/schemas/entityLogsAuthentication'
          description: >-
            Details of a sign-in, a second-factor step or a link to an external
            identity provider.
        certificate:
          allOf:
            - $ref: '#/components/schemas/entityLogsCertificate'
          description: >-
            The signing certificate involved, recorded alongside a signature, a
            seal or a change to the certificates a tenant trusts.
        clonedFrom:
          allOf:
            - $ref: '#/components/schemas/entityLogsClonedFrom'
          description: The document a new document was copied from.
        connection:
          allOf:
            - $ref: '#/components/schemas/entityLogsConnection'
          description: >-
            Where the request that caused the event came from. It is absent for
            events the platform raised outside any request, such as those coming
            from a background job.
        document:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocument'
          description: Details of the document the event is about.
        generic:
          allOf:
            - $ref: '#/components/schemas/entityLogsGeneric'
          description: >-
            What an edit changed, and how an operation turned out - one carried
            out in the background, or a call to a language model. It accompanies
            several kinds of entry rather than belonging to one.
        group:
          allOf:
            - $ref: '#/components/schemas/entityLogsGroup'
          description: Details of the group the event is about.
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          minLength: 1
          description: Identifier of the audit entry.
          example: 0e0PfpcBGFrg4D9XeKcl
        integrityChain:
          type: string
          description: >-
            Identifies the run of entries this one belongs to. Each writing
            process starts its own chain, and entries are sealed against
            tampering only within it.
          nullable: true
        integrityChecksum:
          type: string
          description: >-
            Seal covering this entry and every earlier entry of the same chain,
            so that altering, removing or reordering any of them can be detected
            afterwards.
          nullable: true
        integritySequence:
          type: integer
          description: >-
            Position of the entry within its chain, counted from zero. A gap in
            the sequence means entries went missing.
        language:
          allOf:
            - $ref: '#/components/schemas/entityLogsLanguage'
          description: Details of a change to the tenant's languages or translations.
        llmUsage:
          allOf:
            - $ref: '#/components/schemas/entityLogsLlmUsage'
          description: >-
            What the language model call the entry is about cost, as the
            provider reported it. Shown to organization and system
            administrators only.
        notification:
          allOf:
            - $ref: '#/components/schemas/entityLogsNotification'
          description: >-
            Details of a message the platform sent out and how the provider it
            was handed to responded.
        organization:
          type: string
          description: >-
            Organization the event is attributed to, taken from the object it
            concerns or from the person who caused it. It is empty for an event
            that belongs to the tenant as a whole.
          nullable: true
        plan:
          allOf:
            - $ref: '#/components/schemas/entityLogsPlan'
          description: Details of the plan the event is about.
        requestId:
          type: string
          description: >-
            Identifier of the request that caused the event, which is what ties
            several entries written while handling one call together. It is
            absent for events raised outside a request.
          nullable: true
        rights:
          allOf:
            - $ref: '#/components/schemas/entityLogsRights'
          description: >-
            What a change to an ACL or to a group's membership added and took
            away.
        settings:
          allOf:
            - $ref: '#/components/schemas/entityLogsSettings'
          description: Which settings record the event is about.
        share:
          allOf:
            - $ref: '#/components/schemas/entityLogsShare'
          description: >-
            The share involved in a document event - who it was for, how the
            recipient had to prove themselves, and how long it lasts.
        stamp:
          allOf:
            - $ref: '#/components/schemas/entityLogsStamp'
          description: Details of the stamp the event is about.
        storedText:
          type: string
          description: >-
            A whole document kept verbatim because the event would not be
            evidence without it - the signature validation report, or the raw
            object the payment provider reported in a callback or returned for a
            billing action taken here.
          nullable: true
        stripe:
          allOf:
            - $ref: '#/components/schemas/entityLogsStripe'
          description: >-
            Details of the payment provider object the entry concerns - from a
            callback or from a billing action taken here. Entries carrying it
            are readable by a global administrator only.
        subject:
          type: string
          description: >-
            Identifier of the object the event is about, read according to
            `activityTarget` - a record identifier for most of them, but a name
            for a group, a user, a right, a form or a workflow definition. Some
            kinds of entry set none.
          nullable: true
        subscription:
          allOf:
            - $ref: '#/components/schemas/entityLogsSubscription'
          description: >-
            Details of the subscription the event is about, including which
            allowance was drawn on.
        template:
          allOf:
            - $ref: '#/components/schemas/entityLogsTemplate'
          description: >-
            The template involved - the one the event is about, the one a
            document was created from, or the one a share of a document was
            checked against or a document was released from.
        timestamp:
          type: string
          format: date-time
          description: >-
            When the entry was written. Entries are buffered briefly before
            being stored, so this is a moment shortly after the event itself.
        user:
          allOf:
            - $ref: '#/components/schemas/entityLogsUser'
          description: >-
            Details of the user account the event is about, and which parts of
            it changed.
        viaPublicApi:
          type: boolean
          description: >-
            Whether the request that produced this entry came through Circularo
            API v2. Absent for entries created outside a request context.
        webhook:
          allOf:
            - $ref: '#/components/schemas/entityLogsWebhook'
          description: >-
            Details of the webhook the event is about, and of the delivery
            attempt where there was one.
      required:
        - id
    responseUsersMinimum:
      type: object
      properties:
        fullname:
          type: string
          description: >-
            Full name of the user. It is what names the person to a reader - in
            notifications, in mentions, in the appearance of their signature and
            in exported files.
          example: John Doe
          nullable: true
        image:
          type: string
          description: >-
            Storage hash of the user's profile picture in the rendition asked
            for by the caller.
          example: as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth
          nullable: true
        mail:
          type: string
          description: >-
            E-mail address of the user, where the platform delivers
            notifications and other messages addressed to them. It is held
            separately from the username in `name`, although the two commonly
            carry the same address.
          example: john.doe@example.com
          nullable: true
        recordType:
          type: string
          description: >-
            Whether the record is a user account of the tenant or a contact
            identified only by an e-mail address.
          enum:
            - internal
            - external
        role:
          type: string
          description: >-
            Job title or position of the user in their company, kept as
            free-form text. It is descriptive only and grants no permissions.
          example: Head of Legal
          nullable: true
    internalSearchQueryObject:
      type: object
      properties:
        filter:
          type: array
          items:
            type: object
            additionalProperties: false
          description: >-
            Restrictions and nested query objects that all have to match.
            Matches here do not affect the relevance score, which makes this the
            cheaper choice for plain conditions. At least one of `filter`,
            `must`, `should` and `mustNot` must be provided.
        ignore_unmapped:
          type: boolean
          description: >-
            Whether a nested `path` that the index does not map should match
            nothing instead of failing the whole search.
          example: false
          default: false
        minimumShouldMatch:
          type: integer
          minimum: 0
          description: How many entries of `should` a record has to match.
          example: 1
          default: 1
        must:
          type: array
          items:
            type: object
            additionalProperties: false
          description: >-
            Restrictions and nested query objects that all have to match and
            contribute to the relevance score, so a better match is ordered
            higher. At least one of `filter`, `must`, `should` and `mustNot`
            must be provided.
        mustNot:
          type: array
          items:
            type: object
            additionalProperties: false
          description: >-
            Restrictions and nested query objects that must not match. At least
            one of `filter`, `must`, `should` and `mustNot` must be provided.
        path:
          type: string
          description: >-
            Nested field path this query object and everything inside it applies
            to. It belongs on a nested query object only - setting it on the
            root query is rejected.
          example: workflow.history
          nullable: true
        should:
          type: array
          items:
            type: object
            additionalProperties: false
          description: >-
            Restrictions and nested query objects of which `minimumShouldMatch`
            have to match, and which contribute to the relevance score. At least
            one of `filter`, `must`, `should` and `mustNot` must be provided.
    internalSearchQuerySort:
      type: object
      properties:
        field:
          type: string
          description: >-
            Field the results are ordered by. Use the full dotted path for a
            field inside a nested object.
          example: createDate
        nested:
          type: object
          additionalProperties: false
          description: >-
            Raw Elasticsearch `nested` sort options, passed through unchanged.
            Needed when ordering by a field inside a nested object has to be
            narrowed to matching inner records.
        order:
          type: string
          description: Direction the records are ordered in.
          enum:
            - asc
            - desc
        unmapped_type:
          type: string
          description: >-
            Type to sort the field as when the index does not map it. Without
            it, an unmapped field fails the search instead of sorting as empty.
          enum:
            - boolean
            - byte
            - short
            - integer
            - long
            - double
            - float
            - keyword
            - text
            - date
      required:
        - field
        - order
    entityLogsAuthentication:
      type: object
      properties:
        email:
          type: string
          nullable: true
        factors:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Second factors involved - those the account requires when signing
            in, or the ones this event verified.
          nullable: true
        id:
          type: string
          description: >-
            Identifier the external identity provider gave the exchange, so its
            two entries can be paired up.
          nullable: true
        isSign:
          type: boolean
          description: >-
            The external provider was asked to confirm a signature rather than
            to sign someone in.
        phone:
          type: string
          nullable: true
        provider:
          type: string
          description: External identity provider the exchange went through.
          nullable: true
        success:
          type: boolean
          description: Whether the attempt was accepted.
        type:
          type: string
          description: >-
            Route the sign-in came in by - the platform's own credentials, or
            one of the external identity mechanisms.
          example: internal
          nullable: true
        unlocked:
          type: boolean
          description: >-
            Whether the session became usable, meaning no second factor was left
            outstanding.
        username:
          type: string
          description: >-
            Account the attempt was made against. It is the only record of the
            name tried when a sign-in fails, because no actor is established
            then.
          example: john.doe@example.com
          nullable: true
    entityLogsCertificate:
      type: object
      properties:
        fingerprintSha256:
          type: string
          description: >-
            SHA-256 digest of the certificate's DER encoding, as uppercase hex
            without separators. It is what pins down the exact certificate,
            where `serialNumber` tells certificates apart only within one
            issuer.
          example: A13767DDACA2D1B0ACAEB7CD3145D3D1CE14E208106318968FAF9882C8423F43
          nullable: true
        id:
          type: string
          description: Identifier the platform keeps the certificate under.
          nullable: true
        issuer:
          type: string
          description: Distinguished name of the authority that issued the certificate.
          nullable: true
        keyUsage:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            What the certificate's key may be used for, named as the key usage
            bits of RFC 5280 — `digitalSignature`, `nonRepudiation`,
            `keyEncipherment`, `dataEncipherment`, `keyAgreement`,
            `keyCertSign`, `cRLSign`, `encipherOnly` and `decipherOnly` — listed
            in the order the certificate carries them. A certificate without the
            extension leaves it empty.
          example:
            - digitalSignature
            - nonRepudiation
          nullable: true
        qcCompliance:
          type: boolean
          description: >-
            Whether the certificate carries the eIDAS QcCompliance statement, by
            which its issuer declares it a qualified certificate. It is the
            issuer's own claim, so it carries weight only for a certificate that
            also chains to a trusted list.
          nullable: true
        qcSSCD:
          type: boolean
          description: >-
            Whether the certificate carries the QcSSCD statement, by which its
            issuer declares the private key to live on a qualified signature or
            seal creation device. As with `qcCompliance` it is the issuer's
            claim.
          nullable: true
        qcTypes:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            What the certificate is qualified for, taken from its QcType
            statement — `esign` for a signature made by a person, `eseal` for a
            seal of a legal entity, `web` for website authentication. A type the
            platform does not know is recorded as its bare OID, and a
            certificate without the statement leaves it empty.
          example:
            - esign
          nullable: true
        serialNumber:
          type: string
          description: >-
            Serial number of the certificate, as uppercase hex without
            separators or padding. Its issuer assigns it, so it tells
            certificates apart only among those of that one issuer.
          example: 4DC32DD214A19795A2111484900663142F513989
          nullable: true
        subject:
          type: string
          description: Distinguished name the certificate was issued to.
          nullable: true
        validityFrom:
          type: string
          format: date-time
          description: Start of the certificate's validity.
          nullable: true
        validityTo:
          type: string
          format: date-time
          description: End of the certificate's validity.
          nullable: true
    entityLogsClonedFrom:
      type: object
      properties:
        creator:
          type: string
          description: Username of the person who created the document that was copied.
          nullable: true
        id:
          type: string
          description: Identifier of the document that was copied.
          nullable: true
        organization:
          type: string
          description: Organization the copied document belonged to.
          nullable: true
        owner:
          type: string
          description: Username that owned the copied document.
          nullable: true
    entityLogsConnection:
      type: object
      properties:
        browser:
          type: string
          description: Browser the request came from, as recognized from its user agent.
          example: Chrome
          nullable: true
        browserVersion:
          type: string
          description: Version of that browser.
          example: 130.0.0.0
          nullable: true
        ip:
          type: string
          description: >-
            Network address the request came from. Only an administrator is
            shown it.
          example: 203.0.113.42
          nullable: true
        isDesktop:
          type: boolean
          description: The request came from a desktop computer.
        isMobile:
          type: boolean
          description: The request came from a phone.
        isTablet:
          type: boolean
          description: The request came from a tablet.
        location:
          allOf:
            - $ref: '#/components/schemas/entityGenericLocation'
          description: >-
            Where the network address was placed geographically. Only an
            administrator is shown it, and it stays empty when the address could
            not be located.
        os:
          type: string
          description: Operating system the request came from.
          example: Windows 10.0
          nullable: true
        platform:
          type: string
          description: Platform family of that operating system.
          example: Microsoft Windows
          nullable: true
        servedType:
          type: string
          description: Which flavour of the interface the client was served.
          example: desktop
          nullable: true
        userAgent:
          type: string
          description: >-
            User agent string exactly as the client sent it. The other
            properties here are what could be read out of it.
          nullable: true
    entityLogsDocument:
      type: object
      properties:
        alertTo:
          type: string
          description: Username the document's alert was raised with.
          nullable: true
        attachments:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentAttachments'
          description: Files attached to or taken off the document by this event.
        creator:
          type: string
          description: >-
            Username of the person who originally created the document, which
            need not be whoever caused this event.
          nullable: true
        documentTitle:
          type: string
          description: Title the document carries after the event.
          nullable: true
        documentType:
          type: string
          description: Metadata definition the document belongs to.
          example: d_default
          nullable: true
        fileChanged:
          type: boolean
          description: The edit replaced the document's file rather than only its metadata.
          nullable: true
        folder:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentFolder'
          description: Folder the document was moved into.
        linkRemovable:
          type: boolean
          description: The link that was created may be taken away again.
          nullable: true
        linkTarget:
          type: string
          description: >-
            Identifier of the document at the other end of the link that was
            created or removed.
          nullable: true
        mainFileChecksum:
          type: string
          description: >-
            Digest of the document's main file as it stood after the event. It
            is what proves which exact file the entry is about, and what a file
            submitted for verification is matched against.
          nullable: true
        merge:
          type: array
          items:
            $ref: '#/components/schemas/entityLogsDocumentMerge'
          description: >-
            The files that were merged into the document and the page range each
            of them contributed.
          nullable: true
        organization:
          type: string
          description: Organization the document belongs to.
          nullable: true
        originalOwner:
          type: string
          description: >-
            Username that owned the document before the event handed it to
            somebody else.
          nullable: true
        originalTitle:
          type: string
          description: Title the document carried before the event.
          nullable: true
        owner:
          type: string
          description: Username owning the document at the time of the event.
          nullable: true
        reassign:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentReassign'
          description: Who the document was handed over from and to.
        reminder:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentReminder'
          description: >-
            Expiration reminder that fired, or whose recipients were replaced by
            the document's owner.
        renewal:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentRenewal'
          description: >-
            Automatic renewal of the contract and how it moved the expiration
            date.
        revertToRevision:
          type: integer
          description: Revision the document was taken back to.
          nullable: true
        revision:
          type: integer
          description: Revision number the document reached with this event.
          nullable: true
        rights:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentRights'
          description: Which people and groups gained or lost access to the document.
        sealProvider:
          type: string
          description: >-
            Name of the seal provider that sealed the document, as it was named
            at the time. Set for a seal only; `signatureProvider` holds the
            provider's type.
          example: company-qseal
          nullable: true
        shareStateName:
          type: string
          description: >-
            State the document's signing process stood in at the time of the
            event.
          example: completed
          nullable: true
        signatureChecksums:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Digest of each signature the document carried after the event, which
            is what lets a later verification tell the signatures apart.
          nullable: true
        signatureProvider:
          type: string
          description: >-
            Which signing service produced the signature or seal. It is absent
            where the event only added a timestamp.
          nullable: true
        signatureProviderMetadata:
          type: string
          description: >-
            Whatever that signing service reported back about the operation,
            kept verbatim as text.
          nullable: true
        submittedFiles:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentAttachments'
          description: >-
            Files that recipients uploaded into the document, added or taken off
            by this event.
        tags:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentTags'
          description: Tags put on or taken off the document.
        term:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentTerm'
          description: >-
            What the event changed in the document's expiration date and term -
            only the parts that did change.
        titleChanged:
          type: boolean
          description: The event changed the document's title.
          nullable: true
        tsaServer:
          type: string
          description: >-
            Name of the configured TSA server that produced the timestamp of
            this seal or standalone document timestamp.
          nullable: true
        twoStepSigningType:
          type: string
          description: >-
            Which form of two-step signing produced the signature, where one was
            used.
          nullable: true
        workflow:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentWorkflow'
          description: >-
            What the event did to the document's workflow - the action taken,
            who it went to next, and the comment left with it.
    entityLogsGeneric:
      type: object
      properties:
        addedKeys:
          type: array
          items:
            type: string
            nullable: true
          description: Names of the properties the edit introduced.
          nullable: true
        changes:
          type: array
          items:
            $ref: '#/components/schemas/entityLogsChange'
          description: >-
            The before and after of each property that changed, recorded where
            the values themselves are worth keeping. A reader is shown only the
            properties they would be allowed to see and set themselves.
          nullable: true
        deletedKeys:
          type: array
          items:
            type: string
            nullable: true
          description: Names of the properties the edit removed.
          nullable: true
        editedKeys:
          type: array
          items:
            type: string
            nullable: true
          description: Names of the properties the edit gave a different value.
          nullable: true
        error:
          type: string
          description: >-
            Classification of the failure that ended the operation, from the
            same catalogue as the `type` of an error response - or, on a
            `subscription_limits_lock` entry, why the lock write was rejected or
            the change refused.
          example: INTEGRATION:RESPONSE_UPSTREAM_ERROR
          nullable: true
        status:
          type: string
          description: >-
            Outcome reported by the text-extraction step, in its own words - or,
            on a `subscription_limits_lock` entry, what happened: `set`,
            `replaced`, `rejected` or `refused`.
          nullable: true
        success:
          type: boolean
          description: >-
            Whether the operation this entry is about finished successfully - a
            step carried out in the background, or a call to a language model.
          nullable: true
    entityLogsGroup:
      type: object
      properties:
        type:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            What the group is - an organization, a role within one, or an
            ordinary group. A group can be more than one of these.
          nullable: true
    entityLogsLanguage:
      type: object
      properties:
        active:
          type: boolean
          description: Whether the language is offered to users after the change.
          nullable: true
        addedLanguages:
          type: array
          items:
            type: string
            nullable: true
          description: Languages an import brought in.
          nullable: true
        addedTranslations:
          type: array
          items:
            type: string
            nullable: true
          description: Translation keys that were created.
          nullable: true
        deletedTranslations:
          type: array
          items:
            type: string
            nullable: true
          description: Translation keys that were removed.
          nullable: true
        editedLanguages:
          type: array
          items:
            type: string
            nullable: true
          description: Languages an import changed.
          nullable: true
        editedTranslations:
          type: array
          items:
            type: string
            nullable: true
          description: Translation keys whose text was changed.
          nullable: true
        key:
          type: string
          description: The single translation key the event is about.
          example: common:name
          nullable: true
        languageId:
          type: string
          description: The language the event is about.
          example: en
          nullable: true
        newKey:
          type: string
          description: Name a translation key was moved to, where the event renamed one.
          nullable: true
        overwriteFromFile:
          type: boolean
          description: >-
            The import was told to let the file win over text that was already
            there.
          nullable: true
        removeMissing:
          type: boolean
          description: The import was told to delete keys the file did not contain.
          nullable: true
        typographies:
          type: array
          items:
            type: string
            nullable: true
          nullable: true
    entityLogsLlmUsage:
      type: object
      properties:
        api:
          type: string
          description: >-
            Interface of the AI service the call was sent through.


            - `responses`: The Responses API, used unless the settings or the
            platform configuration ask for the Chat Completions API.

            - `chat_completions`: The Chat Completions API, used when the
            settings or the platform configuration ask for it - typically for a
            provider implementing only that interface.
          enum:
            - responses
            - chat_completions
            - null
          nullable: true
        attempts:
          type: integer
          description: >-
            Number of requests sent to the AI service for the call, retries
            included. Each of them may have been billed.
          nullable: true
        cachedInputTokens:
          type: integer
          description: >-
            Part of `inputTokens` the AI service took from its prompt cache,
            which is usually billed at a lower rate, summed over every answer
            that reported it.
          nullable: true
        cacheWriteTokens:
          type: integer
          description: >-
            Input tokens the AI service wrote into its prompt cache, summed over
            every answer that reported them. Some providers bill writing to the
            cache separately.
          nullable: true
        durationMs:
          type: integer
          description: >-
            Time the call took in milliseconds, from sending the first request
            to the final answer or failure, the waits between retries included.
          nullable: true
        failureReason:
          type: string
          description: >-
            Why the call failed. Absent when it succeeded.


            - `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.
          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
            - null
          nullable: true
        httpStatus:
          type: integer
          description: >-
            HTTP status of the last answer the AI service gave. Absent when no
            answer came back, such as when the service could not be reached or
            did not answer in time.
          example: 429
          nullable: true
        inputCharacters:
          type: integer
          description: >-
            Length in characters of the document content sent to the model - its
            text together with the title, any page markers and the delimiters
            around it, but without the instructions - once any truncation was
            applied.
          nullable: true
        inputTokens:
          type: integer
          description: >-
            Input tokens the provider billed, the cached ones included, over
            every answer the call received.
          nullable: true
        inputTruncated:
          type: boolean
          description: >-
            Whether the document text was cut to the input limit before it was
            sent.
          nullable: true
        keySource:
          type: string
          description: >-
            Whose API key the call used, which decides who is billed for it.


            - `settings`: An API key configured in the settings, so the provider
            bills whoever owns that key.

            - `platform`: The platform's own API key, used when the settings
            configure none, so the platform operator pays.
          enum:
            - settings
            - platform
            - null
          nullable: true
        maxOutputTokens:
          type: integer
          description: >-
            Output limit in tokens the request asked the AI service to keep to.
            Absent when the call set none.
          nullable: true
        modelRequested:
          type: string
          description: Model the call asked for, as configured.
          example: gpt-4.1-mini
          nullable: true
        modelServed:
          type: string
          description: >-
            Model the AI service reports to have answered with, typically a
            dated version of the requested one. Prices are listed per served
            model.
          example: gpt-4.1-mini-2025-04-14
          nullable: true
        outputTokens:
          type: integer
          description: >-
            Output tokens the provider billed, the reasoning ones included, over
            every answer the call received.
          nullable: true
        providerErrorCode:
          type: string
          description: >-
            Error code the AI service returned with the failure that ended the
            call. Only a plain code is kept, never the message that came with
            it.
          example: insufficient_quota
          nullable: true
        providerHost:
          type: string
          description: >-
            Host name of the AI service the call was sent to, without scheme,
            port or path. The provider it names decides the price list. Left out
            when the call went to the service address the platform itself
            configures.
          example: api.openai.com
          nullable: true
        purpose:
          type: string
          description: >-
            What the call was made for.


            - `document_analysis`: Analysis of a document on request - its
            summary, category, sensitivity, personal data and tags.

            - `term_detection`: Detection of the contract term of a document -
            its expiration, renewal and notice periods - offered as suggestions.

            - `automatic_summary`: Summary of a document generated automatically
            once its text had been extracted.
          enum:
            - document_analysis
            - term_detection
            - automatic_summary
            - null
          nullable: true
        reasoningEffort:
          type: string
          description: >-
            Reasoning effort the call asked the model for. Absent when it asked
            for none.
          example: medium
          nullable: true
        reasoningOutputTokens:
          type: integer
          description: >-
            Part of `outputTokens` the model spent on reasoning, summed over
            every answer that reported it.
          nullable: true
        requestId:
          type: string
          description: >-
            Identifier the AI service gave the last request that reported one,
            by which the provider can trace the call. It is unrelated to the
            `requestId` of the entry itself.
          example: req_8f3c1a5e2b7d4c9f
          nullable: true
        responseId:
          type: string
          description: >-
            Identifier of the last answer the AI service returned, for
            reconciling the entry with the provider's own usage records.
          example: resp_67ccd2bed1ec8190b14f964abc054267
          nullable: true
        serviceTier:
          type: string
          description: >-
            Processing tier the AI service reports to have served the call in,
            which affects the price.
          example: default
          nullable: true
        timedOutAttempts:
          type: integer
          description: >-
            Requests that were sent but got no answer because they timed out or
            were abandoned. The AI service may still have billed them, and what
            they used is missing from the token counts.
          nullable: true
        totalTokens:
          type: integer
          description: >-
            Total tokens the AI service reported, summed over every answer the
            call received.
          nullable: true
        usageComplete:
          type: boolean
          description: >-
            Whether the token counts cover everything the provider may have
            billed. False when an attempt could have been billed without
            reporting what it used, such as one that timed out after the request
            had been sent.
          nullable: true
    entityLogsNotification:
      type: object
      properties:
        messageId:
          type: string
          description: >-
            Identifier the delivering provider gave the message, for tracing it
            on their side. Only an administrator is shown it, and it is absent
            where the message was not accepted.
          nullable: true
        recipients:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Addresses, numbers or devices the message went to. Only an
            administrator is shown them.
          nullable: true
        response:
          type: string
          description: >-
            What the delivering provider answered - its acknowledgement, or the
            reason it refused. Only an administrator is shown it.
          nullable: true
        success:
          type: boolean
          description: >-
            Whether the provider accepted the message for delivery. It says
            nothing about whether it was read.
          nullable: true
        template:
          type: string
          description: Which notification the message was built from.
          nullable: true
        type:
          type: string
          description: Channel the message was sent over.
          example: email
          nullable: true
    entityLogsPlan:
      type: object
      properties:
        edition:
          type: string
          description: >-
            Commercial tier the plan belongs to. This too is catalogue
            information — it is not what decides an organization's permissions
            or its entitlement, which follow the tier held on the organization
            itself. On an edit it is recorded only when it changed.
          nullable: true
        status:
          type: string
          description: >-
            Whether the plan is on offer, still being prepared or withdrawn.
            Putting a plan on a subscription is refused unless it is on offer.
            On an edit it is recorded only when it changed.
          nullable: true
    entityLogsRights:
      type: object
      properties:
        addedGroups:
          type: array
          items:
            type: string
            nullable: true
          description: Groups that were given the ACL, or that a template was shared with.
          nullable: true
        addedRights:
          type: array
          items:
            type: string
            nullable: true
          description: Rights the ACL started granting.
          nullable: true
        addedUsers:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Users that were put into the group, or that a template was shared
            with.
          nullable: true
        removedGroups:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Groups that had the ACL taken away, or that a template stopped being
            shared with.
          nullable: true
        removedRights:
          type: array
          items:
            type: string
            nullable: true
          description: Rights the ACL stopped granting.
          nullable: true
        removedUsers:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Users that were taken out of the group, or that a template stopped
            being shared with.
          nullable: true
    entityLogsSettings:
      type: object
      properties:
        name:
          type: string
          description: >-
            Who the settings belong to - a username, an organization or a group
            name, according to `type`.
          nullable: true
        type:
          type: string
          description: >-
            Which level of the settings hierarchy the record sits at. It also
            decides which of the changed properties a given reader is shown.
          example: user
          nullable: true
    entityLogsShare:
      type: object
      properties:
        delegatedFrom:
          type: string
          description: >-
            The share this one was handed on from, where a recipient passed
            their part to somebody else.
          nullable: true
        delegatedTo:
          type: string
          description: >-
            Where the share was handed on to - the person who took it over, or
            the share that was created for them.
          nullable: true
        initiatedViaPublicApi:
          type: boolean
          description: >-
            Whether the share's chain was originally created through Circularo
            API v2 — a delegated share inherits the value of the share it
            descends from. Unlike the record's root 'viaPublicApi', which
            describes the request that produced the record.
          nullable: true
        isNafathProtected:
          type: boolean
          description: >-
            The recipient had to verify through Nafath to open the share. The
            national ID itself is never recorded.
          nullable: true
        isPasswordProtected:
          type: boolean
          description: >-
            The recipient had to enter a password to open the share. The
            password itself is never recorded.
          nullable: true
        isPermanentViewToken:
          type: boolean
          description: >-
            The share gives lasting read access rather than being spent once its
            purpose is served.
          nullable: true
        kyc:
          allOf:
            - $ref: '#/components/schemas/entityLogsShareKyc'
          description: >-
            Identity verification the recipient went through for the share. On
            the verification event itself this is the outcome of that attempt;
            on any later event by the same recipient it restates the
            verification already standing on their share.
        oauth:
          allOf:
            - $ref: '#/components/schemas/entityLogsShareOauth'
          description: >-
            Information about the OAuth verification protecting the share, if
            applicable.
        otpMail:
          type: string
          description: >-
            Address a one-time code was sent to before the share could be
            opened.
          nullable: true
        otpPhone:
          type: string
          description: Number a one-time code was sent to before the share could be opened.
          nullable: true
        sharedBy:
          type: string
          description: Username of the person who handed the document out.
          nullable: true
        sharedUsername:
          type: string
          description: Account the share is bound to, where the recipient has one here.
          nullable: true
        sharedWith:
          type: string
          description: >-
            Who the document was handed to. Only the first recipient is
            recorded.
          nullable: true
        shareId:
          type: string
          description: Identifier of the share.
          nullable: true
        shareType:
          type: string
          description: What the recipient was asked to do with the document.
          nullable: true
        validUntil:
          type: string
          format: date-time
          description: When the share stops being usable.
          nullable: true
        verifiedWith:
          allOf:
            - $ref: >-
                #/components/schemas/entityDocumentsWorkflowHistoryShareVerifiedWith
          description: >-
            How the recipient proved who they were before the document opened.
            It is recorded when the whole state of the share is captured, not
            when only a change to it is.
    entityLogsStamp:
      type: object
      properties:
        isTemp:
          type: boolean
          description: >-
            The stamp was a throw-away one, made for a single use rather than
            kept.
        name:
          type: string
          description: Name of the stamp.
          nullable: true
        organization:
          type: string
          description: Organization the stamp belongs to.
          nullable: true
        owner:
          type: string
          description: Username the stamp belongs to.
          nullable: true
    entityLogsStripe:
      type: object
      properties:
        amountDue:
          type: integer
          description: Amount the invoice asks for, in the smallest unit of its currency.
          nullable: true
        amountPaid:
          type: integer
          description: >-
            Amount of the invoice already settled, in the smallest unit of its
            currency.
          nullable: true
        amountTotal:
          type: integer
          description: >-
            Total the invoice or the checkout comes to, in the smallest unit of
            its currency.
          nullable: true
        cancelAtPeriodEnd:
          type: boolean
          description: >-
            The subscription is set to stop when the current period runs out
            rather than renew.
        checkoutSessionId:
          type: string
          description: Identifier of the checkout the entry concerns.
          nullable: true
        clientReferenceId:
          type: string
          description: >-
            Reference the platform attached when starting the checkout, which is
            what ties it back to an account here.
          nullable: true
        currency:
          type: string
          description: >-
            Currency of the amounts on the invoice, the checkout or the
            subscription.
          example: eur
          nullable: true
        customerId:
          type: string
          description: Identifier of the paying customer at the payment provider.
          nullable: true
        eventCreated:
          type: string
          format: date-time
          description: When the payment provider raised the event.
          nullable: true
        eventId:
          type: string
          description: Identifier the payment provider gave the event.
          nullable: true
        eventLivemode:
          type: boolean
          description: >-
            The event came from the provider's live environment rather than its
            test one.
        eventType:
          type: string
          description: What the payment provider says happened.
          example: invoice.paid
          nullable: true
        invoiceId:
          type: string
          description: Identifier of the invoice the event concerns.
          nullable: true
        objectId:
          type: string
          description: >-
            Identifier of the provider object the entry concerns - the one the
            event carried, or the one the provider returned for an action taken
            here.
          nullable: true
        objectType:
          type: string
          description: >-
            What kind of provider object the entry concerns - which decides
            which of the other properties here are filled in.
          example: invoice
          nullable: true
        paymentStatus:
          type: string
          description: Whether the checkout was paid for.
          nullable: true
        periodEnd:
          type: string
          format: date-time
          description: End of the billing period the entry concerns.
          nullable: true
        periodStart:
          type: string
          format: date-time
          description: Start of the billing period the entry concerns.
          nullable: true
        processingNote:
          type: string
          description: Why the event was ignored or what made applying it fail.
          nullable: true
        processingResult:
          type: string
          description: >-
            How the platform handled an event it received. An event recorded
            without it was applied.


            - `applied`: The event was applied to the organization's
            subscription. The same event is not applied again.

            - `failed`: Applying the event failed, see `processingNote` - for a
            reason that would not go away, or still after it was tried again for
            a while. The event is applied when the payment provider delivers it
            again.

            - `ignored`: The event was deliberately left unapplied, see
            `processingNote` - for example because it belongs to a provider
            subscription other than the linked one or to none, that subscription
            is not paid yet or has ended, the payment problem it reports is over
            because the invoice was settled since or the subscription is paid
            up, or another billing system looks after the organization. It is
            evaluated again when the payment provider delivers it again.
          enum:
            - applied
            - failed
            - ignored
            - null
          nullable: true
        receivedAt:
          type: string
          format: date-time
          description: >-
            When the platform received the event, as opposed to when the
            provider raised it.
          nullable: true
        status:
          type: string
          description: >-
            State the checkout, invoice or subscription stands in, in the
            payment provider's own words.
          nullable: true
        subscriptionId:
          type: string
          description: Identifier of the subscription at the payment provider.
          nullable: true
    entityLogsSubscription:
      type: object
      properties:
        amount:
          type: integer
          description: How much of the allowance the event drew.
          nullable: true
        assignedToId:
          type: string
          description: >-
            Who holds the subscription - a username or an organization,
            according to `assignedToType`.
          nullable: true
        assignedToType:
          type: string
          description: >-
            Whether the subscription is held by one person or by a whole
            organization.
          example: user
          nullable: true
        subVariable:
          type: string
          description: Finer breakdown within the allowance, where the counter keeps one.
          nullable: true
        variable:
          type: string
          description: Which allowance was drawn on.
          nullable: true
    entityLogsTemplate:
      type: object
      properties:
        attachments:
          allOf:
            - $ref: '#/components/schemas/entityLogsTemplateAttachments'
          description: Attachments an edit of the template added and removed.
        bound:
          type: boolean
          description: >-
            On an entry about a document: the document is bound to the template,
            so every share of it is checked against the template's signing
            fields, recipients and signing order.
        checked:
          type: boolean
          description: >-
            On the entry of a share: the share was checked against the template.
            A share that places no fields, fills none and asks nobody to act is
            not.
        exportFormat:
          type: string
          description: Format of the file the template was exported into.
          example: json
          nullable: true
        fileChanged:
          type: boolean
          description: An edit of the template replaced its main file.
        id:
          type: string
          description: Identifier of the template.
          example: a831e07b-fbd9-416e-9711-41b0477ecac3
          nullable: true
        imported:
          type: boolean
          description: The template was created by an import from a file.
        isLocked:
          type: boolean
          description: Whether the template was locked once the event was over.
        mergedFiles:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Identifiers of the files the event merged into the main file of the
            template, in the order of their pages.
          nullable: true
        name:
          type: string
          description: Name of the template once the event was over.
          example: Employment agreement
          nullable: true
        originalName:
          type: string
          description: Name of the template before an edit renamed it.
          example: Employment contract
          nullable: true
        originalOwner:
          type: string
          description: >-
            Username that owned the template before the deletion of that user
            handed the template over to another user.
          example: john.doe@example.com
          nullable: true
        originalShareEdit:
          type: boolean
          description: >-
            Whether the users and groups the template is shared with could edit
            it before the sharing changed.
        owner:
          type: string
          description: Username that owns the template once the event was over.
          example: john.doe@example.com
          nullable: true
        shareEdit:
          type: boolean
          description: >-
            Whether the users and groups the template is shared with can edit it
            once the sharing changed.
    entityLogsUser:
      type: object
      properties:
        authenticationFactors:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Second factors the account requires after the change. It is recorded
            only when the set of them changed.
          nullable: true
        delegation:
          allOf:
            - $ref: '#/components/schemas/entityLogsUserDelegation'
          description: >-
            Who the account's authority was delegated to and for how long, after
            the change.
        delegationChanged:
          type: boolean
          description: The delegation arrangement was changed.
          example: false
          default: false
        initialChanged:
          type: boolean
          description: >-
            The stored initials image was changed. The image itself is not
            recorded.
          example: false
          default: false
        mail:
          type: string
          description: >-
            E-mail address the account carries after the change. It is recorded
            only when it changed.
          nullable: true
        passwordChanged:
          type: boolean
          description: >-
            The password was changed. Neither the old nor the new one is
            recorded.
          example: false
          default: false
        phone:
          type: string
          description: >-
            Phone number the account carries after the change. It is recorded
            only when it changed.
          nullable: true
        reassignTo:
          type: string
          description: Username that took over what belonged to an account being deleted.
          nullable: true
        recoveryCodesChanged:
          type: boolean
          description: >-
            The recovery codes were regenerated. The codes themselves are not
            recorded.
          example: false
          default: false
        signatureChanged:
          type: boolean
          description: >-
            The stored signature image was changed. The image itself is not
            recorded.
          example: false
          default: false
        stampChanged:
          type: boolean
          example: false
          default: false
        status:
          type: string
          description: >-
            State the account is in after the event. On an edit it is recorded
            only when it changed.
          example: active
          nullable: true
    entityLogsWebhook:
      type: object
      properties:
        actor:
          type: string
          description: Username the delivery was made on behalf of.
          nullable: true
        authMethod:
          type: string
          description: >-
            How the webhook's deliveries prove themselves to the endpoint they
            call. It is derived from the webhook's own configuration and
            recorded on every entry, so the scheme in force is provable without
            reading the webhook back; the credential behind it is never
            recorded.


            - `none`: Deliveries are sent without any authentication.

            - `basic`: Deliveries carry an HTTP Basic "Authorization" header.

            - `hmac`: Deliveries carry an HMAC-SHA256 signature of the payload.
          enum:
            - none
            - basic
            - hmac
        callbackUrl:
          type: string
          description: >-
            Address the webhook calls. Any credentials embedded in it are
            stripped before it is recorded.
          example: https://example.com/hooks/circularo
          nullable: true
        documentId:
          type: string
          description: Document whose change set the delivery off.
          nullable: true
        event:
          type: string
          description: Which event was delivered.
          nullable: true
        id:
          type: string
          description: Identifier of the webhook.
          nullable: true
        name:
          type: string
          description: Name the webhook was given.
          nullable: true
        success:
          type: boolean
          description: Whether the receiving endpoint accepted the delivery.
        type:
          type: string
          description: Kind of webhook this is.
          nullable: true
    entityGenericLocation:
      type: object
      properties:
        city:
          type: string
          description: English name of the city.
          example: Pilsen
          nullable: true
        country:
          type: string
          description: English name of the country.
          example: Czech Republic
          nullable: true
        countryCode:
          type: string
          description: Two-letter ISO code of that country.
          example: CZ
          nullable: true
        region:
          type: string
          description: English name of the region or state within the country.
          example: Vysočina
          nullable: true
    entityLogsDocumentAttachments:
      type: object
      properties:
        added:
          type: array
          items:
            $ref: '#/components/schemas/entityLogsDocumentAttachmentsObject'
          description: Files the document gained.
          nullable: true
        removed:
          type: array
          items:
            $ref: '#/components/schemas/entityLogsDocumentAttachmentsObject'
          description: Files the document lost.
          nullable: true
    entityLogsDocumentFolder:
      type: object
      properties:
        parentFolderId:
          type: string
          description: Identifier of the folder the document was placed under.
          nullable: true
        username:
          type: string
          description: >-
            Owner of the folder tree the document was filed into, which is what
            separates a person's own folders from the shared ones.
          nullable: true
    entityLogsDocumentMerge:
      type: object
      properties:
        end:
          type: integer
          description: Last page this source file contributed to the merged document.
          nullable: true
        hash:
          type: string
          description: Digest of the source file that was merged in.
          nullable: true
        start:
          type: integer
          description: First page this source file contributed to the merged document.
          nullable: true
    entityLogsDocumentReassign:
      type: object
      properties:
        changedCreateName:
          type: string
          nullable: true
        from:
          type: string
          description: Username the document was taken away from.
          nullable: true
        removedFromFolder:
          type: string
          description: Folder the document was pulled out of as part of the hand-over.
          nullable: true
        to:
          type: string
          description: Username the document was handed to.
          nullable: true
    entityLogsDocumentReminder:
      type: object
      properties:
        period:
          type: string
          description: >-
            How long before the expiration day the reminder was set to fire, as
            a count followed by a unit - `y`, `Q`, `M`, `w` or `d`; absent for a
            reminder on the expiration day itself.
          example: 30d
          nullable: true
        recipients:
          type: array
          items:
            type: string
          description: >-
            Users the reminder was dispatched to. Recipients who could not be
            notified are left out, and the list is absent when nobody could be;
            the delivery itself is not confirmed.
          example:
            - jane.doe@example.com
          nullable: true
        reminderOn:
          type: string
          format: date-time
          description: Moment the reminder was due to fire.
          example: '2026-11-30T08:00:00.000Z'
          nullable: true
        retargetedFrom:
          type: array
          items:
            type: string
          description: >-
            Recipients the reminder no longer goes to because they had been
            deactivated or deleted, or had left the owner's organization.
          example:
            - john.doe@example.com
          nullable: true
        retargetedTo:
          type: string
          description: Owner of the document, whom the reminder goes to in their place.
          example: jane.doe@example.com
          nullable: true
        time:
          type: string
          description: Time of day the reminder was set to fire at, read in `timeZone`.
          example: '09:00'
          nullable: true
        timeZone:
          type: string
          description: Time zone the reminder's day and time were read in.
          example: Europe/Prague
          nullable: true
    entityLogsDocumentRenewal:
      type: object
      properties:
        from:
          type: string
          format: date-time
          description: Expiration date before the renewal.
          example: '2026-12-31T00:00:00.000Z'
          nullable: true
        renewedCount:
          type: integer
          description: >-
            Ordinal of the renewal - how many automatic renewals the contract
            had had in total once this one was done.
          nullable: true
        to:
          type: string
          format: date-time
          description: Expiration date the renewal extended the document to.
          example: '2027-12-31T00:00:00.000Z'
          nullable: true
    entityLogsDocumentRights:
      type: object
      properties:
        edit:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentRightsObject'
          description: Who gained or lost the right to change the document.
        madePrivate:
          type: boolean
          description: >-
            The document became private, so only the people named on it reach
            it.
          nullable: true
        madePublic:
          type: boolean
          description: >-
            The document stopped being private, so it is now reachable beyond
            the people named on it.
          nullable: true
        read:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentRightsObject'
          description: Who gained or lost the right to read the document.
    entityLogsDocumentTags:
      type: object
      properties:
        global:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentTagsObject'
          description: Change to the tags everyone sharing the document sees.
        user:
          allOf:
            - $ref: '#/components/schemas/entityLogsDocumentTagsObject'
          description: Change to the tags kept privately by the person who made it.
    entityLogsDocumentTerm:
      type: object
      properties:
        expiresOnFrom:
          type: string
          format: date-time
          description: >-
            Expiration date before the event, recorded only when the event
            changed it; absent when the document had none.
          example: '2026-12-31T00:00:00.000Z'
          nullable: true
        expiresOnTo:
          type: string
          format: date-time
          description: >-
            Expiration date after the event, recorded only when the event
            changed it; absent when the event removed it.
          example: '2027-12-31T00:00:00.000Z'
          nullable: true
        nonFixedTermChanged:
          type: boolean
          description: >-
            Whether the event changed the notice period of a non-fixed term, or
            added or removed the non-fixed term.
          nullable: true
        recipientsAdded:
          type: array
          items:
            type: string
          description: >-
            Users who became a recipient of at least one of the reminders with
            the event.
          example:
            - jane.doe@example.com
          nullable: true
        recipientsRemoved:
          type: array
          items:
            type: string
          description: >-
            Users who stopped being a recipient of any of the reminders with the
            event.
          example:
            - john.doe@example.com
          nullable: true
        remindersChanged:
          type: boolean
          description: >-
            Whether the event changed the reminders - whom they notify, how long
            ahead or at what time.
          nullable: true
        renewalChanged:
          type: boolean
          description: >-
            Whether the event changed how the contract is renewed - its type,
            period, limits or notice period.
          nullable: true
        terminationCancelled:
          type: boolean
          description: >-
            Whether the event cancelled a running termination of a non-fixed
            term.
          nullable: true
        terminationInitiated:
          type: boolean
          description: Whether the event started the termination of a non-fixed term.
          nullable: true
        termTypeFrom:
          type: string
          description: >-
            Kind of term before the event, recorded only when the event changed
            it; absent when the document had none.


            - `fixed_term`: The document expires on a set date and its contract
            is renewed, automatically or by hand.

            - `expiry_only`: The document expires on a set date and nothing
            renews it.

            - `non_fixed_term`: The contract runs until it is terminated. The
            document expires only once a termination has started, the notice
            period after it.
          enum:
            - fixed_term
            - expiry_only
            - non_fixed_term
            - null
          nullable: true
        termTypeTo:
          type: string
          description: >-
            Kind of term after the event, recorded only when the event changed
            it; absent when the document has none.


            - `fixed_term`: The document expires on a set date and its contract
            is renewed, automatically or by hand.

            - `expiry_only`: The document expires on a set date and nothing
            renews it.

            - `non_fixed_term`: The contract runs until it is terminated. The
            document expires only once a termination has started, the notice
            period after it.
          enum:
            - fixed_term
            - expiry_only
            - non_fixed_term
            - null
          nullable: true
    entityLogsDocumentWorkflow:
      type: object
      properties:
        action:
          type: integer
          description: >-
            Identifier of the workflow action that was taken. Only actions a
            person set off are recorded.
          nullable: true
        clearedComments:
          type: array
          items:
            $ref: '#/components/schemas/entityLogsDocumentWorkflowClearedComment'
          description: >-
            Every comment the deletion cleared, the root first, each with the
            text it held. Deleting a root comment also clears replies written by
            other people, so each is recorded individually.
          nullable: true
        comment:
          type: string
          description: Comment left with the action.
          nullable: true
        commentAnchor:
          allOf:
            - $ref: '#/components/schemas/entityDocumentsWorkflowHistoryAnchor'
          description: >-
            The place on a page the comment points at, as written or as moved
            to.
          nullable: true
        commentAttachment:
          type: string
          description: >-
            Identifier of the file the comment carries, as written or as
            replaced by an edit. Only the identifier is logged, never the file.
          nullable: true
        groupRecipient:
          type: array
          items:
            type: string
            nullable: true
          description: Groups the document was handed on to.
          nullable: true
        historyId:
          type: string
          description: >-
            Identifier of the comment this record is about, unique within the
            document.
          nullable: true
        isPublicComment:
          type: boolean
          description: >-
            The comment is part of the history external recipients of the
            document can see.
        mentions:
          type: array
          items:
            type: string
            nullable: true
          description: Usernames mentioned in the comment.
          nullable: true
        name:
          type: string
          description: Name the workflow definition gives the action that was taken.
          nullable: true
        previousComment:
          type: string
          description: The comment's text before an edit replaced it.
          nullable: true
        previousCommentAnchor:
          allOf:
            - $ref: '#/components/schemas/entityDocumentsWorkflowHistoryAnchor'
          description: The place on a page the comment pointed at before it was moved.
          nullable: true
        previousCommentAttachment:
          type: string
          description: >-
            Identifier of the file the comment carried before an edit replaced
            or removed it.
          nullable: true
        reaction:
          type: string
          description: Reaction type placed or removed.
          nullable: true
        shareStateName:
          type: string
          nullable: true
        threadParentId:
          type: string
          description: On a reply, the identifier of the root comment it answers.
          nullable: true
        userRecipient:
          type: array
          items:
            type: string
            nullable: true
          description: Users the document was handed on to.
          nullable: true
        workflow:
          type: string
          description: Workflow definition the document is running through.
          nullable: true
    entityLogsChange:
      type: object
      properties:
        action:
          type: string
          description: >-
            Whether the property was introduced, given a different value, or
            removed.
          enum:
            - added
            - edited
            - deleted
            - null
          nullable: true
        new:
          type: string
          description: >-
            Value the property holds afterwards, written out as text. It is
            absent where the property was removed.
          nullable: true
        original:
          type: string
          description: >-
            Value the property held beforehand, written out as text. It is
            absent where the property was newly introduced.
          nullable: true
        property:
          type: string
          description: Name of the property that changed.
          nullable: true
        redacted:
          type: boolean
          description: >-
            The recorded values had something sensitive taken out of them before
            they were stored, so they do not read back exactly as they were.
          nullable: true
    entityLogsShareKyc:
      type: object
      properties:
        checks:
          allOf:
            - $ref: '#/components/schemas/entityLogsShareKycChecks'
          description: >-
            Which of the details the sender expected were found to match. Only
            the details actually asked for appear, so one that is missing was
            never required rather than left unchecked.
          nullable: true
        documentType:
          type: string
          description: >-
            Kind of identity document the recipient was verified with, named as
            the platform names it rather than as the provider does, such as
            `passport` or `idCard`. It stays empty where the sender accepted any
            document.
          example: idCard
          nullable: true
        fieldsMatch:
          type: boolean
          description: >-
            Whether the provider found the document's machine-readable zone and
            its printed values consistent. It is weighed only where the sender
            asked for a particular kind of document or for details to match.
          nullable: true
        provider:
          type: string
          description: Identity provider the recipient verified through.
          example: identomat
          nullable: true
        providers:
          type: array
          items:
            type: string
          description: KYC providers the recipient is allowed to verify with.
          nullable: true
        sessionId:
          type: string
          description: >-
            Identifier the provider gave the verification session, in the
            provider's own opaque form. It is kept so an attempt can be traced
            back to them.
          nullable: true
    entityLogsShareOauth:
      type: object
      properties:
        checks:
          allOf:
            - $ref: '#/components/schemas/entityLogsShareOauthChecks'
          description: OAuth identity checks required by the share and their results.
          nullable: true
        provider:
          type: string
          description: OAuth provider the recipient has verified with.
          nullable: true
        providers:
          type: array
          items:
            type: string
          description: OAuth providers the recipient is allowed to verify with.
          nullable: true
    entityDocumentsWorkflowHistoryShareVerifiedWith:
      type: object
      properties:
        factor:
          type: string
          description: >-
            The method the recipient used to prove their identity before opening
            the share.
          example: sms
          nullable: true
        fullname:
          type: string
          description: >-
            Full name of the verified person as returned by the identity
            provider (Latin script).
          nullable: true
        fullnameAr:
          type: string
          description: >-
            Full name of the verified person as returned by the identity
            provider (Arabic script).
          nullable: true
        kycFactors:
          type: array
          items:
            type: string
            enum:
              - idVerification
              - livenessDetection
              - selfieWithId
          description: >-
            The individual checks the recipient had to pass, for an
            identity-document (KYC) verification.
          nullable: true
        oauthFactors:
          type: array
          items:
            $ref: >-
              #/components/schemas/entityDocumentsWorkflowHistoryShareVerifiedWithOauthFactor
          description: >-
            The profile attributes matched against the identity provider, for a
            sign-in verification.
          nullable: true
        value:
          type: string
          description: >-
            Identifies the concrete factor used - for example the phone number
            or email address a one-time code was sent to, or the identity
            provider that signed the recipient in. Not filled for a password.
          nullable: true
    entityLogsTemplateAttachments:
      type: object
      properties:
        added:
          type: array
          items:
            $ref: '#/components/schemas/entityLogsTemplateAttachmentsObject'
          description: Attachments the template gained.
          nullable: true
        removed:
          type: array
          items:
            $ref: '#/components/schemas/entityLogsTemplateAttachmentsObject'
          description: Attachments the template lost.
          nullable: true
    entityLogsUserDelegation:
      type: object
      properties:
        time:
          allOf:
            - $ref: '#/components/schemas/entityUsersDelegationTime'
          description: >-
            Period the hand-over covers. Outside it the delegation counts for
            nothing, even while it is configured.
        user:
          type: string
          description: >-
            Person the work is handed over to. They then act in place of the
            delegating person for as long as the period lasts.
          example: jane.doe@example.com
          nullable: true
    entityLogsDocumentAttachmentsObject:
      type: object
      properties:
        content:
          type: string
          description: >-
            Identifier of the file's contents in the binary storage. It is what
            tells one file from another here.
          nullable: true
        name:
          type: string
          description: Name the file is listed under on the document.
          example: evidence.pdf
          nullable: true
        public:
          type: boolean
          description: >-
            The file is visible to every reader of the document, recipients
            outside the organization included.
    entityLogsDocumentRightsObject:
      type: object
      properties:
        addedGroups:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Groups that gained this level of access. When the document was just
            created or copied, it is the whole list it started with.
          nullable: true
        addedUsers:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Users that gained this level of access. When the document was just
            created or copied, it is the whole list it started with.
          nullable: true
        removedGroups:
          type: array
          items:
            type: string
            nullable: true
          description: Groups that lost this level of access.
          nullable: true
        removedUsers:
          type: array
          items:
            type: string
            nullable: true
          description: Users that lost this level of access.
          nullable: true
    entityLogsDocumentTagsObject:
      type: object
      properties:
        added:
          type: array
          items:
            type: string
            nullable: true
          description: Tags put on the document.
          nullable: true
        removed:
          type: array
          items:
            type: string
            nullable: true
          description: Tags taken off the document.
          nullable: true
    entityLogsDocumentWorkflowClearedComment:
      type: object
      properties:
        author:
          type: string
          description: Who wrote the cleared comment.
          nullable: true
        comment:
          type: string
          description: The text the comment held before it was cleared.
          nullable: true
        commentAnchor:
          allOf:
            - $ref: '#/components/schemas/entityDocumentsWorkflowHistoryAnchor'
          description: The place on a page the cleared comment pointed at.
          nullable: true
        commentAttachment:
          type: string
          description: >-
            Identifier of the file the cleared comment carried. The file itself
            is not kept once nothing references it.
          nullable: true
        historyId:
          type: string
          description: Identifier of the cleared comment within the document.
          nullable: true
        isPublicComment:
          type: boolean
          description: Whether the cleared comment was public.
        reactions:
          type: array
          items:
            type: string
            nullable: true
          description: Reactions dropped with the comment, as "type:username" pairs.
          nullable: true
        threadParentId:
          type: string
          description: Set when the cleared comment was a reply.
          nullable: true
    entityDocumentsWorkflowHistoryAnchor:
      type: object
      properties:
        page:
          type: integer
          description: >-
            Page of the main file the comment points at, the first page being
            `1`.
          example: 1
          nullable: true
        position:
          allOf:
            - $ref: '#/components/schemas/entityGenericSignFieldPosition'
          description: The rectangle on that page the comment points at.
          nullable: true
    entityLogsShareKycChecks:
      type: object
      properties:
        dateOfBirth:
          type: boolean
          description: >-
            Whether the date of birth on the document matched the one expected.
            Only the outcome is recorded — the audit log never holds the date
            itself.
          nullable: true
        documentNumber:
          type: boolean
          description: >-
            Whether the document number matched the one expected. Only the
            outcome is recorded — the audit log never holds the number itself.
          nullable: true
        nationality:
          type: boolean
          description: >-
            Whether the nationality on the document matched the one expected;
            where the provider reports no nationality, the citizenship it
            reports is taken instead. Only the outcome is recorded — the audit
            log never holds the value itself.
          nullable: true
    entityLogsShareOauthChecks:
      type: object
      properties:
        email:
          type: boolean
          description: Result of e-mail address check.
          nullable: true
        emiratesId:
          type: boolean
          description: Result of Emirates ID check.
          nullable: true
        phoneNumber:
          type: boolean
          description: Result of phone number check.
          nullable: true
    entityDocumentsWorkflowHistoryShareVerifiedWithOauthFactor:
      type: object
      properties:
        type:
          type: string
          description: >-
            Attribute of the recipient's identity-provider profile that was
            checked.
          enum:
            - email
            - phoneNumber
            - emiratesId
          example: email
        value:
          type: string
          description: Value that attribute was required to match.
          nullable: true
      required:
        - type
    entityLogsTemplateAttachmentsObject:
      type: object
      properties:
        content:
          type: string
          description: >-
            Identifier of the file in the binary storage. It is what tells one
            attachment from another here.
          example: a219a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhntv0
          nullable: true
        name:
          type: string
          description: Name the file is listed under on the template.
          example: terms.pdf
          nullable: true
        public:
          type: boolean
          description: >-
            The file is visible to every reader of a document created from the
            template, recipients outside the organization included.
    entityUsersDelegationTime:
      type: object
      properties:
        end:
          type: string
          format: date-time
          description: When the hand-over stops.
          nullable: true
        start:
          type: string
          format: date-time
          description: When the hand-over takes effect.
          nullable: true
    entityGenericSignFieldPosition:
      type: object
      properties:
        percentHeight:
          type: number
          description: Height of the element as a fraction of the page height.
          example: 0.03176305676305678
          nullable: true
        percentWidth:
          type: number
          description: Width of the element as a fraction of the page width.
          example: 0.43921568627450985
          nullable: true
        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.49892906639788337
          nullable: true
        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.2465883269647186
          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.