POST /store
Store a memory in your agent's persistent memory space.
Request
POST https://api.lawmem.ai/store
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The text to store and embed |
| namespace | string | Yes | Logical partition (e.g. client ID, matter number) |
| metadata | object | No | Arbitrary key-value pairs stored with the memory |
Example
curl -X POST https://api.lawmem.ai/store \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Client has a strict no-arbitration clause in all vendor contracts.",
"namespace": "client-acme",
"metadata": {"source": "intake", "date": "2026-03-21"}
}'
Response
{
"id": "mem_a1b2c3d4",
"namespace": "client-acme",
"tokens": 18,
"created_at": "2026-03-21T12:00:00Z"
}
| Field | Description |
|---|---|
| id | Unique memory identifier — save this to delete later |
| namespace | The namespace this memory was stored in |
| tokens | Token count used for this call |
| created_at | ISO 8601 timestamp |