Memory Spaces API
Organize memories into isolated namespaces.
Overview
Memory Spaces let you organize memories into separate namespaces. Use them to:
- Separate memories by user, project, or topic
- Apply different retrieval settings per space
- Manage memory lifecycle independently
Create Space
POST /v1/spaces
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Space name (1-100 chars) |
description | string | No | Space description |
settings | object | No | Space-specific settings |
Example
curl -X POST https://api.memory.tensorheart.com/v1/spaces \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "work_projects",
"description": "Memories related to work projects"
}'
Response
{
"success": true,
"data": {
"id": "space_abc123",
"name": "work_projects",
"description": "Memories related to work projects",
"memory_count": 0,
"created_at": "2024-01-15T10:30:00Z"
}
}
List Spaces
GET /v1/spaces
Example
curl https://api.memory.tensorheart.com/v1/spaces \
-H "Authorization: Bearer $API_KEY"
Get Space
GET /v1/spaces/{space_id}
Example
curl https://api.memory.tensorheart.com/v1/spaces/space_abc123 \
-H "Authorization: Bearer $API_KEY"
Update Space
PUT /v1/spaces/{space_id}
Request Body
| Field | Type | Description |
|---|---|---|
name | string | Updated name |
description | string | Updated description |
settings | object | Updated settings |
Delete Space
DELETE /v1/spaces/{space_id}
Memories in the space will be preserved but unassigned.
Set Default Space
Set a space as the default for new memories.
POST /v1/spaces/{space_id}/set-default
Example
curl -X POST https://api.memory.tensorheart.com/v1/spaces/space_abc123/set-default \
-H "Authorization: Bearer $API_KEY"