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
| Control | Required contract |
|---|---|
| Authentication | Bearer access token for an active organization member. |
| Permission | Authenticated organization member with export access for the selected project. |
| Project selection | Where supported, pass project_id in Python, { projectId } options in Node.js, or X-Project-ID over HTTPS. |
Create Export
POST/exports
202 Accepted
| Field | Type | Contract |
|---|---|---|
format | csv or jsonl body | Optional; defaults to csv. |
scope | filtered, all, or date_range body | Optional; defaults to filtered. |
filters | object body | Optional query, user, tier, source, date, and soft-delete filters. |
import osfrom memorysync import ControlPlaneClientclient = 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.
| Concern | Contract |
|---|---|
| Scope | Selected project in the authenticated organization. |
| Errors | 400/422 invalid format, scope, or filters; 401/403 access failure; 429 export limit reached. |
List Exports
GET/exports
200 OK
| Field | Type | Contract |
|---|---|---|
limit | integer query | Optional 1–100; defaults to 20. |
import osfrom memorysync import ControlPlaneClientclient = 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.
| Concern | Contract |
|---|---|
| Scope | Only export jobs visible in the selected project. |
| Errors | 401/403 access failure; 429/5xx retry according to returned metadata. |
Get Export
GET/exports/{job_id}
200 OK
| Field | Type | Contract |
|---|---|---|
job_id | string path | Required export job ID, 8–64 characters. |
import osfrom memorysync import ControlPlaneClientclient = 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.
| Concern | Contract |
|---|---|
| Scope | Job must belong to the selected project and caller. |
| Errors | 401/403 access failure; 404 unavailable job. |
Cancel Export
POST/exports/{job_id}/cancel
200 OK
| Field | Type | Contract |
|---|---|---|
job_id | string path | Required queued or running job ID. |
| Request body | none | No JSON body. |
import osfrom memorysync import ControlPlaneClientclient = 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.
| Concern | Contract |
|---|---|
| Scope | Job must belong to the selected project and caller. |
| Errors | 401/403 access failure; 404 unavailable job; 409 job is no longer cancellable. |
Retry Export
POST/exports/{job_id}/retry
202 Accepted
| Field | Type | Contract |
|---|---|---|
job_id | string path | Required failed export job ID. |
| Request body | none | No JSON body. |
import osfrom memorysync import ControlPlaneClientclient = 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.
| Concern | Contract |
|---|---|
| Scope | Source job and retry remain in the selected project. |
| Errors | 401/403 access failure; 404 unavailable job; 409 job cannot be retried. |
Get Export Download URL
GET/exports/{job_id}/download-url
200 OK
| Field | Type | Contract |
|---|---|---|
job_id | string path | Required completed export job ID. |
import osfrom memorysync import ControlPlaneClientclient = 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.
| Concern | Contract |
|---|---|
| Scope | Completed job must belong to the selected project and caller. |
| Errors | 401/403 access failure; 404 unavailable job; 409 export is not ready; 410 artifact expired. |