---
title: "Belief provenance chain (T358) walked backward from this context"
method: GET
path: "/api/contexts/{id}/provenance"
tags: ["Contexts"]
---

# Belief provenance chain (T358) walked backward from this context

`GET /api/contexts/{id}/provenance`

## Request

- Base URL: `http://localhost:38200`
- URL: `http://localhost:38200/api/contexts/{id}/provenance`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `token`

BFS over `context_provenance`, following each hop's `source_context_ids` up to `depth` hops (default/max 5).

## Path parameters

- `id` integer, required

## Query parameters

- `depth` integer

## Response `200`

Provenance graph rooted at this context.

- object
  - `root` object
    - `id` integer
    - `name` string
    - `epistemicStatus` string
  - `nodes` object[]
  - `edges` object[]
    - `contextId` integer
    - `sourceContextId` integer
    - `transformType` string
    - `producerId` string, nullable
    - `modelId` string, nullable
    - `promptHash` string, nullable
    - `createdAt` string, date-time
  - `depth` integer
  - `truncated` boolean

## Other responses

- `400`: Invalid id or depth.
- `401`: Missing or invalid credentials.
- `404`: Resource not found (or not visible to the caller).

---

[API](https://skmtc.dev/contextq/apis/contextq-api.md) · [All operations](https://skmtc.dev/contextq/apis/contextq-api/llms.txt) · [OpenAPI document](https://skmtc.dev/contextq/apis/contextq-api/revisions/7afc44056a22?raw)
