Docs Memory API
Endpoint reference
Every endpoint, grouped by resource. All requests need a bearer key; all bodies are JSON.
#Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/records | Ingest one record |
| POST | /v1/records:batch | Ingest many records |
| GET | /v1/records/{sourceId} | Read a stored record |
| DELETE | /v1/records/{sourceId} | Delete a record and dependent memories |
| GET | /v1/jobs/{jobId} | Processing state of a send |
| POST | /v1/recall | Ranked memories for a query |
| POST | /v1/answer | A cited answer composed from recall |
| GET | /v1/memories | List memories (filter by state, source, viewer) |
| PUT | /v1/identities/{id} | Create or update an identity |
| GET | /v1/identities/{id} | Read an identity |
| DELETE | /v1/identities/{id} | Remove an identity (optionally its records) |
| PUT | /v1/audiences/{slug} | Create or update an audience |
| GET | /v1/audiences | List audiences |
| DELETE | /v1/audiences/{slug} | Delete an audience |
| POST | /v1/sources | Create a webhook source |
| GET | /v1/sources/{id}/events | Recent webhook deliveries |
| GET | /v1/project | Project, plan and limits |
| GET | /v1/usage | Credits used by day and endpoint |
#POST /v1/records
POST/v1/records
Accept one record for processing.
| Field | Type | Description |
|---|---|---|
text | string, required | The content. Empty or whitespace-only text is rejected. |
sourceId | string | Your stable id. Re-sending replaces the record. Defaults to a hash of text. |
occurredAt | ISO 8601 | When it happened. Defaults to now for new records. |
title | string | Short label returned in sources. |
author | string | Identity id of the writer (≤ 200 chars). |
visibility | string | project, audience:{slug} or user:{id}. |
metadata | object | Your JSON, returned with sources. |
Responses: 202 { jobId, sourceId, state: "queued" }, or 200 { sourceId, state: "unchanged" }.
#POST /v1/recall
POST/v1/recall
Return memories visible to the viewer that answer the query.
| Field | Type | Description |
|---|---|---|
query | string, required | Natural-language question or topic. |
viewer | string, required | Identity whose view to use. |
asOf | ISO 8601 | Return what was current at this time. |
maxTokens | integer | Budget for the response, up to your plan’s limit. |
includeHistory | boolean | Include superseded versions (default true). |
{
"memories": [
{
"id": "mem_7Q2…",
"text": "Halden Outdoor's renewal starts on 1 November 2026.",
"state": "current",
"validFrom": "2026-09-12T15:30:00Z",
"validTo": null,
"visibility": "audience:account-team",
"sources": [{ "sourceId": "crm-4471", "title": "Renewal call notes",
"occurredAt": "2026-09-12T15:30:00Z",
"excerpt": "wants the renewal moved to 1 November" }],
"history": [{ "text": "Renewal starts on 1 October 2026.", "validFrom": "2026-06-03T09:00:00Z",
"validTo": "2026-09-12T15:30:00Z", "sourceId": "email-0603" }]
}
],
"tokens": 214,
"truncated": false
}#POST /v1/answer
POST/v1/answer
Recall, then compose a short answer with citations. Same fields as recall plus question.
{ "answer": "The renewal starts on 1 November 2026 [1]; it moved from 1 October [2].",
"citations": [ { "n": 1, "sourceId": "crm-4471" }, { "n": 2, "sourceId": "email-0603" } ],
"abstained": false }When nothing visible supports an answer, abstained is true and answer says so.
#GET /v1/jobs/{jobId}
GET/v1/jobs/{jobId}
States: queued, processing, completed, failed. Failed jobs include an error object.
#DELETE /v1/records/{sourceId}
DELETE/v1/records/{sourceId}
Deletes the record and memories that depend only on it. Returns 202 with a job id; recall stops returning them when the job completes.
Illustrative interface example · replace the host and key placeholders