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

# Seal a document on the fly

> `POST /documents/seal`

Seals a submitted PDF with a digital certificate and/or a trusted timestamp and returns the sealed file directly in the response. Enable at least one of the two.

Unlike the regular sealing flow, the document is processed transiently — it is never stored in Circularo. This makes the endpoint suitable for system-to-system integrations that only need the sealed output, without managing a document lifecycle through separate upload, seal, download and delete calls.

Although the file is not stored, the operation is fully auditable: an audit log record with the checksum of the received file and another with the checksum of the sealed result are persisted before the response is returned. Together with the operation identifier from the `Document-Id` response header, both the original and the sealed file can later be recognized and the sealing proven. If those records cannot be stored, the call fails rather than returning an unprovable seal.

Sealing consumes transaction capacity from your subscription. `GET /me` reports the seal providers your account can use, and which of them is the default, in `settings.availableSealProviders`. Because the sealed file exists only in the response, this endpoint does not support `Idempotency-Key` — a retry after a lost response seals the file again and consumes capacity again. Keep the returned file, and use the audit log records to tell a repeated attempt from the original.

**Response headers**

- `Document-Id` — Unique identifier assigned to the sealing operation. The document itself is not stored, but the audit log records of the operation can be looked up by this identifier.
- `Original-Checksum` — Checksum of the file as it was received, before sealing, as `<algorithm>:<hex>` (e.g. `sha512:...`). The hexadecimal digest matches the checksum stored in the "created" audit log record.
- `Sealed-Checksum` — Checksum of the sealed file returned in the response body, as `<algorithm>:<hex>` (e.g. `sha512:...`). The hexadecimal digest matches the checksum stored in the "sealed" audit log record.



## OpenAPI

````yaml /api-v2/openapi.json post /documents/seal
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/seal:
    post:
      tags:
        - Documents
      summary: Seal a document on the fly
      description: >-
        `POST /documents/seal`


        Seals a submitted PDF with a digital certificate and/or a trusted
        timestamp and returns the sealed file directly in the response. Enable
        at least one of the two.


        Unlike the regular sealing flow, the document is processed transiently —
        it is never stored in Circularo. This makes the endpoint suitable for
        system-to-system integrations that only need the sealed output, without
        managing a document lifecycle through separate upload, seal, download
        and delete calls.


        Although the file is not stored, the operation is fully auditable: an
        audit log record with the checksum of the received file and another with
        the checksum of the sealed result are persisted before the response is
        returned. Together with the operation identifier from the `Document-Id`
        response header, both the original and the sealed file can later be
        recognized and the sealing proven. If those records cannot be stored,
        the call fails rather than returning an unprovable seal.


        Sealing consumes transaction capacity from your subscription. `GET /me`
        reports the seal providers your account can use, and which of them is
        the default, in `settings.availableSealProviders`. Because the sealed
        file exists only in the response, this endpoint does not support
        `Idempotency-Key` — a retry after a lost response seals the file again
        and consumes capacity again. Keep the returned file, and use the audit
        log records to tell a repeated attempt from the original.


        **Response headers**


        - `Document-Id` — Unique identifier assigned to the sealing operation.
        The document itself is not stored, but the audit log records of the
        operation can be looked up by this identifier.

        - `Original-Checksum` — Checksum of the file as it was received, before
        sealing, as `<algorithm>:<hex>` (e.g. `sha512:...`). The hexadecimal
        digest matches the checksum stored in the "created" audit log record.

        - `Sealed-Checksum` — Checksum of the sealed file returned in the
        response body, as `<algorithm>:<hex>` (e.g. `sha512:...`). The
        hexadecimal digest matches the checksum stored in the "sealed" audit log
        record.
      operationId: sealFile
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/sealFile'
      responses:
        '200':
          description: >-
            The file was sealed. Returns the sealed PDF, with the operation
            metadata in the `Document-Id`, `Original-Checksum` and
            `Sealed-Checksum` response headers.
          content:
            application/pdf: {}
          headers:
            Document-Id:
              description: >-
                Unique identifier assigned to the sealing operation. The
                document itself is not stored, but the audit log records of the
                operation can be looked up by this identifier.
              schema:
                type: string
                example: b8535e02-cf9c-46b1-a2a5-e83b56988ec7
            Original-Checksum:
              description: >-
                Checksum of the file as it was received, before sealing, as
                `<algorithm>:<hex>` (e.g. `sha512:...`). The hexadecimal digest
                matches the checksum stored in the "created" audit log record.
              schema:
                type: string
                example: >-
                  sha512:2970845dfe0287327a52188ac3baa21e4530e21d90bcbb20520bb195f6117893c699bc5829a924ea668c5a2651498335f55d4f0e8286e34d06151a4ad78ff2ad
            Sealed-Checksum:
              description: >-
                Checksum of the sealed file returned in the response body, as
                `<algorithm>:<hex>` (e.g. `sha512:...`). The hexadecimal digest
                matches the checksum stored in the "sealed" audit log record.
              schema:
                type: string
                example: >-
                  sha512:2970845dfe0287327a52188ac3baa21e4530e21d90bcbb20520bb195f6117893c699bc5829a924ea668c5a2651498335f55d4f0e8286e34d06151a4ad78ff2ad
        '400':
          description: >-
            No file was provided, the file is not a PDF, neither
            `useCertificate` nor `useTimestamp` was enabled, the requested seal
            provider is not available for your account, or the file is too large
            for the seal provider.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 400
                type: VALIDATION:INPUT_INVALID
                message: Invalid input
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 401
                type: AUTH:UNAUTHORIZED
                message: Authentication failed
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '402':
          description: >-
            Your subscription does not have enough capacity to seal the document
            or add the requested timestamp(s).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 402
                type: SUBSCRIPTION:NOT_ACTIVE
                message: Subscription not active
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '403':
          description: >-
            Your account does not have permission to seal documents, or to
            choose the TSA server a timestamp comes from.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 403
                type: AUTH:ACCESS_DENIED
                message: Access denied
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '409':
          description: >-
            The sealing configuration is incomplete — for example no default
            seal provider is selected, the seal provider is not configured
            completely or not available on this server, or no TSA provider is
            set for the environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 409
                type: RESOURCE:STATE_CONFLICT
                message: Resource state conflict
                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: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request POST \
              --url https://sandbox.circularo.com/api/v2/documents/seal \
              --header 'Authorization: Bearer <token>' \
              --form 'file=@document.pdf' \
              --form 'fileName=Client agreement' \
              --form 'sealProvider=internal' \
              --form 'tsaServer=internal' \
              --form 'useCertificate=false' \
              --form 'useTimestamp=false'
components:
  schemas:
    sealFile:
      type: object
      properties:
        file:
          type: string
          format: binary
          description: The PDF file to seal, sent as `multipart/form-data`.
        fileName:
          type: string
          maxLength: 255
          description: >-
            Name for the sealed file, without extension. If omitted, the
            uploaded file's name is used. Markup-like text, such as a tag in
            angle brackets, is removed from the name.
          example: Client agreement
          nullable: true
        sealProvider:
          type: string
          pattern: ^[A-Za-z0-9._-]+$
          maxLength: 100
          description: >-
            Name of the seal provider that seals the file when a certificate is
            applied, one of the providers available to your account. Without it
            your account's default seal provider is used.
          example: internal
        tsaServer:
          type: string
          pattern: ^[A-Za-z0-9._-]+$
          maxLength: 200
          description: >-
            Name of the Time Stamping Authority server to use, as advertised by
            `GET /me` in `settings.availableTsaServers`. Leave it out to use
            your environment's default server — naming one requires the
            `set_tsa` right, leaving it out does not. Rejected when the request
            adds no timestamp at all — which is not the same as `useTimestamp`
            being off, since a certificate seal is itself timestamped on an
            environment configured for it.
          example: internal
          nullable: true
        useCertificate:
          type: boolean
          description: >-
            Apply a digital certificate, cryptographically sealing the document
            as proof of its authenticity and integrity.
          example: false
          default: false
        useTimestamp:
          type: boolean
          description: >-
            Add a trusted timestamp from a Time Stamping Authority, proving when
            the document was sealed.
          example: false
          default: false
      description: The PDF file to seal and the sealing options.
    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
  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.