MemorySync
API Reference

Export Memory

Export memories available to the authenticated principal and optional project scope as one JSON bundle.

Endpoint and request fields

GET/memory/export
200 OK

This operation has no request body. Client configuration or REST headers provide authentication and optional project scope.

Export the scoped bundle

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
end_user_id="usr_7f3a9c2e",
)
result = client.export_all()
print(result.generated_at, len(result.memories))

Result paths

MeaningPythonNode.jsREST
Resolved userresult.user_idresult.userIduser_id
Exported recordsresult.memoriesresult.memoriesmemories
Generation timeresult.generated_atresult.generatedAtgenerated_at
200-response.json
{"user_id":42,"memories":[{"id":101,"text":"The user prefers concise answers.","tags":["preference"]}],"generated_at":"2026-05-04T12:32:00Z"}

Errors and next action

Correct authentication or scope errors before trying again. If the request is rate limited or the service cannot complete it, keep the export action recoverable and use the returned error metadata. Send only the documented request shape.

Safety notes

Understand the export bundle

Export response

Principal-scoped JSON bundle

The response can be empty and is not paginated by query controls.

Principal
`user_id` / `userId`

Resolved authenticated principal represented by the export.

Records
`memories`

Array of exported memory dictionaries available in scope.

Generated
`generated_at` / `generatedAt`

Time the bundle was produced.

Request body
None

Authentication and optional project context come from client configuration or headers.

Handle exports as sensitive application data

  • Authorize the export action in your application before calling MemorySync.
  • Do not expose the API key or raw service response through a public URL.
  • Stream or store the result only in destinations allowed by your data policy.
  • Safely encode untrusted text and metadata before display.
  • Record completion without logging the exported memory payload.
Was this page helpful?