MemorySync
API Reference

Get Memory

Fetch a single decrypted memory owned by the authenticated principal. The handler enforces tenant + environment + project isolation; rows owned by another user return 404 rather than 403 so the global id space is not leakable.
GET/memory/{memory_id}

Authentication

Accepts a JWT bearer token (Authorization: Bearer eyJ…) or an API key (X-API-Key: ms_live_…). API-key callers should send X-Project-ID unless the key is project-locked. Cross-tenant operators must send X-Tenant-ID.

Path parameters

FieldTypeRequiredDescription
memory_idintegerrequiredPositive integer id. Non-positive values produce 400.

Response

Returns 200 OK with the following body.

FieldTypeRequiredDescription
idintegeroptionalServer-assigned memory id.
textstringoptionalDecrypted body.
tagsstring[]optionalCaller-managed tag list.
importancenumberoptionalRanker hint in [0.0, 1.0].
sourcestringoptionalOrigin label (chat, file, …).
event_typestringoptionalTrigger label (nullable).
metadataobjectoptionalUser-controlled metadata bag.
created_atstringoptionalRFC 3339 UTC.
updated_atstringoptionalRFC 3339 UTC.
200.json
{
"id": 184213,
"text": "User prefers dark mode and concise responses.",
"tags": [
"preferences",
"ui"
],
"importance": 0.62,
"source": "chat",
"event_type": null,
"metadata": {
"user_id": "u_42"
},
"created_at": "2026-05-04T12:30:11Z",
"updated_at": "2026-05-04T12:30:11Z"
}

Errors

StatusCodeDescription
400validation_errorBody or query failed schema validation. The error includes the offending field name.
401unauthenticatedMissing or invalid bearer token / API key.
403forbiddenAuthenticated principal lacks the required scope, role, or project access.
404not_foundTarget resource does not exist or is not visible to the calling tenant.
429rate_limitedPer-IP or per-route limit exceeded. Respect the Retry-After header.
500internal_errorUnhandled server error. Quote the request_id when contacting support.

Examples

cURL
curl -X GET https://api.memorysync.io/memory/EXAMPLE_ID \
-H "Authorization: Bearer $MEMORYSYNC_KEY"
javascript
import { MemorySync } from 'memorysync'
const client = new MemorySync({ apiKey: process.env.MEMORYSYNC_KEY })
const result = await client.request({
method: 'GET',
path: '/memory/EXAMPLE_ID',
})
console.log(result)
python
from memorysync import Client
client = Client(api_key=os.environ["MEMORYSYNC_KEY"])
result = client.request(
method="GET",
path="/memory/EXAMPLE_ID",
)
print(result)

Behavior & notes

Required scope: memories:read. Returns 404 when the row does not exist or is owned by another principal.