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

# Seal

> Seal unsealed trajectories on a stream into a signed, anchored root.

Exposed for on-demand sealing and for tests; the scheduled sweep calls the
same function. Sealing on demand must never be the only path — evidence
that only becomes provable when someone remembers to ask is not evidence.

**Who may call it:** governance-officer or admin. A workspace API key is refused here: this is an act that belongs to a named person.



## OpenAPI

````yaml /api/openapi.json post /v1/streams/{stream_key}/seal
openapi: 3.1.0
info:
  title: RotaGrant API
  version: 0.1.0
  description: >-
    The HTTP API of a RotaGrant deployment, made from the product's own route
    definitions at the commit named in `x-rotascale-source`. Nothing here is
    written by hand.


    There is no shared endpoint. RotaGrant runs in your environment, and your
    deployment serves its own copy of this description at `/api/docs`. That copy
    is the authority on what your version has and which features are switched
    on; this one is the reference for one commit of the main line. The version
    is 0.1.0: routes and shapes can still change.


    Every route says who may call it. Most need a bearer token from the identity
    provider your deployment uses, held by a person with the role named. The
    routes an SDK calls also accept a workspace API key. A few are open, and say
    why.
servers:
  - url: https://{deployment}
    description: Your own deployment. There is no shared endpoint.
    variables:
      deployment:
        default: rotagrant.internal.example
        description: The host your deployment answers on.
security: []
paths:
  /v1/streams/{stream_key}/seal:
    post:
      tags:
        - Evidence
      summary: Seal
      description: >-
        Seal unsealed trajectories on a stream into a signed, anchored root.


        Exposed for on-demand sealing and for tests; the scheduled sweep calls
        the

        same function. Sealing on demand must never be the only path — evidence

        that only becomes provable when someone remembers to ask is not
        evidence.


        **Who may call it:** governance-officer or admin. A workspace API key is
        refused here: this is an act that belongs to a named person.
      operationId: seal_v1_streams__stream_key__seal_post
      parameters:
        - name: stream_key
          in: path
          required: true
          schema:
            type: string
            title: Stream Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SealOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerToken: []
components:
  schemas:
    SealOut:
      properties:
        sealed:
          type: boolean
          title: Sealed
        batch_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Batch Id
        root_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Root Hash
        leaf_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Leaf Count
        signing_key_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Signing Key Ref
        anchor:
          anyOf:
            - $ref: '#/components/schemas/AnchorOut'
            - type: 'null'
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      required:
        - sealed
      title: SealOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AnchorOut:
      properties:
        provider:
          type: string
          title: Provider
        root_hash:
          type: string
          title: Root Hash
        signature:
          type: string
          title: Signature
        created_at:
          type: string
          format: date-time
          title: Created At
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        warning:
          anyOf:
            - type: string
            - type: 'null'
          title: Warning
        anchored:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Anchored
        why_not:
          anyOf:
            - type: string
            - type: 'null'
          title: Why Not
        beacon:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Beacon
        proves:
          anyOf:
            - type: string
            - type: 'null'
          title: Proves
      type: object
      required:
        - provider
        - root_hash
        - signature
        - created_at
      title: AnchorOut
      description: What was done to fix this root in time.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A token from the identity provider your deployment federates with. It
        identifies a person; their roles in the workspace decide what they may
        do.

````

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