API Overview
The Memsolus REST API lets you store, search, and manage persistent memory for AI agents and applications. All communication is over HTTPS and all request and response bodies are JSON.
Base URL
Authentication
All endpoints require an API key passed in the X-Api-Key header:
Keys prefixed with msk_live_ are production keys. Test keys start with msk_test_.
Getting Your API Key
Sign in to the dashboard
Log in at memsolus.com and navigate to Settings → API Keys.
Create a new key
Click New API Key, give it a descriptive name (e.g., production-agent), and select the permission scopes your integration requires.
Use the minimum set of permissions needed — avoid creating keys with full access unless required.
Copy and store the key
The key is shown only once immediately after creation. Copy it and store it in a secrets manager or environment variable.
Permissions
Each API key is scoped to one or more permissions. The API enforces permissions on every request — a key missing the required permission receives 403 Forbidden.
To retrieve the full list of available permissions programmatically:
/v1/api-keys/permissionsList all available permission groups
Memory
| Permission | Description |
|---|---|
memory.read | List, search, and view memories |
memory.write | Create and update memories |
memory.delete | Delete individual or all memories |
Knowledge
| Permission | Description |
|---|---|
knowledge.read | List and view knowledge entries |
knowledge.write | Create and update knowledge entries |
knowledge.delete | Delete knowledge entries |
Workspace
| Permission | Description |
|---|---|
workspace.read | List and view workspaces |
workspace.write | Create workspaces |
workspace.delete | Delete workspaces |
Export
| Permission | Description |
|---|---|
export.read | List and download exports |
export.write | Create export jobs |
Dashboard
| Permission | Description |
|---|---|
dashboard.read | View statistics, charts, and alerts |
Webhooks
| Permission | Description |
|---|---|
webhook.read | List webhooks and view delivery history |
webhook.write | Create and update webhooks |
webhook.delete | Delete webhooks |
Memory Templates
| Permission | Description |
|---|---|
template.read | List and view templates |
template.write | Create, edit, and apply templates |
template.delete | Delete templates |
Ingest
| Permission | Description |
|---|---|
ingest.write | Submit files and URLs for ingestion |
ingest.read | List and view ingestion job status |
Pagination
Paginated endpoints accept page and page_size query parameters and return a consistent envelope:
| Parameter | Description |
|---|---|
page | Page number, starting at 1 (default: 1) |
page_size | Results per page, max 100 |
total | Total number of matching records |
Use total and page_size to calculate the number of pages: Math.ceil(total / page_size).
Error Responses
All errors follow a consistent structure:
| Field | Description |
|---|---|
status_code | HTTP status code |
error | Standard HTTP status text |
message | Human-readable description of the error |
error_code | Machine-readable error identifier for programmatic handling |
Common Error Codes
| HTTP | Error Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Request body or query params failed validation |
| 400 | PASSWORD_CONFIRMATION_REQUIRED | Destructive endpoint requires password confirmation |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | API key lacks the required permission |
| 403 | WORKSPACE_ACCESS_DENIED | Key does not have access to the specified workspace |
| 404 | MEMORY_NOT_FOUND | Memory does not exist or belongs to another workspace |
| 404 | EXPORT_NOT_FOUND | Export job not found |
| 404 | ENTITY_NOT_FOUND | Graph entity not found |
| 409 | DUPLICATE_MEMORY | Memory with identical content already exists |
| 409 | DUPLICATE_WEBHOOK_URL | A webhook for this URL already exists |
| 409 | EXPORT_NOT_READY | Export is still processing |
| 409 | MEMORY_NOT_PROMOTABLE | Memory cannot be promoted from its current state |
| 410 | MEMORY_EXPIRED | Memory has already expired |
| 410 | EXPORT_EXPIRED | Export file is no longer available |
| 422 | WEBHOOK_LIMIT_EXCEEDED | Plan webhook limit reached |
Request Format
All requests with a body must include Content-Type: application/json, except for file upload endpoints which use multipart/form-data.