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

# Reference a session as a project context source

> Attach a snapshot of another session's SESSION.md as shared context for the project. The source session stays in its current project, and changes to its SESSION.md do not automatically update the copy.

Use a Harmonica API key with editor access on the destination project and viewer access on the source session. The account must have context-source access (Pro, LTD, or Enterprise). The source needs a SESSION.md eligible to be copied under the source session's current sharing and contribution settings.

This REST operation is available to integrations. To add a reference to one session in the app, use its Sources panel. Project-wide references share the project's 20-source static allowance with ordinary files.




## OpenAPI

````yaml /api-reference/openapi.yaml post /projects/{id}/context-sources/session
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:
  /projects/{id}/context-sources/session:
    post:
      tags:
        - Context Sources
      summary: Reference a session as a project context source
      description: >
        Attach a snapshot of another session's SESSION.md as shared context for
        the project. The source session stays in its current project, and
        changes to its SESSION.md do not automatically update the copy.


        Use a Harmonica API key with editor access on the destination project
        and viewer access on the source session. The account must have
        context-source access (Pro, LTD, or Enterprise). The source needs a
        SESSION.md eligible to be copied under the source session's current
        sharing and contribution settings.


        This REST operation is available to integrations. To add a reference to
        one session in the app, use its Sources panel. Project-wide references
        share the project's 20-source static allowance with ordinary files.
      operationId: addProjectContextSourceSession
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - source_ref
              properties:
                source_ref:
                  type: string
                  description: ID of the session whose SESSION.md to snapshot.
                title:
                  type: string
                  description: Display title. Defaults to the source session's topic or ID.
            example:
              source_ref: hst_source_session
              title: Prior workshop brief
      responses:
        '201':
          description: Project context source created. Returns its ID and metadata.
        '400':
          description: Invalid request or source SESSION.md unavailable for copying
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Insufficient project permissions, source permissions, or
            context-source access
        '422':
          description: Static source limit reached (20 per project)
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Invalid or missing API key
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - forbidden
                - not_found
                - validation_error
                - rate_limited
                - payment_required
                - transcript_revision_changed
                - needs_rebuild
                - source_changed
                - internal_error
                - unprocessable
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  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.