POST /api/memories/exports
Kick off an export job. For small result sets the job runs synchronously and the response includes the inline payload. For larger sets (over 10 000 rows) the job is queued — poll GET /api/memories/exports/:id until status: "completed".
curl -X POST https://www.mnueron.com/api/memories/exports \
-H "Authorization: Bearer $MNUERON_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"namespace": "preferences",
"format": "ndjson",
"created_after": 1735689600000
}'
Body
| Field | Type | Default | Notes |
|---|---|---|---|
format | string | json | json / ndjson / csv |
namespace | string | — | Restrict to a project |
tags | string[] | — | tags @> filter |
metadata_filter | object | — | JSONB @> containment |
created_after / created_before | int | — | Epoch ms |
Response
201 Created
{
"id": "01HQ…",
"status": "completed",
"format": "ndjson",
"row_count": 1432,
"filters": { "namespace": "preferences", "tags": null, "metadata_filter": null,
"created_after": 1735689600000, "created_before": null },
"payload": "{...}\n{...}\n{...}",
"download_url": null,
"created_at": 1737070000000,
"completed_at": 1737070000400
}
payloadis included inline for small results (≤ 10 000 rows). It's a JSON string injsonmode, newline-delimited JSON inndjsonmode, RFC-4180 CSV incsvmode.download_urlis populated by the background worker once large results have been materialized to object storage.statuscyclespending → running → completed | failed.
For very large exports (over 10 000 rows) the response is:
{ "id": "01HQ…", "status": "pending", "row_count": 23104, "payload": null, … }
— poll the get-export endpoint.
Formats
json— single JSON array of memory rowsndjson— one JSON object per line (streaming-friendly)csv— RFC-4180 CSV with header rowid,content,namespace,tags,source,source_ref,created_at,updated_at. Multi-row content and tags arrays are quoted.