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

# Update Session

> Update the title of a session owned by the authenticated user.

Returns 404 (not 403) when the session belongs to another user, so
cross-tenant existence is not leaked.

# IDOR AUDIT PASS — Session.user_id == authenticated user_id is enforced
# in the WHERE clause on both the lookup and the update.



## OpenAPI

````yaml patch /api/v1/sessions/{session_id}
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}:
    patch:
      summary: Update Session
      description: |-
        Update the title of a session owned by the authenticated user.

        Returns 404 (not 403) when the session belongs to another user, so
        cross-tenant existence is not leaked.

        # IDOR AUDIT PASS — Session.user_id == authenticated user_id is enforced
        # in the WHERE clause on both the lookup and the update.
      operationId: update_session_api_v1_sessions__session_id__patch
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSessionRequest'
        required: true
      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:
    UpdateSessionRequest:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      title: UpdateSessionRequest
      type: object
    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

````