Authentication

All API requests require a Bearer token in the Authorization header.

request headers
Authorization: Bearer your_token_here Content-Type: application/json
Requests with a body must include Content-Type: application/json. Responses use the same content type.
read_only

Read-Only Token

Access GET endpoints only. Perfect for AI tools that consume context.

full_access

Full Access Token

Access all endpoints — GET, POST, PATCH, DELETE. For management and automation.

Rate Limiting

API requests are limited to 100 requests per minute per token, counted separately for each kind of resource. A 429 carries a Retry-After: 60 header.

Requests with a token that isn't valid get a 401. Past 60 of those in a minute from one address, they get a 429 instead, here and on MCP. A valid token from the same address keeps working.

429 response 429 Too Many Requests
{ "error": { "code": "RATE_LIMITED", "message": "Too many requests", "status": 429 } }

Error Handling

All errors follow a consistent JSON structure with a code, message, and HTTP status.

error format
{ "error": { "code": "ERROR_CODE", "message": "Human-readable description", "details": { ... }, // optional, for validation errors "status": 4xx } }
StatusCodeDescription
400BAD_REQUESTThe request body isn't valid JSON, or the query string isn't valid UTF-8
401UNAUTHORIZEDInvalid or missing access token
403FORBIDDENInsufficient permissions, an inactive workspace, changing in place, deleting, archiving or restoring something you neither own nor administer, or removing a link only an admin or its creator can remove
404NOT_FOUNDResource or path not found
406NOT_ACCEPTABLEThe endpoint has no JSON representation
422VALIDATION_ERRORInvalid request data (may include details)
429RATE_LIMITEDRate limit exceeded
500INTERNAL_SERVER_ERRORSomething went wrong on the server

Pagination and Limits

Lists report their position in X-Page, X-Per-Page, X-Total, X-Total-Pages and Link headers. A page past the end returns an empty list. A page that isn't a positive integer is a 422, and so is any query parameter sent as a list or an object, such as tags[]=x; only include also accepts a list. A per_page or limit that isn't a positive integer falls back to its default. A limit applies to a value you set: a new version can carry forward an older value over it.

FieldLimit
workspace[name]100 characters
workspace[description]500 characters
memory[title]255 characters
memory[content]1 MB
memory[source]255 characters
memory[tags]50 tags, each up to 100 characters

Workspaces

List Workspaces

Returns all active workspaces for the current account.

GET/workspaces.json
Parameters
NameTypeDescription
pageintegerPage number (default: 1)
response200 OK
[ { "id": 1, "name": "Project Alpha", "description": "Main project workspace", "memories_count": 42, "archived": false, "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-02-04T14:22:00Z", "url": "https://recuerd0.ai/workspaces/1" } ]
Pagination headers X-Page, X-Per-Page, X-Total, X-Total-Pages, and Link are included in all list responses.

Get Workspace

Returns a single workspace with memory count, state and pinned status. state is active or archived; a deleted workspace answers 404.

GET/workspaces/:id.json
response200 OK
{ "id": 1, "name": "Project Alpha", "description": "Main project workspace", "memories_count": 42, "archived": false, "state": "active", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-02-04T14:22:00Z", "url": "https://recuerd0.ai/workspaces/1", "pinned": true, "pinned_at": "2026-02-01T09:00:00Z", "pin_origin": "user" }

Get Workspace Context

Returns a compact "wake-up" snapshot of a workspace for AI agents — workspace metadata, a small set of orienting memories, and stats. If the requesting user chose any pins in the workspace, you get those, and context_source is pins. If their only pins are ones recuerd0 placed, such as the seeded Map, those come first, followed by the workspace's most recently updated memories up to limit. With no pins at all, you get the most recently updated memories. Both of those report recent, unless the workspace holds nothing beyond its placed pins. Supports HTTP caching via ETag.

GET/workspaces/:id/context.json
Query Parameters
NameTypeDefaultDescription
limitinteger10Maximum memories to return (1–50).
include_bodybooleantrueWhether to include each memory's body content.
max_body_charsinteger500Maximum characters of body to return per memory (100–5000). Longer bodies are truncated.
categorystringFilter memories to one category. See Memory Categories.
includestringPass obsolete to include retired memories, and on search and pinned inactive for archived/deleted workspaces. See Obsolete Memories.
response200 OK
{ "workspace": { "id": 1, "name": "Project Alpha", "description": "Main project workspace", "memories_count": 42, "state": "active", "updated_at": "2026-04-01T12:00:00Z", "url": "https://recuerd0.ai/workspaces/1" }, "memories": [ { "id": 17, "title": "Architecture Notes", "source": "manual", "category": "decision", "tags": ["design", "core"], "pinned_at": "2026-03-28T09:14:00Z", "updated_at": "2026-04-01T11:42:00Z", "url": "https://recuerd0.ai/workspaces/1/memories/17", "body": "# Architecture\n\nThe system is split into…", "body_truncated": true, "links_count": 3 } ], "context_source": "pins", "stats": { "total_memories": 42, "total_pinned": 3, "returned": 1, "returned_pinned": 1 }, "generated_at": "2026-04-06T10:00:00Z" }

The pinned_memories array and stats.returned_pinned remain as deprecated aliases of memories and stats.returned. stats.total_memories is the workspace's total and does not change with include; the memories returned and stats.total_pinned do.

Create Workspace

Creates a new workspace. It starts with a seeded, auto-pinned Map memory explaining how to use it, so memories_count is 1. Pass start_with_map: false to start empty. The Location header holds the new workspace's URL.

POST/workspaces.jsonfull_access
Parameters
NameTypeDescription
workspace[name]stringrequiredWorkspace name (max 100 characters)
workspace[description]stringWorkspace description (max 500 characters)
workspace[start_with_map]booleanfalse skips the seeded Map (default: true)
request
{ "workspace": { "name": "New Project", "description": "A new workspace for the team" } }
response201 Created
{ "id": 2, "name": "New Project", "description": "A new workspace for the team", "memories_count": 1, "archived": false, "state": "active", "created_at": "2026-02-04T15:00:00Z", "updated_at": "2026-02-04T15:00:00Z", "url": "https://recuerd0.ai/workspaces/2" }

Update Workspace

Updates an existing workspace. Only its owner or an account admin can do this; anyone else gets 403.

PATCH/workspaces/:id.jsonfull_access
Parameters
NameTypeDescription
workspace[name]stringWorkspace name
workspace[description]stringWorkspace description
response200 OK
Returns the updated workspace object.

Delete Workspace

Soft-deletes a workspace and everything in it. From then on the workspace, its memories and everything under them answer 404 over the API. The export keeps working, so you can still take a copy.

DELETE/workspaces/:id.jsonfull_access
response204 No Content
Empty response body.
A deleted workspace stays recoverable for 30 days. Restoring is browser-only: its owner or an admin does it from the Deleted Workspaces page in the web app, and there is no REST endpoint for it.

Pass or Take Ownership

Workspaces and memories report an owner_id, which starts as whoever created them; null means the account admin. The owner can pass a record to anyone still on the account. An admin who doesn't own it can only name themselves, and can pass it on once they do. Anyone else gets 403. The receiver doesn't have to accept, and passing a workspace leaves the owners of the memories in it unchanged.

PATCH/workspaces/:id/ownership.jsonfull_access
PATCH/workspaces/:workspace_id/memories/:id/ownership.jsonfull_access
Parameters
NameTypeDescription
user_idintegerWho receives it (required)
response200 OK
{ "id": 12, "owner_id": 7 }

Archive Workspace

Archives a workspace. Archived workspaces become read-only. Only the workspace's owner or an account admin can archive or delete it; anyone else gets 403.

POST/workspaces/:id/archive.jsonfull_access
response200 OK
Returns the workspace with "archived": true

Export Workspace

Returns every memory in a workspace, with all its versions, as one JSON document. Available at any time and not subject to the monthly limit on full account exports.

GET/workspaces/:id/export.json

Unarchive Workspace

Restores an archived workspace.

DELETE/workspaces/:id/archive.jsonfull_access
response200 OK
Returns the workspace with "archived": false

Get Workspace Stats

Returns counts and trends for a workspace, computed server-side, without shipping memory bodies. Takes the same include parameter as the lists.

GET/workspaces/:workspace_id/stats.json
response200 OK
{ "workspace": { "id": 1, "name": "Engineering", "url": "https://recuerd0.ai/workspaces/1" }, "total_memories": 495, "total_versions": 631, "total_links": 42, "counts_by_category": { "decision": 120, "discovery": 88, "preference": 15, "general": 272 }, "top_tags": [ { "tag": "api", "count": 37 } ], "memories_by_week": { "2026-18": 12 }, "generated_at": "2026-07-15T12:00:00Z" }

Get Merge Candidates

Returns clusters of likely-duplicate memories, scored by shared tags and title similarity. These are read-only suggestions: merging stays a manual action. Takes min_score (0–1, default 0.5; anything else is a 422) and include.

GET/workspaces/:workspace_id/merge_candidates.json
response200 OK
{ "workspace": { "id": 1, "name": "Engineering", "url": "https://recuerd0.ai/workspaces/1" }, "candidates": [ { "score": 0.82, "reasons": ["similar title", "shared tags"], "memories": [ /* two or more memories */ ] } ], "generated_at": "2026-07-15T12:00:00Z" }

Memories

Memory Categories

Every memory carries exactly one category from a locked four-value enum. Category defaults to general and is used to filter list, search, and workspace context endpoints. Versions inherit the parent memory's category unless overridden.

ValueLabelPurpose
decisionDecisionArchitecture choices, library picks, tradeoffs with stated reasoning
discoveryDiscoveryNon-obvious findings — gotchas, root causes, patterns, library quirks
preferencePreferenceUser-stated rules ("always X", "never Y")
generalGeneralCatch-all and default
The category query parameter is supported on list, search, and workspace context endpoints to filter results to a single category.

Obsolete Memories

A memory tagged obsolete, superseded, or deprecated is retired knowledge. Those three tags are excluded by default from search, listings, workspace context, stats, and merge candidates — so an agent loading context is never woken on a decision that was already reversed. Matching is case-insensitive and whole-tag: Superseded counts, deprecated-api is an ordinary tag.

BehaviorDetail
DefaultObsolete memories are hidden from /search.json, both memory list endpoints, workspace context, stats, and merge candidates
Opt inPass include=obsolete on any of those endpoints to get them back
Unknown tokensIgnored, never an error — include=obsolete,future_token behaves exactly as include=obsolete
Filtering by the tagThe flag is still required: ?tags=obsolete alone returns [], ?tags=obsolete&include=obsolete returns the memories
Fetching by identityNever filtered — /memories.json?ids=1,2,3 and the single-memory endpoint always return what you asked for
Counting what was hidden/search.json reports the withheld count as obsolete_hidden
Inactive workspacesA second default filter: memories in an archived or deleted workspace are hidden from /search.json and /memories/pinned.json. Pass include=inactive to review them; the withheld count is inactive_hidden, and the two counts never overlap. Tokens compose: include=obsolete,inactive
Status in the payloadEvery memory carries obsolete, current, root_id and workspace.state (active, archived, deleted), so you can gate context injection without parsing tags
examples
GET /search.json?q=rollout # current memories only GET /search.json?q=rollout&include=obsolete # plus the retired ones GET /workspaces/1/stats.json?include=obsolete # every figure counts them GET /search.json?q=rollout&include=inactive # plus archived/deleted workspaces
Retiring a memory is a tag, not a deletion. Nothing is removed, the version history stays intact, and the workspace UI keeps listing obsolete memories — marked with a distinct badge — so you can still see and manage everything you own.

List Memories

Returns all memories (latest versions only) for a workspace. Supports filtering by title pattern, tags, and source.

GET/workspaces/:workspace_id/memories.json
Parameters
NameTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (1–100, default: 25)
titlestringGlob pattern for title matching. * matches any characters, ? matches one. Every other character, including % and _, means itself
tagsstringComma-separated tag list, ignoring case. Returns memories with ALL specified tags. A tag that itself contains a comma can't be filtered on
sourcestringExact match on source field
categorystringFilter to one category. See Memory Categories.
sortstringSort field: updated_at (default), created_at, title. Anything else is a 422
directionstringSort direction: desc (default), asc. Anything else is a 422
includestringPass obsolete to include retired memories, and on search and pinned inactive for archived/deleted workspaces. See Obsolete Memories.
examples
GET /workspaces/1/memories.json?title=Meeting* GET /workspaces/1/memories.json?tags=api,design&sort=title&direction=asc GET /workspaces/1/memories.json?category=decision&per_page=50
response200 OK
[ { "id": 1, "title": "Meeting Notes", "tags": ["meetings", "q1"], "source": "manual", "category": "decision", "version": 1, "version_label": "v1", "has_versions": false, "obsolete": false, "current": true, "root_id": 1, "links_count": 0, "created_at": "2026-01-20T09:00:00Z", "updated_at": "2026-02-03T16:45:00Z", "url": "https://recuerd0.ai/workspaces/1/memories/1", "workspace": { "id": 1, "name": "Project Alpha", "state": "active", "url": "https://recuerd0.ai/workspaces/1" }, "pinned": false, "pinned_at": null, "pin_origin": null } ]
Each new version gets its own id, while root_id stays the same, so root_id is the one to store if you want to refer to the memory across saves.

Browse Memories

Returns memories across all active workspaces for the current account. Supports the same filtering parameters as List Memories. JSON-only endpoint.

GET/memories.json
Parameters
NameTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (1–100, default: 25)
workspace_idintegerFilter to a specific workspace
idsstringComma-separated memory ids. Batch-fetches exactly those memories, still account-scoped and paginated. An old version's id returns its memory, as the current version
titlestringGlob pattern for title matching. * matches any characters, ? matches one. Every other character, including % and _, means itself
tagsstringComma-separated tag list, ignoring case. Returns memories with ALL specified tags. A tag that itself contains a comma can't be filtered on
sourcestringExact match on source field
categorystringFilter to one category. See Memory Categories.
sortstringSort field: updated_at (default), created_at, title. Anything else is a 422
directionstringSort direction: desc (default), asc. Anything else is a 422
includestringPass obsolete to include retired memories, and on search and pinned inactive for archived/deleted workspaces. See Obsolete Memories.
examples
GET /memories.json?title=*architecture* GET /memories.json?tags=api,design&sort=title&direction=asc GET /memories.json?workspace_id=1&source=manual
Only returns memories from active (non-archived, non-deleted) workspaces. Each memory includes its workspace in the response. Same response format and pagination headers as List Memories.

Get Memory

Returns a memory with its content. Supports line range parameters to read specific portions.

GET/workspaces/:workspace_id/memories/:id.json
Parameters
NameTypeDescription
line_startintegerFirst line to return (1-based, inclusive). Default: 1. Must be a positive integer
line_endintegerLast line to return (1-based, inclusive). Default: last line. Must be a positive integer
examples
GET /workspaces/1/memories/1.json GET /workspaces/1/memories/1.json?line_start=1&line_end=20 GET /workspaces/1/memories/1.json?line_start=50&line_end=75
response200 OK
{ "id": 1, "title": "Meeting Notes", "version": 1, "source": "manual", "category": "decision", "tags": ["meetings", "q1"], "created_at": "2026-01-20T09:00:00Z", "updated_at": "2026-02-03T16:45:00Z", "url": "https://recuerd0.ai/workspaces/1/memories/1", "content": { "body": "# Meeting Notes\n\nDiscussed Q1 goals...", "total_lines": 142, "line_start": 1, "line_end": 142 }, "links_count": 3, "workspace": { "id": 1, "name": "Project Alpha", "url": "https://recuerd0.ai/workspaces/1" } }
The content object always includes total_lines, line_start, and line_end. When line range parameters are provided, body contains only the requested lines. A line_start past the last line returns an empty body, because a memory can shrink between two reads. Returns 422 if line_start > line_end.
Grep Mode Parameters
NameTypeDescription
modestringSet to grep to search within the memory
qstringSearch query required
contextintegerLines before and after each match (0–10, default: 0)
beforeintegerLines before match, overrides context (0–10)
afterintegerLines after match, overrides context (0–10)
examples
GET /workspaces/1/memories/1.json?mode=grep&q=architecture GET /workspaces/1/memories/1.json?mode=grep&q=design&context=2
response200 OK
{ "id": 1, "title": "Meeting Notes", ... "content": { "total_lines": 142, "matches": [ { "line_number": 12, "line": "Discussed architecture decisions.", "context_before": ["## Design"], "context_after": ["The team agreed on microservices."] } ] } }
In grep mode, the content object returns matches and total_lines instead of body. Returns 422 if q parameter is missing.
Workflow: grep, then fetch a window

For large memories, prefer a two-step read: call grep mode first to find each match's line_number, then call again with line_start/line_end to fetch a window of surrounding context.

step 1 — find matches
GET /workspaces/1/memories/1.json?mode=grep&q=TODO
response200 OK
{ "content": { "total_lines": 412, "matches": [ { "line_number": 47, "line": "TODO: revisit caching" } ] } }
step 2 — fetch a 16-line window around line 47
GET /workspaces/1/memories/1.json?line_start=40&line_end=55
There is no head= or tail= parameter. Head is line_start=1&line_end=N; tail is line_start=(total_lines - N + 1)&line_end=total_lines. Because total_lines is echoed on every response, clients can compute tail without an extra round trip.

Create Memory

Creates a new memory with content.

POST/workspaces/:workspace_id/memories.jsonfull_access
Parameters
NameTypeDescription
memory[title]stringMemory title (max 255 characters)
memory[content]stringMemory body (Markdown, max 1 MB)
memory[source]stringSource identifier (max 255 characters)
memory[tags]arrayArray of tag strings (max 50 tags, 100 characters each). A value of the wrong type is a 422 naming the field.
memory[category]stringOne of decision, discovery, preference, general (defaults to general). See Memory Categories.
request
{ "memory": { "title": "API Documentation", "content": "# Overview\n\nThis document describes...", "category": "decision", "tags": ["docs", "api"] } }
response201 Created
Returns the created memory object with content.

Update Memory

Updates an existing memory in place. Only its owner or an account admin can do this; anyone else gets 403 and can add a version instead.

PATCH/workspaces/:workspace_id/memories/:id.jsonfull_access
Parameters
NameTypeDescription
memory[title]stringMemory title
memory[content]stringMemory body
memory[source]stringSource identifier
memory[tags]arrayArray of tags
memory[category]stringOne of decision, discovery, preference, general. See Memory Categories.
response200 OK
Returns the updated memory object with content.

Delete Memory

Deletes a memory and all its versions. Only the memory's owner, its workspace's owner or an account admin can do this; anyone else gets 403. Use the memory's root id or its current version's id: an older version's id returns 422 and deletes nothing.

DELETE/workspaces/:workspace_id/memories/:id.jsonfull_access
response204 No Content
Empty response body.

List Pinned Memories

Returns the current user's pinned memories across all workspaces, in the same shape as List Memories. The list isn't paginated, because the number of pins a user can have is capped. Obsolete pins and pins in archived or deleted workspaces are hidden unless you pass include=obsolete,inactive.

GET/memories/pinned.json

Memory Versions

List Versions

Lists every version of a memory, oldest to newest, in the same shape as List Memories without the pin fields. :memory_id can be any version's id.

GET/workspaces/:workspace_id/memories/:memory_id/versions.json

Get Version

Returns a single version with its content, in the same shape as Get Memory.

GET/workspaces/:workspace_id/memories/:memory_id/versions/:id.json

Create Version

Creates a new version of a memory. Omitted fields come from its current version. Given the id of a specific version, they come from that version instead. A result identical to the current version is refused with 422; a change note alone is not a change. Sending content blank is also a 422, because it would wipe the memory's current text.

POST/workspaces/:workspace_id/memories/:memory_id/versions.jsonfull_access
Parameters
NameTypeDescription
version[title]stringVersion title (defaults to the current version)
version[content]stringVersion body (defaults to the current version)
version[source]stringSource identifier (defaults to the current version)
version[tags]arrayTags (defaults to the current version)
version[change_note]stringWhy this version exists, in one line (optional, max 280 characters)
version[category]stringCategory (defaults to the current version). See Memory Categories.
request
{ "version": { "content": "# Updated Content\n\nRevised version..." } }
response201 Created
{ "id": 5, "title": "Meeting Notes", "version": 2, "source": "manual", "category": "decision", "tags": ["meetings", "q1"], "created_at": "2026-02-04T16:00:00Z", "updated_at": "2026-02-04T16:00:00Z", "url": "https://recuerd0.ai/workspaces/1/memories/5", "content": { "body": "# Updated Content\n\nRevised version..." }, "workspace": { "id": 1, "name": "Project Alpha", "url": "https://recuerd0.ai/workspaces/1" } }

Search