How do I export my brain data?

Export all pages from your Unison brain for backups, audits, or migrating to a self-hosted instance.

How do I get all my data out of Unison?

Unison supports full data export. You can list all pages in your brain and fetch their content, giving you a complete portable snapshot of everything stored.

Export via the API

1. List all pages.

curl 'https://brain.unisonlabs.ai/v1/brain/list?prefix=/&limit=100' \
  -H "Authorization: Bearer $UNISON_TOKEN"

The response is { "documents": [ { "path", "title", ... } ] }. Paginate using the cursor returned in the response until you've retrieved all documents.

2. Fetch each page's content.

curl "https://brain.unisonlabs.ai/v1/brain/doc?path=%2Fprivate%2Fkb%2Fmy-note.md" \
  -H "Authorization: Bearer $UNISON_TOKEN"

Each document returns its bodyMd (markdown), title, path, and metadata including created/updated timestamps.

Export via the CLI

If you're using the unison CLI:

unison export ./my-backup-dir

This writes all accessible pages to disk as markdown files, preserving the path structure. It's the fastest way to create a local snapshot.

Using exports for backups

Run an export on a schedule and commit the output to a private git repository. This gives you a version-controlled history of your brain's state over time, independent of Unison's infrastructure.

Re-importing

Documents exported as markdown can be re-imported with PUT /v1/brain/doc (path goes in the JSON body, for cloud) or via unison write (for CLI). The path structure is preserved, so a round-trip import restores your brain to the same state.

On this page