memaxdocs
REST API

Memories API

Create, read, update, and delete memories via the REST API.

Create a memory

POST /v1/memories

Request body

{
  "content": "The auth system uses JWT with short-lived access tokens...",
  "title": "Auth Architecture",
  "category": "core",
  "tags": ["auth", "jwt", "security"],
  "boundary": "private",
  "hint": "architecture documentation for the auth system",
  "source": "api"
}
FieldTypeRequiredDescription
contentstringYesMemory content (markdown, text, code)
titlestringNoTitle (auto-generated if omitted)
categorystringNoCategory (auto-classified if omitted)
tagsstring[]NoTags for filtering
boundarystringNoprivate, team, public (default: private)
hub_idstringNoTarget hub (default: personal)
hintstringNoHint for classifier
hub_reasonstringNoReason for team hub push
sourcestringNoSource identifier
source_agentstringNoAgent identity
project_contextobjectNoRepo/project metadata

Response

{
  "data": {
    "id": "mem_a1b2c3d4",
    "title": "Auth Architecture",
    "content": "The auth system uses JWT...",
    "category": "core",
    "tags": ["auth", "jwt", "security"],
    "boundary": "private",
    "state": "processing",
    "created_at": "2025-01-15T10:30:00Z"
  }
}

List memories

GET /v1/memories

Query parameters

ParameterTypeDescriptionDefault
limitnumberMax results50
cursorstringPagination cursor
sortstringnewest, oldest, accessednewest
categorystringFilter by category
tagsstringComma-separated tags
boundarystringFilter by boundary
hub_idstringFilter by hub

Response

{
  "data": {
    "memories": [
      {
        "id": "mem_a1b2c3d4",
        "title": "Auth Architecture",
        "summary": "JWT-based auth with short-lived tokens...",
        "category": "core",
        "boundary": "private",
        "created_at": "2025-01-15T10:30:00Z"
      }
    ],
    "next_cursor": "eyJpZCI6...",
    "has_more": true
  }
}

Get a memory

GET /v1/memories/:id

Response

{
  "data": {
    "id": "mem_a1b2c3d4",
    "title": "Auth Architecture",
    "content": "The auth system uses JWT with short-lived access tokens...",
    "summary": "JWT-based auth with short-lived tokens...",
    "category": "core",
    "tags": ["auth", "jwt", "security"],
    "boundary": "private",
    "state": "active",
    "version": 1,
    "access_count": 12,
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:30:05Z",
    "accessed_at": "2025-01-20T14:22:00Z"
  }
}

Update a memory

PATCH /v1/memories/:id

Request body

All fields are optional — only include fields you want to update.

{
  "title": "Updated Auth Architecture",
  "category": "core",
  "tags": ["auth", "jwt"],
  "boundary": "team"
}

Delete a memory

DELETE /v1/memories/:id

Returns 204 No Content on success.