> ## Documentation Index
> Fetch the complete documentation index at: /dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Save and search memories

> Save many memories at once, list them, search them, and remove them.

For an AI model, the [tools](/dev/docs/build/app-users.md) are easiest. For your own code, these record routes save in batches and give you filters.

## Save up to 100 at once

Each memory has your own `id`. Saving the same `id` again replaces it. One bad item doesn't stop the others: it comes back under `errors`.

```bash theme={"system"}
curl https://api.constella.app/platform/v1/users/u_123/memories \
  -H "Authorization: Bearer $CONSTELLA_APP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items": [
        {"id": "pref:length", "text": "Prefers short answers.", "kind": "preference"},
        {"id": "trip:tokyo", "text": "Flying to Tokyo on March 3.", "source": "chat", "occurred_at": "2026-11-18T09:00:00Z"}
      ]}'
```

| Field | | |
| - | - | - |
| `id` | required | Your id: 1-128 letters, digits and `. _ : @ -`. |
| `text` | required | Up to 20,000 characters. |
| `title` | | Up to 300 characters. |
| `kind` | | Your own label, like `preference` or `fact`. Filter by it later. |
| `source` | | Where it came from, like `chat` or `onboarding`. Filter by it later. |
| `tags` | | Plain tag names. |
| `tentative` | | `true` for a guess you are not sure of yet. |
| `occurred_at` | | When it happened: ISO-8601 or unix milliseconds. |

## List

Newest first. The text is a snippet: get one memory for the whole text.

```bash theme={"system"}
curl "https://api.constella.app/platform/v1/users/u_123/memories?kind=preference&limit=20" \
  -H "Authorization: Bearer $CONSTELLA_APP_KEY"
```

## Search

By meaning, across memories and synced apps together. No AI model is called, so it is fast. Each result says where it came from: `origin` is `memory` (with your id) or `integration` (with the app, like `google-drive`).

```bash theme={"system"}
curl https://api.constella.app/platform/v1/users/u_123/search \
  -H "Authorization: Bearer $CONSTELLA_APP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"queries": ["travel plans", "flights"], "include": "all", "top_k": 10}'
```

Filters: `include` (`all`, `memories`, `synced`), `kinds`, `sources`, `tags`, `integrations`, `since`, `until`, `min_score` (0-1) and `max_chars` per result.

## Remove

```bash theme={"system"}
curl -X DELETE https://api.constella.app/platform/v1/users/u_123/memories/trip:tokyo \
  -H "Authorization: Bearer $CONSTELLA_APP_KEY"
```

To remove a user and everything Constella holds for them, use [Delete a user](/dev/docs/api-reference/users/delete-user.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.