> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memory.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Take everything with you

> A full export of a space — every memory and entity — as a file you hold. Dashboard-only: an API key cannot take one.

[← All use cases](https://docs.memory.anonalabs.com/use-cases/overview.md)

[API reference](https://docs.memory.anonalabs.com/guides/export.md)

## The scenario

Two reasons to export, and they arrive at very different moments. One is
routine: somebody asks whether your memory layer is a lock-in risk, and the only
answer that lands is a file. The other is urgent: you are about to
[delete a space](https://docs.memory.anonalabs.com/use-cases/one-space-or-many.md), or answer a
[deletion request](https://docs.memory.anonalabs.com/use-cases/delete-a-users-memories.md), and the export is the
last thing standing between a mistake and permanent loss.

**What this recipe shows that no other does:** a surface an API key **cannot
reach**. A bundle is a complete copy of a space, so exports deliberately need a
signed-in owner rather than a long-lived key — the endpoints answer an API key
with `401 session_required`, and neither SDK has a method for them. This is the
one recipe on this site you run from the dashboard.

## Step 1 — Ask for one

Dashboard → **Spaces** → the space → **Exports** tab → **Request export**.

It builds in the background — a large space takes a while — and you are
emailed when it is ready. One export per space per 24 hours.

## Step 2 — Download it

Back on the same tab, click **Download**. The link behind the button is
generated on the click and lives for five minutes, which is why the "ready"
email points at the dashboard rather than at the file.

## Step 3 — Actually keep it

Move `export-{space}-{date}.zip` somewhere that is not your Downloads folder.
An export you generated and never kept is not a backup: bundles are deleted
after 7 days.

## Scripting it

If you need this in a script — a quarterly backup job, say — the dashboard's
three endpoints accept a **session token** (the one sign-in returns), never an
API key. See [Export Your Memory](https://docs.memory.anonalabs.com/guides/export.md#the-endpoints-behind-the-tab):

```python theme={null}
import httpx

H = {"Authorization": f"Bearer {SESSION}"}  # a signed-in session, not an API key
BASE = "https://api.anonalabs.com"

job = httpx.post(f"{BASE}/v1/spaces/support/exports", headers=H).json()
# ...poll GET {BASE}/v1/spaces/support/exports until the job is ready, then:
url = httpx.get(f"{BASE}/v1/spaces/support/exports/{job['job_id']}/download", headers=H).json()
with httpx.stream("GET", url["download_url"]) as r, open("support-export.zip", "wb") as f:
    for chunk in r.iter_bytes():
        f.write(chunk)
```

Session tokens expire, so this belongs in something a person runs, not in an
unattended cron with a stored credential.

## Evals

An untested backup is not a backup:

1. Export a small space and download it.
2. Open it. Count the lines in `memories.jsonl` and compare against
   `list_memories(prefer_observations=False)`'s `total` — the default list hides
   raw facts a note already covers, and the bundle keeps both.
3. Confirm it contains the **raw facts**, not just the consolidated
   observations — a takeout that dropped the evidence layer is not a takeout.
4. Do this once a quarter rather than once, ever.

## Guardrails

> [!WARNING]
>
> **Export before you delete, every time.** Space deletion and memory deletion
> are both irreversible with no recycle bin. The export is the only recovery
> path, and it has to exist *before* the mistake.

* **Exports are owner-only.** A visitor to a shared space cannot take a copy of
  someone else's space, which is the correct behaviour and occasionally
  surprising.
* **Bundles expire** — `expires_at` on the job says when. Re-export rather than
  hoarding download URLs.
* **The bundle is plain readable content.** It is the most concentrated copy of
  your customers' data that will ever exist; treat the file accordingly.
* **There is no import endpoint to pair with this.** Exports answer "can I
  leave"; they do not currently give you "and come back". Do not design a
  migration around round-tripping one.

## Where to go next

[Delete a user's memories, provably](https://docs.memory.anonalabs.com/use-cases/delete-a-users-memories.md) — where
the export is step two of a runbook rather than an insurance policy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.