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

# Request guarded host chain progression

> Requires owner/admin access to the origin session. Platform session
metadata audit keys cannot advance chains, even for a session they own.
Pass current_step_id from chain-state as expected_step_id. No force,
trigger override, credit-retry query option or completion bypass exists
in this API-key contract. Existing empty-body browser UI/internal calls
retain their legacy response contract and are not described here.

Completion/quorum/timer and role readiness use the normal runtime rules.
Missing predecessor summaries return summary_required blockers without
enqueueing work or changing state; generate those summaries through the
existing summary API/tool, then retry with the same expected step.
Rejected preconditions make no chain writes. A runtime handoff failure
retains the normal runtime pause behavior and returns advance_failed.

A committed transition stores actor/transport evidence atomically. A retry
of that expected step returns its original receipt with replayed=true,
without creating sessions/assignments or redispatching notifications.
The normal runtime may catch up additional already-complete automatic
steps; inspect chain-state again for the latest frontier. Normal progression
may reserve credits and email assigned roster participants.




## OpenAPI

````yaml /api-reference/openapi.yaml post /sessions/{id}/continue-chain
openapi: 3.1.0
info:
  title: Harmonica API
  version: 1.0.0
  description: >
    REST API for the Harmonica structured deliberation platform.

    Provides access to sessions and their data, including creating, updating,
    and querying sessions, plus response submission for active sessions.
  contact:
    name: Harmonica
    url: https://harmonica.chat
servers:
  - url: https://app.harmonica.chat/api/v1
    description: Production
  - url: http://localhost:3000/api/v1
    description: Local development
security:
  - apiKey: []
paths:
  /sessions/{id}/continue-chain:
    post:
      tags:
        - Sessions
      summary: Request guarded host chain progression
      description: >
        Requires owner/admin access to the origin session. Platform session

        metadata audit keys cannot advance chains, even for a session they own.

        Pass current_step_id from chain-state as expected_step_id. No force,

        trigger override, credit-retry query option or completion bypass exists

        in this API-key contract. Existing empty-body browser UI/internal calls

        retain their legacy response contract and are not described here.


        Completion/quorum/timer and role readiness use the normal runtime rules.

        Missing predecessor summaries return summary_required blockers without

        enqueueing work or changing state; generate those summaries through the

        existing summary API/tool, then retry with the same expected step.

        Rejected preconditions make no chain writes. A runtime handoff failure

        retains the normal runtime pause behavior and returns advance_failed.


        A committed transition stores actor/transport evidence atomically. A
        retry

        of that expected step returns its original receipt with replayed=true,

        without creating sessions/assignments or redispatching notifications.

        The normal runtime may catch up additional already-complete automatic

        steps; inspect chain-state again for the latest frontier. Normal
        progression

        may reserve credits and email assigned roster participants.
      operationId: continueChain
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - expected_step_id
              properties:
                expected_step_id:
                  type: string
                  minLength: 1
                  maxLength: 200
      responses:
        '200':
          description: Original or replayed committed transition receipt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChainHostAdvanceReceipt'
        '400':
          description: Invalid request body or unsupported query override
        '401':
          description: Authentication required
        '403':
          description: Origin owner/admin required or metadata audit key refused
        '404':
          description: Session is not part of a chain or chain not found
        '409':
          description: Stale step or unmet prerequisites or failed runtime handoff
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChainControlError'
        '500':
          description: Internal error
components:
  schemas:
    ChainHostAdvanceReceipt:
      type: object
      required:
        - chain_id
        - from_step_id
        - action
        - next_step_id
        - next_session_id
        - actor_id
        - auth_method
        - source
        - occurred_at
        - replayed
      properties:
        chain_id:
          type: string
        from_step_id:
          type: string
        action:
          type: string
          enum:
            - advanced
            - closed
        next_step_id:
          type:
            - string
            - 'null'
        next_session_id:
          type:
            - string
            - 'null'
        actor_id:
          type: string
        auth_method:
          type: string
          enum:
            - session
            - api_key
        source:
          type: string
          enum:
            - api
            - mcp
          description: >-
            Original committing transport; replay preserves the original actor
            and source.
        occurred_at:
          type: string
          format: date-time
        replayed:
          type: boolean
    ChainControlError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - forbidden
                - not_found
                - invalid_request
                - validation_error
                - stale_step
                - transition_blocked
                - advance_failed
                - internal_error
            message:
              type: string
            blockers:
              type: array
              items:
                $ref: '#/components/schemas/ChainBlocker'
    ChainBlocker:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - chain_not_active
            - step_not_active
            - invalid_snapshot
            - unassigned_roles
            - completion_not_met
            - summary_required
        message:
          type: string
        step_id:
          type: string
        session_id:
          type:
            - string
            - 'null'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: |
        API key authentication. Pass your key as a Bearer token.
        Keys use the format `hm_live_<32 hex chars>`.
        Generate keys from your Harmonica dashboard settings.

````

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