---
title: "Export Context"
method: GET
path: "/api/v1/contexts/{context_id}/export"
tags: ["contexts"]
---

# Export Context

`GET /api/v1/contexts/{context_id}/export`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/contexts/{context_id}/export`
- Auth: none declared

Export a context as portable JSON (Issue #950 — GDPR Art.20 portability).

Returns the context metadata, its search configuration, and every memory
visible to the caller — a private context exports only the caller's own
memories, a shared context exports every member's, exactly as
``GET /memory/list`` scopes them. Vectors, neural edges, and sessions are
intentionally omitted: they are regenerated / re-learned on re-import.

This is a context-scoped portability export (anti-lock-in), not a per-user
Art.20 subject-access request; a created_by-filtered cross-context export
is a planned follow-up, as is workspace-wide export.

Raises:
    404: context not found, or the caller lacks read access (uniform —
        does not reveal whether the context exists in another workspace).
    413: the context exceeds the single-export memory cap.

## Path parameters

- `context_id` string, uuid, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- ContextExportResponse: GDPR Art.20-supporting context portability export (Issue #950). A point-in-time JSON snapshot of a context the caller can read: its metadata, search configuration, and every memory visible to the caller (private context -> creator-only; shared -> all members) — the same visibility model as ``GET /memory/list``. Vectors, neural edges, and sessions are intentionally omitted: they are regenerated / re-learned on re-import. This is a context-scoped *portability* export (anti-lock-in), not a per-user Art.20 subject-access request — a created_by-filtered, cross-context personal-data export is a separate follow-up.
  - `format_version` unknown
  - `exported_at` unknown, required
  - `context` unknown, required
  - `search_config` unknown, required
  - `memory_count` unknown, required
  - `memories` unknown, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/09f17f5ada29?raw)
