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

# Upload a file for a recipient to hand in

> `POST /share/upload/submittedFile`

Stores a file the recipient is handing in along with their action - an identity document, a filled-in form - and answers with the file's record. Unlike the other uploads it is kept for good rather than temporarily, but it joins the document only once the action that follows names it.

The bytes go straight into the workspace's own storage rather than through the server's memory, so a large document is no trouble. The room the file takes up is charged to the recipient only where they belong to the sender's own organization; anybody else - a recipient from outside the workspace, or one from another organization - has it charged to whoever sent the document.

---

**Share authorization:** Authorize using a share token and a one-time password (if required) to call this endpoint.

**Allowed share object types:** `document`

**Allowed share purposes:** `sign` or `accept` or `approve` or `review`



## OpenAPI

````yaml /api-v1/openapi.json post /share/upload/submittedFile
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:
  /share/upload/submittedFile:
    post:
      tags:
        - Share
      summary: Upload a file for a recipient to hand in
      description: >-
        `POST /share/upload/submittedFile`


        Stores a file the recipient is handing in along with their action - an
        identity document, a filled-in form - and answers with the file's
        record. Unlike the other uploads it is kept for good rather than
        temporarily, but it joins the document only once the action that follows
        names it.


        The bytes go straight into the workspace's own storage rather than
        through the server's memory, so a large document is no trouble. The room
        the file takes up is charged to the recipient only where they belong to
        the sender's own organization; anybody else - a recipient from outside
        the workspace, or one from another organization - has it charged to
        whoever sent the document.


        ---


        **Share authorization:** Authorize using a share token and a one-time
        password (if required) to call this endpoint.


        **Allowed share object types:** `document`


        **Allowed share purposes:** `sign` or `accept` or `approve` or `review`
      operationId: requestSharesPostUploadSubmittedFile
      parameters:
        - in: query
          name: otp
          description: >-
            Authorization password for the share token. Required if the share is
            protected.
          required: false
          schema:
            type: string
            example: '553827'
        - in: query
          name: shareToken
          description: Share token used to access the shared resource.
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9._-]+$
            minLength: 1
            example: cir_82c5fa30d26bc.WBv2Jc8lXo3pQ9rT5uYhZaEwSdFgHjKmNbVcXzLqRt0
        - in: query
          name: tenant
          description: >-
            Tenant the share belongs to. It only has to be given when neither
            the share token nor the address the request arrives on says which
            one it is.
          required: false
          schema:
            type: string
            pattern: ^[a-z0-9]+$
            example: default
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/requestSharesPostUploadSubmittedFile'
      responses:
        '200':
          description: Returns the record of the stored file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseFilesInfo'
        '400':
          description: The file's name could not be used.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 400
                type: VALIDATION:INPUT_INVALID
                message: Invalid input
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '401':
          description: The share is assigned to an internal user who is not signed in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 401
                type: AUTH:UNAUTHORIZED
                message: Authentication failed
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '402':
          description: There is no storage left in the subscription the file is charged to.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 402
                type: SUBSCRIPTION:NOT_ACTIVE
                message: Subscription not active
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '403':
          description: The signed-in user is not the recipient the share was issued to.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 403
                type: AUTH:ACCESS_DENIED
                message: Access denied
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '428':
          description: The recipient has not accepted the Terms and Conditions yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 428
                type: AUTH:MFA_REQUIRED
                message: MFA activation required
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '498':
          description: >-
            The share token cannot be used here - unknown, no longer valid, not
            unlocked, or not issued for an action that takes a handed-in file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 498
                type: SHARE_AUTH:TOKEN_INVALID
                message: Invalid share token
                requestId: 3fa85f6457174562b3fc2c963f66afa6
      security: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request POST \
              --url https://sandbox.circularo.com/api/v1/share/upload/submittedFile \
              --header 'Authorization: Bearer <token>' \
              --form 'file=@document.pdf' \
              --form 'fileName=IDCardFront'
components:
  schemas:
    requestSharesPostUploadSubmittedFile:
      type: object
      properties:
        file:
          type: string
          format: binary
          description: File the recipient is handing in.
        fileName:
          type: string
          description: >-
            Name to file the document under, written without an extension - the
            one the uploaded file carries is kept. The uploaded file's own name
            is used when none is given.
          example: IDCardFront
          nullable: true
    responseFilesInfo:
      type: object
      properties:
        additionalInfo:
          type: string
          description: >-
            What was read out of the document itself when it was processed, kept
            as a JSON-encoded object, so a client has to parse it before use:
            its own descriptive metadata, which archiving standards it turned
            out to comply with, what it carries as embedded attachments, and
            whether it has form fields at all. It is filled only for the formats
            the platform can inspect.
          nullable: true
        category:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Labels the file has been filed under. They carry no meaning to the
            platform and exist to let a client narrow a listing down.
          example:
            - contracts
            - legal
          nullable: true
        checksum:
          type: string
          description: >-
            Checksum of the stored content, computed when the file was written.
            It identifies the bytes rather than the record, so two files holding
            the same content share it.
          nullable: true
        createDate:
          type: string
          format: date-time
          description: When this revision of the file was stored.
          example: '2026-03-14T09:12:44.318Z'
          nullable: true
        createdBy:
          type: string
          description: User who uploaded the file.
          example: jane.doe@example.com
          nullable: true
        documentname:
          type: string
          description: >-
            Name the file is shown under, without an extension. It is the name
            given at upload, or the uploaded file's own name where none was
            given, and it is what a rename changes.
          example: Agreement_2023
          nullable: true
        encoding:
          type: string
          description: Transfer encoding the file arrived in, as reported by the upload.
          nullable: true
        fileExtension:
          type: string
          description: >-
            Extension the file is served under. It follows from the content type
            rather than from the uploaded name, so a mislabelled upload still
            downloads under the right one.
          example: pdf
          nullable: true
        fileId:
          type: string
          description: >-
            Identifier the successive revisions of one file share - a
            replacement gets a new `hash` but keeps this, which is what ties a
            revision chain together.
          nullable: true
        fileType:
          type: string
          description: >-
            Coarse family the format belongs to - a document, a spreadsheet, an
            image, an archive and so on - meant for picking an icon or a filter
            rather than for deciding how to process the file. Anything
            unrecognised falls into a catch-all.
          example: pdf
          nullable: true
        hash:
          type: string
          description: >-
            Identifier of the file, and the value every endpoint taking a file
            takes. It addresses one revision: replacing a file's content yields
            a new hash.
          example: s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj
          nullable: true
        hasPassword:
          type: boolean
          description: >-
            Whether the document itself is locked with a password, which is what
            keeps the platform from reading its pages. It is settled while an
            uploaded file is processed - a file that is not a document is
            recorded as not locked - and stays empty on a file that never went
            through that processing at all, such as a stored image.
          nullable: true
        id:
          type: string
          description: File hash (unique file identifier).
          example: da09a47b4f5b1xv726cfm36l8k1hkxzwmj5mszvfq6szoambdvc44v6i8hrhnu1f
        intent:
          type: string
          description: >-
            What the file is being kept for - a document's main file, an
            attachment, a signature image, a thumbnail and so on. It is what
            ties the file to the thing referencing it, and a file no longer
            claimed by anything is eventually swept away, so a freshly uploaded
            file that has not been attached yet is marked as unclaimed.
          example: main_file
          nullable: true
        isConvertible:
          type: boolean
          description: >-
            Whether this file can be turned into PDF, which is what it takes to
            make it signable. It stays empty where the file's content type is
            not known, so it cannot be decided either way.
        isSigned:
          type: boolean
          description: >-
            Whether the document was found to carry a signature when it was last
            processed. It matters because converting a signed document destroys
            the signature, which is why a conversion declines to run on one by
            default - though the conversion decides that by re-reading the
            document rather than by trusting this.
          nullable: true
        mimetype:
          type: string
          description: >-
            Content type of the stored file, worked out from the content itself
            rather than taken from the upload.
          example: application/pdf
          nullable: true
        organization:
          type: string
          description: >-
            Organization the file was uploaded within, taken from its uploader,
            or the share sender's organization for a file a recipient from
            outside it hands in. It is what the organization-wide storage usage
            is added up over.
          nullable: true
        originalname:
          type: string
          description: >-
            Name the file was uploaded under, extension included, kept as it
            arrived.
          example: agreement.pdf
          nullable: true
        ownedBy:
          type: string
          description: >-
            User the file belongs to, which is who may read and replace it. It
            starts out as the uploader and follows the file if it changes hands
            - a file a share's recipient from outside the sender's organization
            hands in passes to the share's sender, whose storage it then counts
            against.
          example: jane.doe@example.com
          nullable: true
        pages:
          type: integer
          description: >-
            Number of pages the document has. It is known only for the formats
            the platform can inspect.
          example: 3
          nullable: true
        path:
          type: string
          description: >-
            Where the bytes sit in the configured storage backend. It is
            internal bookkeeping and of no use to a client, which addresses a
            file by its hash.
          nullable: true
        pdfPreview:
          allOf:
            - $ref: '#/components/schemas/entityDocumentsPdfPreview'
          description: >-
            PDF rendition of an office file, generated so that the file can be
            previewed without an online editor. It belongs to this exact content
            - a replaced file gets a preview of its own - and stays empty for a
            file that is not an office format or has not been processed yet.
          nullable: true
        public:
          type: boolean
          description: >-
            Whether the file may be fetched without signing in. A public file is
            additionally reachable through a separate public link, which is
            handed out alongside it.
          nullable: true
        publicHash:
          type: string
          description: >-
            Link value that fetches the file without any authentication, made of
            the file's own hash and the secret held for it. It is answered only
            for a file marked public, and it is the only form in which that
            secret ever leaves the server.
          example: >-
            cir_s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwd3q9h8yfgc0mrvu7kx3.WBv2Jc8lXo3pQ9rT5uYhZaEwSdFgHjKmNbVcXzLqRt0
        revision:
          type: integer
          description: >-
            Which revision of the file this is. An uploaded document starts at
            one and each replacement of its content raises it, storing a new
            file rather than overwriting the old one; a file the platform stored
            for itself stays at zero.
          example: 1
          nullable: true
        size:
          type: integer
          description: >-
            Size of the stored file in bytes. It counts against the storage
            quota once the file has become a document's main file, one of its
            attachments or one of the files handed in on it, such as those the
            recipients of its share hand in; a file kept for anything else - an
            image, a thumbnail, a template - is not measured, and neither is one
            still waiting to be claimed.
          example: 102400
          nullable: true
        temp:
          type: boolean
          description: >-
            Whether the file is a working copy still being written - the state a
            file sits in while it is open for editing, before the finished
            content takes the place of the original.
          nullable: true
        thumbnail:
          type: string
          description: >-
            Hash of the preview image generated for this file. It is a file in
            its own right and is fetched like any other; it appears once a
            preview has been asked for.
          nullable: true
        usePdfA:
          type: boolean
          description: >-
            Whether the file was converted for long-term archiving. It records
            what happened to the file, not a request to do it.
          nullable: true
    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
    entityDocumentsPdfPreview:
      type: object
      properties:
        content:
          type: string
          description: >-
            Identifier of the PDF preview in the binary storage, set once the
            preview is ready. The preview is a separate stored file and is
            downloaded like any other file.
          example: p7kd2m4s9xq1v8b3n6c0z5w2e7r4t1y9u3i6o8a2s5d7f0g4h1j3k6l9z2x5c8v0b4
          nullable: true
        failureReason:
          type: string
          description: >-
            Why the last attempt to generate the preview failed; empty unless it
            failed.


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

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

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

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


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

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

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

            - `in_progress`: The PDF preview is being generated.
          enum:
            - failed_irrecoverable
            - failed_recoverable
            - finished
            - in_progress
            - null
          nullable: true
        statusDate:
          type: string
          format: date-time
          description: >-
            When the preview last changed its status - when generating it
            started, finished or failed.
          nullable: true
  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.