CortexDB Docs
API Reference

POST /v1/export

Export a scope's events as JSONL.

POST
/v1/export
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/export" \  -H "Content-Type: application/json" \  -d '{    "scope": "string"  }'
Empty

Export returns events only — not derived records

POST /v1/export { scope, format } exports events only. On a scope with facts / beliefs / episodes / concepts, the JSONL data contains only the event records — no derived layers. This is consistent with import re-deriving them; just don't expect a full-graph dump. The event export uses the real { id, …, context: { … } } layout.

Response

POST /v1/export → 200 { export_id, format, bytes, data } with the payload inline (one JSON record per line in data). format defaults to jsonl when omitted; any other value → 422 ("supports format=jsonl only"). Stability: beta.

Read the export from the POST response

The export is returned inline in the POST response's data; the export_id is a reference, not a download handle (GET /v1/export/{id} answers 404).

On this page