getting started

Authentication

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

request headers
Authorization: Bearer your_token_here Content-Type: application/json
All requests 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.

429 response 429 Too Many Requests
{ "error": { "code": "RATE_LIMITED", "message": "Rate limit exceeded. Please try again later.", "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
401UNAUTHORIZEDInvalid or missing access token
403FORBIDDENInsufficient permissions or inactive workspace
404NOT_FOUNDResource not found
422VALIDATION_ERRORInvalid request data (includes details)
429RATE_LIMITEDRate limit exceeded
resource

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 and pinned status.

GET/workspaces/:id.json
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" }

Get Workspace Context

Returns a compact "wake-up" snapshot of a workspace for AI agents — workspace metadata, the current user's pinned memories scoped to the workspace, and stats. Supports HTTP caching via ETag.

GET/workspaces/:id/context.json
Query Parameters
NameTypeDefaultDescription
limitinteger10Maximum pinned memories to return (1–50).
include_bodybooleantrueWhether to include each pinned memory's body content.
max_body_charsinteger500Maximum characters of body to return per memory (100–5000). Longer bodies are truncated.
categorystringFilter pinned memories to one category. See Memory Categories.
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" }, "pinned_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 } ], "stats": { "total_memories": 42, "total_pinned": 3, "returned_pinned": 1 }, "generated_at": "2026-04-06T10:00:00Z" }

Create Workspace

Creates a new workspace.

POST/workspaces.jsonfull_access
Parameters
NameTypeDescription
workspace[name]stringrequiredWorkspace name (max 100 characters)
workspace[description]stringWorkspace description
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": 0, "archived": false, "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.

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

Archive Workspace

Archives a workspace. Archived workspaces become read-only.

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

Unarchive Workspace

Restores an archived workspace.

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

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.

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
tagsstringComma-separated tag list. Returns memories with ALL specified tags
sourcestringExact match on source field
categorystringFilter to one category. See Memory Categories.
sortstringSort field: updated_at (default), created_at, title
directionstringSort direction: desc (default), asc
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", "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" } ]

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
titlestringGlob pattern for title matching. * matches any characters, ? matches one
tagsstringComma-separated tag list. Returns memories with ALL specified tags
sourcestringExact match on source field
categorystringFilter to one category. See Memory Categories.
sortstringSort field: updated_at (default), created_at, title
directionstringSort direction: desc (default), asc
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
line_endintegerLast line to return (1-based, inclusive). Default: last line
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. 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)
memory[source]stringSource identifier
memory[tags]arrayArray of tag strings
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.

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.

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

Memory Versions

Create Version

Creates a new version of a memory. Fields default to the parent version values if not provided.

POST/workspaces/:workspace_id/memories/:memory_id/versions.jsonfull_access
Parameters
NameTypeDescription
version[title]stringVersion title (defaults to parent)
version[content]stringVersion body (defaults to parent)
version[source]stringSource identifier (defaults to parent)
version[tags]arrayTags (defaults to parent)
version[category]stringCategory (defaults to the parent memory's category). 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" } }
resource

Search