MemorySync
API Reference · Control-plane API

Memory Exports

Create and monitor asynchronous project-scoped exports, then request a short-lived download URL when a job completes.

Shared access contract

ControlRequired contract
AuthenticationBearer access token for an active organization member.
PermissionAuthenticated organization member with export access for the selected project.
Project selectionWhere supported, pass project_id in Python, { projectId } options in Node.js, or X-Project-ID over HTTPS.

Create Export

POST/exports
202 Accepted
FieldTypeContract
formatcsv or jsonl bodyOptional; defaults to csv.
scopefiltered, all, or date_range bodyOptional; defaults to filtered.
filtersobject bodyOptional query, user, tier, source, date, and soft-delete filters.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
result = client.create_export(
format="jsonl",
scope="all",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"job":{"id":"export_abc123","status":"queued","format":"jsonl","scope":"all","progress_percentage":0},"estimated_total":120}
  • Creation queues work; it does not return export bytes.
ConcernContract
ScopeSelected project in the authenticated organization.
Errors400/422 invalid format, scope, or filters; 401/403 access failure; 429 export limit reached.

List Exports

GET/exports
200 OK
FieldTypeContract
limitinteger queryOptional 1–100; defaults to 20.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
exports = client.list_exports(
limit=20,
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"jobs":[{"id":"export_abc123","status":"completed","format":"jsonl","progress_percentage":100}],"total":1}
  • Use job status rather than assuming the latest request completed.
ConcernContract
ScopeOnly export jobs visible in the selected project.
Errors401/403 access failure; 429/5xx retry according to returned metadata.

Get Export

GET/exports/{job_id}
200 OK
FieldTypeContract
job_idstring pathRequired export job ID, 8–64 characters.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
job = client.get_export(
"export_abc123",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"id":"export_abc123","status":"completed","processed_rows":120,"total_rows":120,"progress_percentage":100,"expires_at":"2026-08-02T12:00:00Z"}
  • Completed job metadata can expire; request a fresh download URL when needed.
ConcernContract
ScopeJob must belong to the selected project and caller.
Errors401/403 access failure; 404 unavailable job.

Cancel Export

POST/exports/{job_id}/cancel
200 OK
FieldTypeContract
job_idstring pathRequired queued or running job ID.
Request bodynoneNo JSON body.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
job = client.cancel_export(
"export_abc123",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"id":"export_abc123","status":"cancelled","progress_percentage":35}
  • The returned job is the authoritative cancellation state.
ConcernContract
ScopeJob must belong to the selected project and caller.
Errors401/403 access failure; 404 unavailable job; 409 job is no longer cancellable.

Retry Export

POST/exports/{job_id}/retry
202 Accepted
FieldTypeContract
job_idstring pathRequired failed export job ID.
Request bodynoneNo JSON body.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
result = client.retry_export(
"export_abc123",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"job":{"id":"export_retry456","status":"queued","format":"jsonl","scope":"all"},"estimated_total":120}
  • Retry creates a queued export response; monitor the returned job ID.
ConcernContract
ScopeSource job and retry remain in the selected project.
Errors401/403 access failure; 404 unavailable job; 409 job cannot be retried.

Get Export Download URL

GET/exports/{job_id}/download-url
200 OK
FieldTypeContract
job_idstring pathRequired completed export job ID.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
download = client.get_export_download_url(
"export_abc123",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"download_url":"https://storage.example.com/signed/export","expires_at":"2026-08-01T12:15:00Z","file_size_bytes":2048,"filename":"memorysync-export.jsonl"}
  • The URL is temporary and should be requested only when the user is ready to download.
ConcernContract
ScopeCompleted job must belong to the selected project and caller.
Errors401/403 access failure; 404 unavailable job; 409 export is not ready; 410 artifact expired.

Shared handling