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

# Update Session

> Update session metadata.

Replace the entire metadata object for a session. Use this to attach custom attributes
like conversation topics, tags, or application-specific data to your sessions.

**Path Parameters:**
- `custom_user_id` (str): Unique identifier for the user owning the session
- `session_id` (UUID): Session UUID to update

**Body Parameters:**
- `new_metadata` (Dict[str, Any]): New metadata JSON object (replaces existing metadata completely)

**Returns:**
- `session` (SessionInfo): Updated session with new metadata



## OpenAPI

````yaml https://api.recallrai.com/api/openapi.json put /api/v1/users/{custom_user_id}/sessions/{session_id}
openapi: 3.1.0
info:
  title: api-backend
  description: This powers the Recallr AI API Backend
  version: 0.1.0
servers:
  - url: https://api.recallrai.com
    description: Production server
security: []
paths:
  /api/v1/users/{custom_user_id}/sessions/{session_id}:
    put:
      tags:
        - Sessions
      summary: Update Session
      description: >-
        Update session metadata.


        Replace the entire metadata object for a session. Use this to attach
        custom attributes

        like conversation topics, tags, or application-specific data to your
        sessions.


        **Path Parameters:**

        - `custom_user_id` (str): Unique identifier for the user owning the
        session

        - `session_id` (UUID): Session UUID to update


        **Body Parameters:**

        - `new_metadata` (Dict[str, Any]): New metadata JSON object (replaces
        existing metadata completely)


        **Returns:**

        - `session` (SessionInfo): Updated session with new metadata
      operationId: update_session_api_v1_users__custom_user_id__sessions__session_id__put
      parameters:
        - name: custom_user_id
          in: path
          required: true
          schema:
            type: string
            title: The custom user ID owning the session
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: The session ID to update
        - name: X-Recallr-Project-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            title: X-Recallr-Project-Id
        - name: X-Recallr-Api-Key
          in: header
          required: true
          schema:
            type: string
            title: X-Recallr-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSessionRequestBody'
              title: Request body with new_metadata
      responses:
        '200':
          description: Session updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSessionResponse'
        '401':
          description: Authentication required
        '404':
          description: User or session not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
components:
  schemas:
    UpdateSessionRequestBody:
      properties:
        new_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: New Metadata
      type: object
      title: UpdateSessionRequestBody
    UpdateSessionResponse:
      properties:
        session:
          $ref: '#/components/schemas/SessionInfo'
      type: object
      required:
        - session
      title: UpdateSessionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionInfo:
      properties:
        session_id:
          type: string
          format: uuid
          title: Session Id
        status:
          $ref: '#/components/schemas/ProjectUserSessionStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        session_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Summary
        memories:
          anyOf:
            - items:
                $ref: '#/components/schemas/SessionMemoryInfo'
              type: array
            - type: 'null'
          title: Memories
      type: object
      required:
        - session_id
        - status
        - created_at
      title: SessionInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ProjectUserSessionStatus:
      type: string
      enum:
        - pending
        - processing
        - processed
        - failed
        - insufficient_balance
      title: ProjectUserSessionStatus
    SessionMemoryInfo:
      properties:
        memory_id:
          type: string
          format: uuid
          title: Memory Id
        content:
          type: string
          title: Content
      type: object
      required:
        - memory_id
        - content
      title: SessionMemoryInfo

````