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

# Archive Session Endpoint

> Archive a session (sets is_archived = True). 404 if not owned.

Independent of delete state. Returns the updated summary.

# IDOR AUDIT PASS — the service filters the write by user_id.



## OpenAPI

````yaml post /api/v1/sessions/{session_id}/archive
openapi: 3.1.0
info:
  title: EDN Memory Engine
  version: 0.1.0
servers:
  - description: EDN evaluation endpoint
    url: https://api.tensorpro.ai
security:
  - EDNApiKey: []
paths:
  /api/v1/sessions/{session_id}/archive:
    post:
      summary: Archive Session Endpoint
      description: |-
        Archive a session (sets is_archived = True). 404 if not owned.

        Independent of delete state. Returns the updated summary.

        # IDOR AUDIT PASS — the service filters the write by user_id.
      operationId: archive_session_endpoint_api_v1_sessions__session_id__archive_post
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionSummary'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    SessionSummary:
      properties:
        created_at:
          title: Created At
          type: string
        id:
          title: Id
          type: string
        is_archived:
          default: false
          title: Is Archived
          type: boolean
        last_message_preview:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Message Preview
        message_count:
          title: Message Count
          type: integer
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        title:
          title: Title
          type: string
        updated_at:
          title: Updated At
          type: string
      required:
        - id
        - title
        - created_at
        - updated_at
        - message_count
        - last_message_preview
      title: SessionSummary
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    EDNApiKey:
      description: >-
        EDN API key presented as 'Bearer <key>' in the Authorization header.
        Create and manage keys from the Console.
      in: header
      name: Authorization
      type: apiKey

````