---
title: "Retrieve user context"
method: GET
path: "/api/v1/context/view"
tags: ["context"]
---

# Retrieve user context

`GET /api/v1/context/view`

Gets the context information for the authenticated user.

## Query parameters

- `file_name` string
- `magic_key` string

## Response `200`

Successfully retrieved context

- ContextViewSuccess
  - `success` boolean, required
  - `contexts` object[], required — List of context items
    - `content` string — The content of the context item
    - `metadata` object — Additional metadata for the context
      - `fileName` string
      - `fileType` string
      - `groupName` string[]
      - `lastModified` string
      - `fileSize` number

## Other responses

- `401` — Unauthorized - User not authenticated
- `403` — Forbidden - User doesn't have required scope
- `500` — Internal Server Error

## Changes

- **2026-01-03** `510cbb709bed` — 1 warning, 5 info
  - removed the optional property `context` from the response with the `200` status
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `500`
  - …2 more
- **2025-12-24** `3f676384b4bb` — 1 info
  - api operation id `viewRawContextNodesForUser` was added
- **2025-12-10** `601abf4c6518` — 2 info
  - added the new optional `query` request parameter `file_name`
  - added the new optional `query` request parameter `magic_key`
- **2025-09-18** `38251f330bf6` — 2 info
  - the endpoint scheme security `bearerAuth` was added to the API
  - the endpoint scheme security `BearerAuth` was removed from the API
- **2025-09-18** `27487dadb0ef` — 2 info
  - the endpoint scheme security `BearerAuth` was added to the API
  - the endpoint scheme security `bearerAuth` was removed from the API

[Full history](https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation/changes/api/v1/context/view/get.md)

---

[API](https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation.md) · [All operations](https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/alchemyst-ai/alchemyst-ai-api-v1-documentation/revisions/af43a0360c78/schema)
