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

# Attach Context

> The server checks current session access and resource permissions on every request. Acceptance does not prove provider execution.

The administrator supplies a ready `fileId` from their own library. Attaching it makes its content available to accepted participants under the session policy. No caller-selected library owner is accepted.


## OpenAPI

````yaml openapi-v3.json POST /v3/sessions/{sessionId}/attachments
openapi: 3.1.0
info:
  title: Navigator
  version: 3.0.0
servers:
  - url: https://api.darwin.so/api
security: []
paths:
  /v3/sessions/{sessionId}/attachments:
    post:
      tags:
        - Sessions
      summary: Attach Context
      description: >-
        The server checks current session access and resource permissions on
        every request. Acceptance does not prove provider execution.
      operationId: attach_session_context
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            pattern: ^asst_[a-f0-9-]{36}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThreadAttachmentRequest'
      responses:
        '200':
          description: Accepted state.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Invalid request.
        '401':
          description: Authentication required.
        '403':
          description: Current access or resource authority denied.
        '404':
          description: Not found.
        '409':
          description: Idempotency or revision conflict.
        '429':
          description: >-
            Request rate or guest session allowance exceeded. The error code
            distinguishes message, operation, agent and concurrency limits.
        '503':
          description: Service unavailable.
      security:
        - apiKey: []
        - bearer: []
components:
  schemas:
    ThreadAttachmentRequest:
      type: object
      properties:
        fileId:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
      required:
        - fileId
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
    bearer:
      type: http
      scheme: bearer

````

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