API reference

Simple, powerful, RESTful.

Two core paths: ingest authorised turns and request focused context. Supporting memory controls and structured errors stay visible in the same reference layout.

Authentication

Bearer token access.

All requests require a Bearer token. Include an agent-scoped API key in the Authorization header.

bash
curl https://api.m3mory.ai/v1/status
-H "Authorization: Bearer m3m_sk_..."

Base URL: https://api.m3mory.ai

Rate limits

Clear per-minute limits.

Per-minute limits are applied per API key. Daily allowances and concurrent-turn limits also apply.

Free5/min
Pro20/min
Scale60/min
Ultimate120/min
EnterpriseContracted

Memory ingestion

Capture authorised conversation turns.

Return the actual storage outcome.

json
1POST /v1/agents/:agentId/ingest
2{
3 "userId": "user_123",
4 "turns": [{ "role": "user", "content": "Use short bullets" }]
5}
6
7RESPONSE
8{
9 "stored": true,
10 "memoriesCreated": 1,
11 "extractionStatus": "complete"
12}

Context retrieval

Retrieve focused evidence for an ongoing interaction.

json
1POST /v1/agents/:agentId/context
2{
3 "userId": "user_123",
4 "query": "How should I format this?",
5 "tokenBudget": 2000
6}
7
8RESPONSE
9{
10 "service": "context",
11 "evidence": ["Short bullets", "Decisions first"],
12 "memoriesUsed": 2
13}

Memory controls

Delete one memory within scope.

DELETE/v1/memories/:id

Delete one memory within the authenticated organisation and user scope.

{"deleted":true}

Structured limit response

Daily allowance used.

Capture and recall are paused. m3mory’s daily allowance is used up. Memory resumes at 00:00 UTC. Upgrade to reinstate it now.

json
1HTTP 429 daily_allowance_used
2{
3 "code": "daily_allowance_used",
4 "pausedOperations": ["capture", "recall"],
5 "resetsAt": "00:00 UTC"
6}

Error codes

Predictable responses.

400Bad request. Check the request body.
401Invalid or missing API key.
403The key cannot access this resource.
404Resource not found.
429Per-minute or daily allowance reached. Read the structured response.
500Service error. Retry safely or contact support.