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

# Read the stored context for a chat session

> Returns the currently stored context string for the session, or `null` fields if none has been set. This is a read-only call — it never creates records.



## OpenAPI

````yaml /api-reference/openapi.json get /chat-sessions/{sessionId}/context
openapi: 3.0.0
info:
  title: RouteMCP API
  description: >-
    Unified API for integrations. Connect to multiple providers through a single
    API.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.routemcp.io/api/v1
    description: Production
security:
  - bearerAuth: []
tags: []
paths:
  /chat-sessions/{sessionId}/context:
    get:
      tags:
        - HTTP Streaming Chat
      summary: Read the stored context for a chat session
      description: >-
        Returns the currently stored context string for the session, or `null`
        fields if none has been set. This is a read-only call — it never creates
        records.
      operationId: ChatSessionContextController_getContext
      parameters:
        - name: sessionId
          in: path
          required: true
          description: UUID of the chat session whose context you want to retrieve.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: >-
            Context retrieved. `context` and `updatedAt` are `null` if no
            context has been stored.
          content:
            application/json:
              schema:
                type: object
                properties:
                  context:
                    type: string
                    nullable: true
                  updatedAt:
                    type: string
                    format: date-time
                    nullable: true
        '400':
          description: Bad Request — invalid sessionId UUID.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 400
                    default: 400
                  message:
                    type: string
                    example: sessionId must be a valid UUID
                    default: Bad Request
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/chat-sessions/<id>/context
                required:
                  - success
                  - statusCode
                  - message
                  - timestamp
                  - path
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Enter your API key with the Bearer prefix — e.g. Bearer sk_live_xxx
        (production) or Bearer sk_test_xxx (sandbox)

````