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

# Retrieve user context

> Gets the context information for the authenticated user.



## OpenAPI

````yaml GET /api/v1/context/view
openapi: 3.1.0
info:
  title: Alchemyst AI API v1 documentation
  version: 1.0.0
  description: v1 API documentation for Alchemyst AI
servers:
  - url: https://platform-backend.getalchemystai.com
    description: production
security:
  - bearerAuth: []
tags: []
paths:
  /api/v1/context/view:
    get:
      tags:
        - context
      summary: Retrieve user context
      description: Gets the context information for the authenticated user.
      operationId: viewRawContextNodesForUser
      parameters:
        - in: query
          name: file_name
          schema:
            type: string
          required: false
          description: Name of the file to retrieve context for
        - in: query
          name: magic_key
          schema:
            type: string
          required: false
          description: Magic key for context retrieval
      responses:
        '200':
          description: Successfully retrieved context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContextViewSuccess'
        '401':
          description: Unauthorized - User not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - User doesn't have required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ContextViewSuccess:
      type: object
      required:
        - success
        - contexts
      properties:
        success:
          type: boolean
          example: true
        contexts:
          type: array
          items:
            type: object
            properties:
              content:
                type: string
                description: The content of the context item
              metadata:
                type: object
                properties:
                  fileName:
                    type: string
                  fileType:
                    type: string
                  groupName:
                    type: array
                    items:
                      type: string
                  lastModified:
                    type: string
                  fileSize:
                    type: number
                description: Additional metadata for the context
          description: List of context items
      example:
        success: true
        contexts:
          - content: Customer asked about pricing for the Scale plan.
            metadata:
              fileName: support_thread_TCK-1234.txt
              fileType: text/plain
              groupName:
                - support
                - pricing
              lastModified: '2025-01-10T12:34:56.000Z'
              fileSize: 2048
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Invalid job id
        status:
          type: number
          example: 400
        error:
          type: object
          example: Error details
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: UNAUTHORIZED
            message:
              type: string
              example: User not authenticated
            details:
              type: object
              additionalProperties: true
        statusText:
          type: string
          description: Error message (detailed in debug mode)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````