POST /v1/memories/batch
Up to 50 memories in one call. For agents that pull many events at once (an inbox, a history, an export). Each
memory has the same fields as in POST /v1/memories.
- Scope:
cerebro:write - Quota: 1 write per memory (a batch of 30 counts as 30)
Parameters
Section titled “Parameters”| Name | Type | Required | Limits |
|---|---|---|---|
memories |
object[] | Yes | 1 to 50. Each one with the body fields of POST /v1/memories |
memories[].idempotencyKey |
string | No, but recommended | Up to 200 characters. The Idempotency-Key header isn’t used here: each memory carries its own |
How it’s processed
Section titled “How it’s processed”- All or nothing at validation. Every memory is checked before any is saved. If one is wrong, the response is
400, the message starts with its position (
memories[1]: …) and nothing is saved. - Quota is checked for the whole batch. If you have fewer writes left than memories, the whole batch gets 429
quota_exceeded. - In order. One person’s memories are processed one at a time, in the order they arrived.
- No duplicates. A memory with an
idempotencyKeythat already arrived returns the one already there. - No waiting. This endpoint doesn’t accept
wait. Check each one atGET /v1/memories/{id}.
Examples
Section titled “Examples”curl https://meemoo.tech/api/v1/memories/batch \ -H "Authorization: Bearer $MEEMOO_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "memories": [ { "kind": "notebook", "notebookKind": "thought", "title": "Acme kickoff", "content": "We agreed to deliver the landing page on December 1.", "source": { "app": "Google Docs", "occurredAt": "2026-11-03T15:00:00Z" }, "idempotencyKey": "doc-881-1" }, { "kind": "person", "title": "Laura Gómez", "content": "Company: Acme\nRole: CFO", "idempotencyKey": "doc-881-2" } ] }'const events = await loadEvents(); // your events, each with a stable idconst memories = events.map((e) => ({ kind: "notebook", notebookKind: "thought", title: e.subject, content: e.summary, source: { app: "My CRM", url: e.url, occurredAt: e.at }, idempotencyKey: `crm-${e.id}`,}));
// 50 per callfor (let i = 0; i < memories.length; i += 50) { const res = await fetch("https://meemoo.tech/api/v1/memories/batch", { method: "POST", headers: { Authorization: `Bearer ${process.env.MEEMOO_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ memories: memories.slice(i, i + 50) }), }); if (!res.ok) throw new Error((await res.json()).error.message);}import osimport requests
events = load_events() # your events, each with a stable idmemories = [ { "kind": "notebook", "notebookKind": "thought", "title": e["subject"], "content": e["summary"], "source": {"app": "My CRM", "url": e["url"], "occurredAt": e["at"]}, "idempotencyKey": f"crm-{e['id']}", } for e in events]
# 50 per callfor i in range(0, len(memories), 50): res = requests.post( "https://meemoo.tech/api/v1/memories/batch", headers={"Authorization": f"Bearer {os.environ['MEEMOO_TOKEN']}"}, json={"memories": memories[i : i + 50]}, ) res.raise_for_status()Response
Section titled “Response”202 Accepted, with one id per memory, in the same order you sent them:
{ "memories": [ { "id": "5b3e9c12-7d4a-4f81-a2c6-0e9d8b7f1a35", "status": "queued" }, { "id": "8c2f1a90-3e6b-4d27-9b15-4f0e7a2c6d18", "status": "queued" } ]}| Field | Type | What it is |
|---|---|---|
memories[].id |
string | Each memory’s id |
memories[].status |
string | queued, or the status of the existing one if the key was repeated |
Errors
Section titled “Errors”| HTTP | code |
When |
|---|---|---|
| 400 | invalid_request |
memories is missing, empty, has more than 50, or one memory fails validation (the message starts with memories[i]:) |
| 401 | unauthorized |
No credential, or it expired or was revoked |
| 403 | insufficient_scope |
The credential doesn’t have cerebro:write |
| 403 | forbidden |
Some memory writes (about or in) in a project, trip or event shared with the person as view only (the message starts with memories[i]:) |
| 404 | not_found |
A ref in some memory’s about, in or links doesn’t exist or isn’t yours |
| 429 | rate_limited, quota_exceeded |
More than 120 per minute, or not enough writes left for the whole batch |