API Overview
The MemorySync HTTP API is a JSON-over-HTTPS service. This page covers base URL, mounted route groups, authentication, common headers, and the response envelope every endpoint shares.
Base URL
Production: https://api.memorysync.io. MemorySync is a hosted cloud API — all traffic is served from this base URL. There is no version segment in the path — the service uses contract-stable routes; breaking changes ship as new routes (for example, /v1/memory/* coexists with /memory/*).
Mounted route groups
| Prefix | Purpose |
|---|---|
/memory/* | Memory add, query, summarize, forget, export, intelligence, graph, clusters, decisions. |
/sessions | Browser session listing and revocation for the current user. |
/organizations | Tenant lifecycle (create, list, fetch). |
/org/projects | Project CRUD scoped to the active organisation. |
/org/api-keys | API key issuance, rotation, revocation. |
/org/webhooks | Webhook endpoints, deliveries, secret rotation. |
/org/billing | Plan, usage, invoices, alerts, tax profile. |
/org/oauth/* | OAuth app registry and authorization protocol endpoints. |
/api/v1/users/* | User profile, suspend, reactivate, remove. |
/api/v1/integrations/* | Integration catalog, connections, AI provider config. |
/admin/* | Audit logs, tenant settings, team management, alerts (admin tooling). |
/auth/* | Login, signup, refresh, logout, MFA, magic links. |
Common headers
| Header | Notes |
|---|---|
Authorization: Bearer <jwt> | Dashboard / browser / OAuth flows. |
X-API-Key: ms_live_… | Server-to-server. Mutually exclusive with Authorization for API-key auth. |
X-Tenant-ID | Required when the principal can act across tenants (admin, support). |
X-Project-ID | Required for project-scoped endpoints unless the API key is already project-locked. |
X-End-User-ID | Optional override for API-key callers acting on behalf of an end user. |
Idempotency-Key | Recommended on all POST writes; replays return the original response within 24h. |
Response shape
Successful list endpoints return either an offset/limit page ({ items, total, offset, limit, has_next }) or a cursor page ({ items, cursor, has_next }) — see the per-endpoint contract. Single-resource endpoints return the resource as the JSON root.
{
"items": [ /* records */ ],
"total": 412,
"offset": 0,
"limit": 50,
"has_next": true
}Error shape
Every error returns a standard envelope:
{
"error": {
"code": "validation_error",
"message": "field 'text' is required",
"details": { "field": "text" },
"request_id": "req_01HX…",
"timestamp": "2026-05-04T12:30:11Z"
}
}Versioning policy
- Routes never silently change shape. Additive changes (new optional fields) ship without notice.
- Breaking changes ship under a new path prefix; the previous path stays live for a minimum of 12 months.
- Deprecations announce on the changelog and emit a
Deprecationresponse header.