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

# List documents

> `GET /documents`

Lists the documents you can access, filtered with query parameters.

Combine any of the filters — every one you supply must match. Filter on the document itself: its title and content (`query`), metadata definition, category, creator, owner, creation time, expiration date, renewal notice deadline and kind of term. Filter on its transaction too: the status it is in, when it ended, the recipient it is currently waiting on, what that recipient is asked to do, and how long it has been waiting. Filter on the people who took part as well: who the document is shared with, who signed it and when, and who approved, reviewed or accepted it. Narrow the search to a single folder tree with `scope`, or to one folder with `folderId`. Alternatively, pass `viewId` to apply one of your saved document views (listed by `GET /me` under `documentViews`) — the view's filters run server-side exactly as in the Circularo web app.

To filter by the values of metadata-definition fields, use the document search endpoint, which takes the same filters plus metadata-field values in a request body.

Results are returned newest first, or best match first when you search with `query`, documents holding its words as a phrase generally ranking highest. Page through them either with an `offset` for shallow access, or by following the opaque `nextCursor` returned in the pagination metadata for deep traversal. When you page with the `cursor`, send it on its own; it also keeps the order of a `query`'s results stable from page to page, which pages reached by `offset` do not guarantee.



## OpenAPI

````yaml /api-v2/openapi.json get /documents
openapi: 3.0.3
info:
  title: Circularo API v2
  description: >-
    Circularo API v2 gives programmatic access to Circularo, the platform for
    intelligent document management, electronic and digital signing, and the
    signing and approval processes that move your documents forward.


    Use this API to embed Circularo directly into your own products and systems:
    automate the document lifecycle end to end, send documents out to be signed
    and approved, collect the evidence of what happened, manage users and
    access, and stay in sync through real-time events.


    ## Capabilities


    * **Documents:** Create, organize, and search documents, then seal or
    annotate them, clone them, and create a shareable view link — with a
    tamper-proof audit trail behind every one.

    * **Transactions:** Send a document to one or more recipients to be signed,
    approved, reviewed, or accepted — in parallel or in a set order, with
    identity verification for recipients who have no Circularo account — or sign
    it yourself. Track a running transaction, remind, replace or remove its
    recipients, and cancel it.

    * **Templates:** Start a transaction from a template prepared in the
    Circularo web app, with its placed fields and recipient roles already laid
    out for you.

    * **Files, folders & metadata:** Upload reusable files, describe documents
    with metadata definitions, and organize them into personal or shared
    folders.

    * **Exports:** Download a document together with its audit trail and
    certificate of fulfillment, or have a whole folder tree, a filtered set of
    documents, or your own account data archived in the background.

    * **Administration:** Provision and manage the members of your organization,
    control who belongs to which group, and review a complete audit log of
    activity.

    * **Reporting:** Read organization-wide reports and predefined analytics
    dashboards.

    * **Real-time events:** Subscribe to webhooks to react the moment a document
    is created, signed, or completed.


    ## Authentication


    Authenticate every request with a long-lived API key. Create your first key
    from the Circularo web app, then create, list, and revoke additional keys
    through this API. Read `GET /me` to see which account a key belongs to and
    what it is allowed to do.
  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/v2
security:
  - ApiKey: []
tags:
  - name: API Keys
    description: >-
      An API key is the long-lived, secret credential your integration uses to
      authenticate with Circularo. A key stays valid as long as it is in regular
      use; store it securely, and revoke any key that is no longer needed or may
      have been exposed.
  - name: Audit Logs
    description: >-
      The audit log is the record of actions taken across your organization —
      who did what, to which entity, and when. Search and page through it,
      filtering by actor, activity, target and time range, with an offset for
      shallow access or an opaque cursor for deep traversal and exports.
  - name: Dashboards
    description: >-
      Dashboards are your organization's predefined analytics — document and
      transaction metrics aggregated for reporting and visualization. List the
      dashboards your account can access, then run one to read back its labeled,
      chart-ready data series.
  - name: Documents
    description: >-
      A document combines a main file with metadata, custom fields, and optional
      attachments — the central object you create, search, and manage in
      Circularo. Act on a document directly by sealing or annotating it, clone
      it, read the text of its main file, or create a shareable view link, and
      organize it into folders. Every document carries a transaction identifier
      for tracking its signing or approval process.
  - name: Exports
    description: >-
      An export job packages your documents, folders, or account data into a
      downloadable ZIP archive in the background. Create an export from the
      respective resource, poll it here until it completes, then download the
      resulting archive by its file identifier.
  - name: Files
    description: >-
      A file is a reusable binary you upload once and then reference by its
      identifier wherever a file is needed — as a document's main file, an
      attachment, or an image placed on a page. Upload files and download them
      again; for PDFs, you can also locate signature anchors at upload time.
  - name: Folders
    description: >-
      A folder organizes your documents into a tree — your personal tree, which
      is yours alone, or your organization's shared tree. Nest folders under one
      another, move them within their tree, and search across them to build and
      navigate the structure that fits your workflow.
  - name: Groups
    description: >-
      A group bundles the permissions and access granted to its members —
      including your organization itself, which is represented as a group.
      Browse the groups in your organization and manage who belongs to them.
      Both require organization administrator permissions.
  - name: Me
    description: >-
      The account that your API key belongs to — your identity, role, granted
      permissions, locale preferences, and account status. Read it to discover
      which account a key is connected to and what it is allowed to do.
  - name: Metadata Definitions
    description: >-
      A metadata definition describes the structure of a document — the metadata
      fields it accepts — so you know which metadata to supply when creating or
      working with documents. Browse the definitions available to your account.
  - name: Ping
    description: >-
      Check that Circularo API v2 is reachable and responding. Use it from your
      monitoring or before an integration run to verify connectivity. No
      authentication is required.
  - name: Reports
    description: >-
      A report is an organization-wide view over your documents and their
      transactions — each row pairs a document with the status, timing, activity
      counts and recipients of its transaction, for auditing signing activity,
      tracking processing times, and feeding compliance and analytics tooling.
      Filter by creation time, transaction status, metadata definition,
      category, creator and owner, and page through results with an offset or an
      opaque cursor.
  - name: Templates
    description: >-
      A template is a reusable blueprint for creating transactions, prepared in
      the Circularo web app. Every template carries document defaults — a source
      file, a name and a metadata definition; a signing template additionally
      carries the placed fields and defines the recipient roles and their
      routing. Browse the templates available to your account, then create a
      transaction from one by referencing it and casting recipients into its
      roles.
  - name: Transactions
    description: >-
      A transaction gets a document signed, approved, reviewed or accepted — by
      other people, by yourself, or both. Start one on an existing document or
      create the document in the same call; send it to recipients, defining who
      takes part, what each of them is asked to do, and optional verification
      for recipients without a Circularo account — or sign it yourself, which
      completes the transaction immediately. Once it is running, track its
      progress, remind recipients, update or reassign them, and cancel it when
      it is no longer needed. Transactions have no separate search — find them
      by searching your documents, each of which carries its transaction's
      status and pending recipients.
  - name: Users
    description: >-
      A user is a member of your organization. What they may do is set through
      their role, while the organization is assigned automatically.
      Provisioning, updating, and removing members requires organization
      administrator permissions.
  - name: Webhooks
    description: >-
      A webhook subscribes your systems to document events in your organization.
      Register an HTTPS callback URL to receive real-time notifications when
      documents are created, signed or completed; each payload can optionally
      carry a signature so you can verify it originates from Circularo. Managing
      webhooks requires organization administrator permissions.
externalDocs:
  description: Guides
  url: https://developers.circularo.com/latest/guides
paths:
  /documents:
    get:
      tags:
        - Documents
      summary: List documents
      description: >-
        `GET /documents`


        Lists the documents you can access, filtered with query parameters.


        Combine any of the filters — every one you supply must match. Filter on
        the document itself: its title and content (`query`), metadata
        definition, category, creator, owner, creation time, expiration date,
        renewal notice deadline and kind of term. Filter on its transaction too:
        the status it is in, when it ended, the recipient it is currently
        waiting on, what that recipient is asked to do, and how long it has been
        waiting. Filter on the people who took part as well: who the document is
        shared with, who signed it and when, and who approved, reviewed or
        accepted it. Narrow the search to a single folder tree with `scope`, or
        to one folder with `folderId`. Alternatively, pass `viewId` to apply one
        of your saved document views (listed by `GET /me` under `documentViews`)
        — the view's filters run server-side exactly as in the Circularo web
        app.


        To filter by the values of metadata-definition fields, use the document
        search endpoint, which takes the same filters plus metadata-field values
        in a request body.


        Results are returned newest first, or best match first when you search
        with `query`, documents holding its words as a phrase generally ranking
        highest. Page through them either with an `offset` for shallow access,
        or by following the opaque `nextCursor` returned in the pagination
        metadata for deep traversal. When you page with the `cursor`, send it on
        its own; it also keeps the order of a `query`'s results stable from page
        to page, which pages reached by `offset` do not guarantee.
      operationId: listDocuments
      parameters:
        - in: query
          name: acceptedBy
          description: >-
            Return only documents accepted by any of these people, each given by
            the `userId` or email address of a user, or by the email address of
            a recipient without a Circularo account.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - jane.doe@example.com
        - in: query
          name: approvedBy
          description: >-
            Return only documents approved by any of these people, each given by
            the `userId` or email address of a user, or by the email address of
            a recipient without a Circularo account.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - jane.doe@example.com
        - in: query
          name: category
          description: Return only documents in any of these categories.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - Contract
        - in: query
          name: completedAfter
          description: >-
            Return only documents whose transaction reached its final state —
            `completed`, `rejected`, `cancelled` or `expired` — at or after this
            moment, as their `transaction.completedAt` states. A document whose
            transaction is still running or has not started does not match.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: completedBefore
          description: >-
            Return only documents whose transaction reached its final state —
            `completed`, `rejected`, `cancelled` or `expired` — at or before
            this moment, as their `transaction.completedAt` states. A document
            whose transaction is still running or has not started does not
            match.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: createdAfter
          description: Return only documents created at or after this moment.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: createdBefore
          description: Return only documents created at or before this moment.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: createdBy
          description: >-
            Return only documents created by any of these users, each given by
            their `userId` or email address.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - jane.doe@example.com
        - in: query
          name: cursor
          description: >-
            The `nextCursor` token from a previous response. Send it on its own
            to fetch the next page; it cannot be combined with any other
            parameter. Fetch the next page promptly, as the `cursor` expires
            after a period of inactivity.
          required: false
          schema:
            type: string
        - in: query
          name: expiresAfter
          description: >-
            Return only documents that expire at or after this moment, as their
            `expiresAt` states. A document without an expiration date does not
            match.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: expiresBefore
          description: >-
            Return only documents that expire at or before this moment, as their
            `expiresAt` states. A document without an expiration date does not
            match.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: folderId
          description: >-
            Return only documents placed directly in this folder; the folder
            tree is taken from it. Combine with `recursive` to also include
            documents nested deeper. At most one of `folderId` and `scope` may
            be provided.
          required: false
          schema:
            type: string
            pattern: ^[A-Za-z0-9_-]+$
            minLength: 1
            example: 97cfb9de-92dd-413a-b5e7-175eff7506d6
        - in: query
          name: limit
          description: Maximum number of documents to return per page.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            example: 20
            default: 20
        - in: query
          name: metadataDefinition
          description: >-
            Return only documents created with any of these metadata
            definitions.
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[A-Za-z0-9_-]+$
            example:
              - d_default
        - in: query
          name: noticeDueAfter
          description: >-
            Return only documents whose last day for the renewal notice starts
            at or after this moment, as their `term.renewal.noticeDueAt` states
            — to include a notice due today, give the start of today or earlier.
            A document without a notice deadline does not match.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: noticeDueBefore
          description: >-
            Return only documents whose last day for the renewal notice starts
            at or before this moment, as their `term.renewal.noticeDueAt` states
            — a moment within that day matches it as well. A document without a
            notice deadline does not match.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: offset
          description: >-
            Number of documents to skip before the returned page. Use it for
            shallow access; for deep traversal follow the `nextCursor` instead.
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 9900
            example: 0
            default: 0
        - in: query
          name: owner
          description: >-
            Return only documents currently owned by any of these users, each
            given by their `userId` or email address.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - jane.doe@example.com
        - in: query
          name: pendingPurpose
          description: >-
            Return only documents whose transaction is waiting for a recipient
            asked to perform any of these actions, whether it is already their
            turn or they are queued behind an earlier round.


            - `sign`: The recipient is requested to sign the document.

            - `approve`: The recipient is requested to approve the document.

            - `review`: The recipient is requested to review the document.

            - `accept`: The recipient is requested to accept the document.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - sign
                - approve
                - review
                - accept
            example:
              - sign
        - in: query
          name: query
          description: >-
            Full-text search over the document's title and content. A document
            holding any of the words matches; the documents matching best come
            first.
          required: false
          schema:
            type: string
            maxLength: 255
            example: quarterly report
        - in: query
          name: recursive
          description: >-
            When filtering by `folderId` or `scope`, also return documents
            nested at any depth, not only the direct contents.
          required: false
          schema:
            type: boolean
            example: false
            default: false
        - in: query
          name: reviewedBy
          description: >-
            Return only documents reviewed by any of these people, each given by
            the `userId` or email address of a user, or by the email address of
            a recipient without a Circularo account.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - jane.doe@example.com
        - in: query
          name: scope
          description: >-
            Restrict the search to a single folder tree. Only documents at the
            root of that tree are returned — combine with `recursive` to include
            documents nested at any depth. Omit to search both trees. At most
            one of `folderId` and `scope` may be provided.


            - `personal`: Your personal folder tree, visible only to you.

            - `shared`: The organization-wide shared folder tree.
          required: false
          schema:
            type: string
            enum:
              - personal
              - shared
            example: shared
        - in: query
          name: sharedWith
          description: >-
            Return only documents currently shared with any of these people,
            each given by the `userId` or email address of a user, or by the
            email address of a recipient without a Circularo account. Everyone
            the document was shared with, delegated to or reassigned to counts
            while their share lasts — also after they acted on it, and a
            recipient who delegated their action keeps their share. A share that
            was cancelled or has expired no longer counts.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - jane.doe@example.com
        - in: query
          name: signedAfter
          description: >-
            Return only documents signed at or after this moment — by a
            recipient, or by an owner signing the stored document; a signature
            placed while the document was created or edited, or as a step of its
            metadata definition's workflow, does not count, nor does a seal.
            Together with `signedBy`, one of those people must have signed
            within the period.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: signedBefore
          description: >-
            Return only documents signed at or before this moment — by a
            recipient, or by an owner signing the stored document; a signature
            placed while the document was created or edited, or as a step of its
            metadata definition's workflow, does not count, nor does a seal.
            Together with `signedBy`, one of those people must have signed
            within the period.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
        - in: query
          name: signedBy
          description: >-
            Return only documents signed by any of these people — a recipient
            who signed, or an owner who signed the stored document; a signature
            placed while the document was created or edited, or as a step of its
            metadata definition's workflow, does not count — each given by the
            `userId` or email address of a user, or by the email address of a
            recipient without a Circularo account.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - jane.doe@example.com
        - in: query
          name: termType
          description: >-
            Return only documents whose term is of any of these kinds.


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

            - `none`: The document has no kind of term: it has no expiration
            date and is not a contract running until it is terminated.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - fixed_term
                - expiry_only
                - non_fixed_term
                - none
            example:
              - fixed_term
        - in: query
          name: transactionStatus
          description: >-
            Return only documents whose transaction is in any of these statuses.


            - `not-started`: The document has been created, but no transaction
            has started over it yet.

            - `in-progress`: A transaction is in progress: the document has been
            shared and is awaiting action from one or more recipients.

            - `completed`: The transaction completed successfully — every
            requested recipient finished their action.

            - `rejected`: The transaction ended because a recipient rejected the
            document.

            - `cancelled`: The transaction was cancelled before completion.

            - `expired`: The transaction expired before completion.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - not-started
                - in-progress
                - completed
                - rejected
                - cancelled
                - expired
            example:
              - in-progress
        - in: query
          name: trashed
          description: >-
            When `true`, search your trashed documents instead of the active
            ones.
          required: false
          schema:
            type: boolean
            example: false
            default: false
        - in: query
          name: viewId
          description: >-
            Apply one of your saved document views; the view's filters are
            applied exactly as in the Circularo web app. It cannot be combined
            with other search filters — pagination works as usual. The search
            returns documents only, so any folder-targeting part of the view
            does not apply.
          required: false
          schema:
            type: string
            pattern: ^[A-Za-z0-9_-]+$
            example: '12'
        - in: query
          name: waitingForRecipient
          description: >-
            Return only documents whose transaction is waiting for this
            recipient — the `userId` or email address of a user, or the email
            address of a recipient without a Circularo account — whether it is
            already their turn or they are queued behind an earlier round.
          required: false
          schema:
            type: string
            example: jane.doe@example.com
        - in: query
          name: waitingSince
          description: >-
            Return only documents that have been waiting for a recipient whose
            turn it currently is since at or before this moment. Use it to find
            documents that have been awaiting action for a long time.
          required: false
          schema:
            type: string
            format: date-time
            example: '2024-11-02T09:15:30.000Z'
      responses:
        '200':
          description: Returns the matching documents and pagination metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/documentList'
        '400':
          description: >-
            The query parameters are invalid — for example both `scope` and
            `folderId` were supplied, a `cursor` or `viewId` was combined with
            other filters, or the referenced view is missing or not supported
            over the API.
          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: Your account is not allowed to manage documents.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 403
                type: AUTH:ACCESS_DENIED
                message: Access denied
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '429':
          description: >-
            Rate limit exceeded; retry after the delay indicated in the
            `Retry-After` header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 429
                type: SYSTEM:RATE_LIMIT_EXCEEDED
                message: Rate limit exceeded
                requestId: 3fa85f6457174562b3fc2c963f66afa6
      security:
        - ApiKey: []
components:
  schemas:
    documentList:
      type: object
      properties:
        pagination:
          allOf:
            - $ref: '#/components/schemas/pagination'
          description: >-
            Pagination state of this page. Null when the endpoint returns the
            complete list in one response.
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/document'
          description: The documents matching your query.
        total:
          type: integer
          minimum: 0
          description: Total number of items matching the request.
          example: 42
      required:
        - pagination
        - results
        - total
      description: A page of documents.
    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
    pagination:
      type: object
      properties:
        limit:
          type: integer
          minimum: 1
          description: Maximum number of items requested for this page.
          example: 20
        nextCursor:
          type: string
          description: >-
            An opaque token. Pass it back unchanged as the `cursor` parameter to
            fetch the next page. It is issued only when paging from the start of
            the results — on the first page or when following a cursor — and
            only when this page came back full. Null otherwise: at the end of
            the results, on pages reached by a non-zero `offset`, or when the
            endpoint does not support cursor paging.
          example: 9f1c4e2a7b0d83f65a1e94c7d2b8061f3ac59e470b2d8f1a6c3e90b7d45f2a18
          nullable: true
        offset:
          type: integer
          minimum: 0
          description: >-
            Number of items preceding this page. When paging by cursor it
            reports the running count of items already traversed; it may exceed
            the `offset` parameter's limit and cannot be used to jump directly
            to this page.
          example: 0
      required:
        - limit
        - nextCursor
        - offset
      description: Pagination state of one page of a paginated list.
    document:
      type: object
      properties:
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/documentAnnotation'
          description: Text annotations added to the document.
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/documentAttachment'
          description: Files attached to the document.
        category:
          type: string
          description: Free-form category label of the document.
          example: Contract
          nullable: true
        createdAt:
          type: string
          format: date-time
          description: When the document was created.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        createdBy:
          allOf:
            - $ref: '#/components/schemas/person'
          description: >-
            The user who created the document. Null when it cannot be
            determined.
          nullable: true
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/documentCustomField'
          description: >-
            Custom key/value data stored on the document, outside its metadata
            definition.
        expiresAt:
          type: string
          format: date-time
          description: >-
            When the document expires — the end of the last day it is valid.
            Null when the document has no expiration date.
          example: '2026-12-31T22:59:59.999Z'
          nullable: true
        folders:
          type: array
          items:
            $ref: '#/components/schemas/documentFolder'
          description: >-
            The document's placements in folder trees — one entry per tree it
            belongs to. Empty when the document is not in any folder tree.
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          minLength: 1
          description: Identifier of the document.
          example: a0d01c9d-f72f-4c57-af11-e26bda19cc59
        images:
          type: array
          items:
            $ref: '#/components/schemas/documentImage'
          description: Images embedded into the document.
        mainFile:
          allOf:
            - $ref: '#/components/schemas/documentMainFile'
          description: The main file of the document.
          nullable: true
        metadataDefinition:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          minLength: 1
          maxLength: 100
          description: Identifier of the metadata definition the document was created with.
          example: d_default
          nullable: true
        metadataFields:
          type: object
          additionalProperties:
            description: Additional properties
          description: Values of the metadata-definition fields, keyed by field identifier.
          example:
            D_DEFAULT_DESCRIPTION: Quarterly maintenance contract
        owner:
          allOf:
            - $ref: '#/components/schemas/person'
          description: >-
            The current owner of the document. Null when it cannot be
            determined.
          nullable: true
        signatureProvider:
          type: string
          description: >-
            The provider used to sign this document. A transaction fixes it —
            from the `signatureProvider` that transaction was created with, or
            from your account default at the moment the first signature is
            applied — and it cannot be changed afterwards. Null until a
            transaction has fixed it.


            - `internal`: The certificate Circularo manages for your
            environment.

            - `datasure`: Datasure, an external trust service provider. Requires
            a Datasure certificate and Datasure account configured in your
            environment.

            - `emdha`: EMDHA, the Saudi national digital signature service. The
            signer completes the signature in the web app.

            - `uaePassSign`: UAE PASS, the national digital identity service of
            the United Arab Emirates. The signer completes the signature in the
            web app.

            - `icaQualified`: I.CA qualified certificates on a hardware token.
            The signer completes the signature in the web app, using their own
            device.

            - `icaSwStore`: I.CA certificates from the signer's software
            certificate store. The signer completes the signature in the web
            app, using their own device.
          enum:
            - internal
            - datasure
            - emdha
            - uaePassSign
            - icaQualified
            - icaSwStore
            - null
          example: internal
          nullable: true
        signatures:
          type: array
          items:
            $ref: '#/components/schemas/documentSignature'
          description: Signatures, seals and timestamps applied to the document.
        submittedFiles:
          type: array
          items:
            $ref: '#/components/schemas/documentSubmittedFile'
          description: Immutable evidence files submitted to the document.
        templateId:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          minLength: 1
          description: >-
            Identifier of the template the document's transaction is bound to.
            Null when the document is not bound to a template.
          example: cba71ea5-9a68-431a-a5c2-6d9932792ec7
          nullable: true
        term:
          allOf:
            - $ref: '#/components/schemas/documentTerm'
          description: >-
            The contract term recorded for the document. Null when the document
            neither expires nor has a term configured.
          nullable: true
        title:
          type: string
          description: Human-readable title of the document.
          example: Client agreement
          nullable: true
        transaction:
          allOf:
            - $ref: '#/components/schemas/documentTransaction'
          description: >-
            A summary of the document's transaction: its current state and the
            recipients still to act.
        trashed:
          type: boolean
          description: Whether the document is currently in the trash.
          example: false
        webUrl:
          type: string
          format: uri
          description: >-
            Link to open the document in the Circularo web app. Requires an
            authenticated Circularo session.
          example: >-
            https://sandbox.circularo.com/home/detail?select=a0d01c9d-f72f-4c57-af11-e26bda19cc59
          nullable: true
      required:
        - annotations
        - attachments
        - category
        - createdAt
        - createdBy
        - customFields
        - expiresAt
        - folders
        - id
        - images
        - mainFile
        - metadataDefinition
        - metadataFields
        - owner
        - signatureProvider
        - signatures
        - submittedFiles
        - templateId
        - term
        - title
        - transaction
        - trashed
        - webUrl
      description: >-
        A single document: its metadata, files, field values and lifecycle
        status.
    documentAnnotation:
      type: object
      properties:
        addedAt:
          type: string
          format: date-time
          description: When the annotation was added.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        addedBy:
          allOf:
            - $ref: '#/components/schemas/person'
          description: >-
            The person who added the annotation. Null when it cannot be
            determined.
          nullable: true
        comment:
          type: string
          description: Comment stored with the annotation.
          example: Reviewed and approved
          nullable: true
        text:
          type: string
          description: Text content of the annotation.
          example: Approved
          nullable: true
        type:
          type: string
          description: >-
            What the annotation represents.


            - `annotation_box_field`: A text box form field.

            - `annotation_check`: A checkbox form field.

            - `annotation_check_group`: A group of checkbox form fields.

            - `annotation_company`: A company, filled in automatically.

            - `annotation_date`: A date that you provide.

            - `annotation_datetime`: A date and time that you provide.

            - `annotation_datetime_current`: The current date and time, filled
            in automatically.

            - `annotation_date_current`: The current date, filled in
            automatically.

            - `docId`: The document's identifier, filled in automatically.

            - `annotation_dropdown`: A dropdown form field.

            - `annotation_submitted_file`: Attaches a file to the document.

            - `annotation_full_name`: A full name, filled in automatically.

            - `annotation_generic`: Free-form text that you provide.

            - `annotation_link`: A clickable link to an external target.

            - `annotation_mail`: An email address, filled in automatically.

            - `annotation_metadata`: A form field bound to one of the document's
            metadata fields.

            - `annotation_phone`: A phone number, filled in automatically.

            - `annotation_radio`: A radio-button form field.

            - `annotation_role`: A job title, filled in automatically.
          enum:
            - annotation_box_field
            - annotation_check
            - annotation_check_group
            - annotation_company
            - annotation_date
            - annotation_datetime
            - annotation_datetime_current
            - annotation_date_current
            - docId
            - annotation_dropdown
            - annotation_submitted_file
            - annotation_full_name
            - annotation_generic
            - annotation_link
            - annotation_mail
            - annotation_metadata
            - annotation_phone
            - annotation_radio
            - annotation_role
            - null
          example: annotation_generic
          nullable: true
      required:
        - addedAt
        - addedBy
        - comment
        - text
        - type
      description: A text annotation added to the document.
    documentAttachment:
      type: object
      properties:
        fileId:
          type: string
          pattern: ^[a-z0-9]+$
          minLength: 1
          description: Identifier of the file.
          example: s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj
          nullable: true
        fileName:
          type: string
          description: Display name of the file.
          example: LegalNotes.docx
          nullable: true
        isMerged:
          type: boolean
          description: Whether this file has been merged into the document's main file.
          example: false
        isPublic:
          type: boolean
          description: Whether external recipients of the document may see this file.
          example: false
        mimeType:
          type: string
          description: MIME type of the file.
          example: >-
            application/vnd.openxmlformats-officedocument.wordprocessingml.document
          nullable: true
        pageCount:
          type: integer
          description: >-
            Number of pages, when the file is a PDF. Null for a file that has no
            pages.
          example: 8
          nullable: true
        size:
          type: integer
          description: Size of the file in bytes.
          example: 522481
          nullable: true
      required:
        - fileId
        - fileName
        - isMerged
        - isPublic
        - mimeType
        - pageCount
        - size
      description: A file attached to a document.
    person:
      type: object
      properties:
        email:
          type: string
          description: >-
            The person's email address. In a record of a past event it is the
            address the person had at that time; elsewhere it is their current
            address. Null when it is not known.
          example: jane.doe@example.com
          nullable: true
        fullname:
          type: string
          description: >-
            The person's full name. Null when it is not known, or when the
            person is outside your organization and not among your contacts.
          example: Jane Doe
          nullable: true
        userId:
          type: string
          description: >-
            Identifier of the person's Circularo account, the `id` of the user.
            Treat it as an opaque value: even where it looks like an email
            address, it is not one. Null for a party without a Circularo
            account.
          example: jane.doe@example.com
          nullable: true
      required:
        - email
        - fullname
        - userId
      description: >-
        A person the resource refers to: their Circularo account, if they have
        one, their email address and their name.
    documentCustomField:
      type: object
      properties:
        displayName:
          type: string
          description: Human-readable label for the custom field.
          example: Internal reference
          nullable: true
        key:
          type: string
          description: Identifier of the custom field.
          example: internalReference
        type:
          type: string
          description: Data type of the value.
          enum:
            - date
            - number
            - string
          example: string
        value:
          type: string
          description: Value of the custom field.
          example: ACME-2026-001
          nullable: true
      required:
        - displayName
        - key
        - value
      description: >-
        A custom key/value field stored on the document, outside its metadata
        definition.
    documentFolder:
      type: object
      properties:
        folderId:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          minLength: 1
          description: >-
            Identifier of the folder within the tree that holds the document.
            Null when the document sits at the root of the tree.
          example: 97cfb9de-92dd-413a-b5e7-175eff7506d6
          nullable: true
        scope:
          type: string
          description: |-
            Which folder tree this placement is in.

            - `personal`: Your personal folder tree, visible only to you.
            - `shared`: The organization-wide shared folder tree.
          enum:
            - personal
            - shared
          example: personal
      required:
        - folderId
        - scope
      description: A placement of a document within one folder tree.
    documentImage:
      type: object
      properties:
        addedAt:
          type: string
          format: date-time
          description: When the image was added.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        addedBy:
          allOf:
            - $ref: '#/components/schemas/person'
          description: The person who added the image. Null when it cannot be determined.
          nullable: true
        comment:
          type: string
          description: Comment stored with the image.
          example: Company logo
          nullable: true
        fileId:
          type: string
          pattern: ^[a-z0-9]+$
          minLength: 1
          description: Identifier of the embedded image file.
          example: s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj
          nullable: true
      required:
        - addedAt
        - addedBy
        - comment
        - fileId
      description: An image embedded into the document.
    documentMainFile:
      type: object
      properties:
        fileId:
          type: string
          pattern: ^[a-z0-9]+$
          minLength: 1
          description: Identifier of the main file.
          example: s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj
          nullable: true
        fileName:
          type: string
          description: Display name of the main file.
          example: Contract.pdf
          nullable: true
        mimeType:
          type: string
          description: MIME type of the main file.
          example: application/pdf
          nullable: true
        pageCount:
          type: integer
          description: >-
            Number of pages, when the file is a PDF. Null for a file that has no
            pages.
          example: 12
          nullable: true
        size:
          type: integer
          description: Size of the file in bytes.
          example: 724158
          nullable: true
      required:
        - fileId
        - fileName
        - mimeType
        - pageCount
        - size
      description: The main file of a document.
    documentSignature:
      type: object
      properties:
        certificate:
          allOf:
            - $ref: '#/components/schemas/documentSignatureCertificate'
          description: >-
            The certificate recorded for the signature when it was applied: the
            one it was made with for a cryptographic signature — for `internal`
            the certificate Circularo manages for your environment — usually the
            one of the seal applied over it for a signature drawn into the file,
            and the timestamping authority's for a `timestamp`. Null when no
            certificate was recorded.
          nullable: true
        comment:
          type: string
          description: Comment stored with the signature.
          example: Reviewed and approved
          nullable: true
        hasLongTermValidationData:
          type: boolean
          description: >-
            Whether the signature — for a drawn one, usually the seal applied
            over it — embeds the certificate chain and revocation data needed to
            validate it in the long term, after its certificate expires. `false`
            also when it was not recorded.
        isTimestamped:
          type: boolean
          description: >-
            Whether a timestamp from a trusted timestamping authority is
            embedded in the signature — for a drawn one, usually in the seal
            applied over it — proving when it was made.
        isVerified:
          type: boolean
          description: >-
            Whether the signature — for a drawn one, usually the seal applied
            over it — was found valid when it was recorded; whatever the
            platform applies itself is recorded as valid. It reflects that
            moment, not a check made now, and is `false` also when no
            verification was recorded.
        sealProvider:
          type: string
          description: >-
            Name of the seal provider a seal was made with, one of the providers
            `GET /me` lists in `settings.availableSealProviders`. It is recorded
            as the provider was named at the time, so it may name a provider
            that has since been removed from your account. Null for anything but
            a seal, and for a seal whose provider name was not recorded.
          example: company-qseal
          nullable: true
        signatureProvider:
          type: string
          description: >-
            The provider that produced this particular signature, which is not
            necessarily the document's own — for a seal it is the type of the
            seal provider whose certificate sealed the document. Null for a
            signature that was already in the file when it was uploaded, and for
            a timestamp, which records no signing provider; `tsaServer` reports
            where a timestamp came from instead.


            - `internal`: The certificate Circularo manages for your
            environment.

            - `datasure`: Datasure, an external trust service provider. Requires
            a Datasure certificate and Datasure account configured in your
            environment.

            - `emdha`: EMDHA, the Saudi national digital signature service. The
            signer completes the signature in the web app.

            - `uaePassSign`: UAE PASS, the national digital identity service of
            the United Arab Emirates. The signer completes the signature in the
            web app.

            - `icaQualified`: I.CA qualified certificates on a hardware token.
            The signer completes the signature in the web app, using their own
            device.

            - `icaSwStore`: I.CA certificates from the signer's software
            certificate store. The signer completes the signature in the web
            app, using their own device.

            - `icaRemoteQualifiedSeal`: I.CA RemoteSeal, a qualified electronic
            seal of the organization, applied server-side without any person
            confirming it.
          enum:
            - internal
            - datasure
            - emdha
            - uaePassSign
            - icaQualified
            - icaSwStore
            - icaRemoteQualifiedSeal
            - null
          example: internal
          nullable: true
        signedAt:
          type: string
          format: date-time
          description: When the signature was applied.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        signedBy:
          allOf:
            - $ref: '#/components/schemas/person'
          description: >-
            The person who applied the signature. Null for a signature that was
            already in the file when it was uploaded — `signerName` names its
            signer then — and when the signer cannot be determined.
          nullable: true
        signerName:
          type: string
          description: >-
            Name of the signer where it is not the person in `signedBy`, such as
            the name recorded inside a signature that was already in the file
            when it was uploaded.
          example: John Doe
          nullable: true
        timestampAuthority:
          type: string
          description: >-
            Distinguished name of the timestamping authority whose timestamp is
            embedded in the signature — for a drawn one, usually in the seal
            applied over it. Null when the signature carries no timestamp or the
            authority was not recorded.
          example: CN=Example TSA,O=Example Trust Services,C=CZ
          nullable: true
        tsaServer:
          type: string
          description: >-
            Name of the Time Stamping Authority server the timestamp was
            obtained from, one of the servers `GET /me` lists in
            `settings.availableTsaServers`. It is recorded as the server was
            named at the time, so it may name a server that has since been
            renamed or removed from your environment. Null when the component
            carries no timestamp, and for a timestamp that was already in the
            file when it was uploaded.
          example: primary
          nullable: true
        type:
          type: string
          description: |-
            The kind of component.

            - `signature`: A signature.
            - `initials`: Initials.
            - `stamp`: A stamp.
            - `wacom`: A signature captured with a signature pad.
            - `organization_stamp`: An organization stamp.
            - `seal`: A cryptographic document seal.
            - `timestamp`: A trusted timestamp.
          enum:
            - signature
            - initials
            - stamp
            - wacom
            - organization_stamp
            - seal
            - timestamp
            - null
          example: signature
          nullable: true
      required:
        - certificate
        - comment
        - hasLongTermValidationData
        - isTimestamped
        - isVerified
        - sealProvider
        - signatureProvider
        - signedAt
        - signedBy
        - signerName
        - timestampAuthority
        - tsaServer
        - type
      description: A signature, seal or timestamp applied to the document.
    documentSubmittedFile:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
          description: When the file was uploaded.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        createdBy:
          allOf:
            - $ref: '#/components/schemas/person'
          description: >-
            The person who uploaded the file. For evidence submitted during a
            transaction, that is the recipient who submitted it. Null when it
            cannot be determined.
          nullable: true
        fileId:
          type: string
          pattern: ^[a-z0-9]+$
          minLength: 1
          description: Identifier of the file.
          example: s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj
          nullable: true
        fileName:
          type: string
          description: Display name of the file.
          example: SignedConsentForm.pdf
          nullable: true
        isPublic:
          type: boolean
          description: Whether external recipients of the document may see this file.
          example: false
        mimeType:
          type: string
          description: MIME type of the file.
          example: application/pdf
          nullable: true
        pageCount:
          type: integer
          description: >-
            Number of pages, when the file is a PDF. Null for a file that has no
            pages.
          example: 8
          nullable: true
        size:
          type: integer
          description: Size of the file in bytes.
          example: 522481
          nullable: true
      required:
        - createdAt
        - createdBy
        - fileId
        - fileName
        - isPublic
        - mimeType
        - pageCount
        - size
      description: >-
        A file submitted to a document as evidence, with the account that
        supplied it.
    documentTerm:
      type: object
      properties:
        nonFixedTerm:
          allOf:
            - $ref: '#/components/schemas/documentTermNonFixedTerm'
          description: >-
            Notice terms of a contract that runs until it is terminated. Null
            for a contract with a set expiration.
          nullable: true
        reminders:
          type: array
          items:
            $ref: '#/components/schemas/documentTermReminder'
          description: >-
            Reminders sent ahead of the expiration. Each fires once per
            expiration and is armed again whenever the expiration moves.
        renewal:
          allOf:
            - $ref: '#/components/schemas/documentTermRenewal'
          description: >-
            How the contract is renewed once it expires. Null when it is not
            renewed.
          nullable: true
        type:
          type: string
          description: >-
            Kind of term, worked out from the expiration and the configuration
            whenever the document is saved. Null while the document has neither
            an expiration nor notice terms.


            - `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
          example: fixed_term
          nullable: true
      required:
        - nonFixedTerm
        - reminders
        - renewal
        - type
      description: >-
        The contract term recorded for a document: its kind, how it renews, the
        reminders ahead of its expiration and the notice terms of an open-ended
        contract.
    documentTransaction:
      type: object
      properties:
        completedAt:
          type: string
          format: date-time
          description: >-
            When the transaction reached its final state — `completed`,
            `rejected`, `cancelled` or `expired`. Null while the transaction is
            running or has not been started.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          minLength: 1
          description: >-
            Identifier of the transaction. Use it to retrieve the full state of
            the transaction.
          example: a0d01c9d-f72f-4c57-af11-e26bda19cc590
          nullable: true
        status:
          type: string
          description: >-
            Current status of the transaction. It advances as recipients act on
            the document.


            - `not-started`: The document has been created, but no transaction
            has started over it yet.

            - `in-progress`: A transaction is in progress: the document has been
            shared and is awaiting action from one or more recipients.

            - `completed`: The transaction completed successfully — every
            requested recipient finished their action.

            - `rejected`: The transaction ended because a recipient rejected the
            document.

            - `cancelled`: The transaction was cancelled before completion.

            - `expired`: The transaction expired before completion.
          enum:
            - not-started
            - in-progress
            - completed
            - rejected
            - cancelled
            - expired
          example: not-started
        waitingFor:
          type: array
          items:
            $ref: '#/components/schemas/documentPendingRecipient'
          description: >-
            Recipients the transaction is currently waiting on to act. Empty
            when no action is pending.
      required:
        - completedAt
        - id
        - status
        - waitingFor
      description: >-
        A summary of a document's transaction: its current state, when it ended
        and the recipients still to act.
    documentSignatureCertificate:
      type: object
      properties:
        fingerprintSha256:
          type: string
          description: >-
            SHA-256 digest of the certificate, as uppercase hexadecimal without
            separators. It identifies the exact certificate, where
            `serialNumber` tells certificates apart only within one issuer. Null
            when it was not recorded.
          example: A13767DDACA2D1B0ACAEB7CD3145D3D1CE14E208106318968FAF9882C8423F43
          nullable: true
        hasQcComplianceStatement:
          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
            whose chain is also found in a trust list. `false` also when the
            statements of the certificate were not recorded.
        hasQcSscdStatement:
          type: boolean
          description: >-
            Whether the certificate carries the eIDAS QcSSCD statement, by which
            its issuer declares the private key to be held on a qualified
            signature or seal creation device. As with
            `hasQcComplianceStatement` it is the issuer's claim, and `false`
            also when the statements of the certificate were not recorded.
        isSelfSigned:
          type: boolean
          description: >-
            Whether the certificate is self-signed. `false` also when it was not
            recorded.
        issuer:
          type: string
          description: >-
            Distinguished name of the authority that issued the certificate.
            Null when it was not recorded.
          example: CN=Example Qualified CA,O=Example Trust Services,C=CZ
          nullable: true
        keyUsage:
          type: array
          items:
            type: string
          description: >-
            What the certificate's key may be used for, as the key usage names
            of RFC 5280, in the order the certificate lists them. Empty when the
            certificate does not restrict it or it was not recorded.
          example:
            - digitalSignature
            - nonRepudiation
        qcTypes:
          type: array
          items:
            type: string
          description: >-
            What the certificate is qualified for, taken from its QcType
            statement — `esign` for a signature of a person, `eseal` for a seal
            of an organization, `web` for website authentication. A type without
            a common name is listed as its object identifier. Empty when the
            certificate carries no such statement or it was not recorded.
          example:
            - eseal
        serialNumber:
          type: string
          description: >-
            Serial number of the certificate, as uppercase hexadecimal without
            separators. Its issuer assigns it, so it tells certificates apart
            only among those of that issuer. Null when it was not recorded.
          example: 4DC32DD214A19795A2111484900663142F513989
          nullable: true
        signatureAlgorithm:
          type: string
          description: Algorithm the certificate signs with. Null when it was not recorded.
          example: SHA256withRSA
          nullable: true
        subject:
          type: string
          description: >-
            Distinguished name of the certificate's subject — the person or
            organization it was issued to. Null when it was not recorded.
          example: CN=Example Ltd,O=Example Ltd,C=CZ
          nullable: true
        trustLists:
          type: array
          items:
            type: string
          description: >-
            Trust lists in which the certificate's chain was found. Empty when
            it was found in none, or when no such check was recorded.
          example:
            - EUTL
        validityEndsAt:
          type: string
          format: date-time
          description: >-
            When the validity period of the certificate ends. Null when it was
            not recorded.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        validityStartsAt:
          type: string
          format: date-time
          description: >-
            When the validity period of the certificate starts. Null when it was
            not recorded.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
      required:
        - fingerprintSha256
        - hasQcComplianceStatement
        - hasQcSscdStatement
        - isSelfSigned
        - issuer
        - keyUsage
        - qcTypes
        - serialNumber
        - signatureAlgorithm
        - subject
        - trustLists
        - validityEndsAt
        - validityStartsAt
      description: >-
        The certificate behind a signature, seal or timestamp, as recorded when
        it was applied.
    documentTermNonFixedTerm:
      type: object
      properties:
        noticePeriod:
          type: string
          description: >-
            Notice the contract requires, as a count followed by one of the
            units `y`, `Q`, `M`, `w`, `d`. The document expires this long after
            the day its termination started.
          example: 3M
          nullable: true
        terminationStartedAt:
          type: string
          format: date-time
          description: >-
            When the termination of the contract started. Null while it has not,
            and the document does not expire.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
      required:
        - noticePeriod
        - terminationStartedAt
      description: Notice terms of a contract that runs until it is terminated.
    documentTermReminder:
      type: object
      properties:
        notifyOwner:
          type: boolean
          description: >-
            Whether the reminder also goes to the document's owner, whoever that
            is when it fires.
        period:
          type: string
          description: >-
            How long before the expiration day the reminder fires, as a count
            followed by one of the units `y`, `Q`, `M`, `w`, `d`. Null when it
            fires on the expiration day itself.
          example: 30d
          nullable: true
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/person'
          description: >-
            The users the reminder is sent to, besides the owner when
            `notifyOwner` is set.
        scheduledAt:
          type: string
          format: date-time
          description: >-
            When the reminder fires for the current expiration. Null while the
            document has no expiration date.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        sentAt:
          type: string
          format: date-time
          description: >-
            When the reminder was sent for the current expiration. Null until it
            is.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        status:
          type: string
          description: >-
            Where the reminder stands for the current expiration.


            - `dormant`: The document has no expiration date, so the reminder
            has no moment to fire at.

            - `scheduled`: Waiting for the moment it fires.

            - `sent`: Already sent for the current expiration date.

            - `skipped`: Its moment had already gone by when it was armed, so it
            is not sent for the current expiration date.
          enum:
            - dormant
            - scheduled
            - sent
            - skipped
          example: scheduled
        time:
          type: string
          description: Time of day the reminder fires at, as `HH:mm` in `timeZone`.
          example: '09:00'
        timeZone:
          type: string
          description: >-
            Time zone the reminder's day and time are read in — the zone of the
            user who configured it. Null when none is recorded.
          example: Europe/Prague
          nullable: true
      required:
        - notifyOwner
        - period
        - recipients
        - scheduledAt
        - sentAt
        - status
        - time
        - timeZone
      description: A reminder sent ahead of a document's expiration.
    documentTermRenewal:
      type: object
      properties:
        lastRenewedAt:
          type: string
          format: date-time
          description: >-
            When the latest automatic renewal was carried out. Null before the
            first one.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        latestExpiresAt:
          type: string
          format: date-time
          description: >-
            The latest moment the automatic renewals move the expiration to —
            the last renewal stops exactly there. Null when no such moment
            limits them: either `maxRenewals` does, or only the overall limit of
            100 renewals applies.
          example: '2030-12-31T22:59:59.999Z'
          nullable: true
        maxRenewals:
          type: integer
          description: >-
            How many automatic renewals the contract may have over its whole
            life. Null when no number limits them: either `latestExpiresAt`
            does, or only the overall limit of 100 renewals applies.
          example: 5
          nullable: true
        mode:
          type: string
          description: >-
            How the contract is renewed.


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

            - `manual`: The contract is renewed by hand — the expiration date
            moves only when somebody changes it.
          enum:
            - auto
            - manual
            - null
          example: auto
          nullable: true
        noticeDueAt:
          type: string
          format: date-time
          description: >-
            The last day the notice can still be given — the expiration day
            minus `noticePeriod` — as the moment that day starts in the time
            zone of the person who last set the contract's dates. A notice given
            at any time during that day is in time. It moves together with the
            expiration, an automatic renewal included. Null without an
            expiration or a `noticePeriod`, and once an automatic renewal has no
            renewal left.
          example: '2027-03-31T22:00:00.000Z'
          nullable: true
        noticePeriod:
          type: string
          description: >-
            Notice the contract requires ahead of its expiration, as a count
            followed by one of the units `y`, `Q`, `M`, `w`, `d`. For an
            automatic renewal it is the notice of non-renewal that stops the
            renewal, for a manual renewal the notice by which a renewal has to
            be agreed. Null when no notice is recorded.
          example: 3M
          nullable: true
        period:
          type: string
          description: >-
            How far each automatic renewal moves the expiration, as a count
            followed by one of the units `y`, `Q`, `M`, `w`, `d`. For a manual
            renewal it is kept for reference only.
          example: 1y
          nullable: true
        renewalCount:
          type: integer
          description: How many times the contract has been renewed automatically so far.
          example: 2
      required:
        - lastRenewedAt
        - latestExpiresAt
        - maxRenewals
        - mode
        - noticeDueAt
        - noticePeriod
        - period
        - renewalCount
      description: How the contract of a document is renewed once it expires.
    documentPendingRecipient:
      type: object
      properties:
        expiresAt:
          type: string
          format: date-time
          description: >-
            The deadline for the recipient to complete their action; after this
            moment the request expires. Null when there is no deadline.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
        hasTurn:
          type: boolean
          description: >-
            Whether it is this recipient's turn to act now. False when they are
            queued behind earlier recipients in an ordered transaction.
          example: true
        order:
          type: integer
          description: >-
            Position of this recipient when recipients act in order; `null` when
            they act in parallel.
          example: 1
          nullable: true
        purpose:
          type: string
          description: >-
            What this recipient is asked to do with the document.


            - `sign`: The recipient is requested to sign the document.

            - `approve`: The recipient is requested to approve the document.

            - `review`: The recipient is requested to review the document.

            - `accept`: The recipient is requested to accept the document.

            - `edit`: The recipient is requested to edit the document.

            - `execute`: The recipient is requested to perform a workflow action
            on the document.
          enum:
            - sign
            - approve
            - review
            - accept
            - edit
            - execute
            - null
          example: sign
          nullable: true
        recipient:
          allOf:
            - $ref: '#/components/schemas/person'
          description: >-
            The recipient that still has to act. Null when it cannot be
            determined.
          nullable: true
        turnStartedAt:
          type: string
          format: date-time
          description: >-
            When the recipient's turn came and their action became awaited. Null
            while their turn has not come yet.
          example: '2024-11-02T09:15:30.000Z'
          nullable: true
      required:
        - expiresAt
        - hasTurn
        - order
        - purpose
        - recipient
        - turnStartedAt
      description: A recipient the document is currently waiting on.
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        Authorize using an API key. Send it in the `Authorization: Bearer
        <api-key>` header. Only API keys are accepted — session tokens are
        rejected. Create your first API key in the Circularo web app; further
        keys can be managed through this API.

````

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