---
title: "Create User Memory"
method: POST
path: "/user-memories"
tags: ["User memories"]
---

# Create User Memory

`POST /user-memories`

Add a preference by hand. A statement the caller already has, word for
word, returns that memory instead of a copy, switched back on if it was
off. `evicted_statements` names what was retired to make room.

## Request body

- UserMemoryCreate — A preference typed in the settings list. `categories` and `grades` are ignored for anyone but a teacher; no categories lets the classifier pick them.
  - `title` string, required
  - `statement` string, required
  - `categories` string[]
  - `grades` string[]

## Response `200`

Successful Response

- UserMemoryCreatedResponse — The entry just added, and what made room for it. Past the cap of active preferences, storing one retires the least recently confirmed (EXC-969): the list says so rather than letting a line vanish.
  - `id` string, required
  - `statement` string, required
  - `categories` string[], required
  - `grades` string[], required
  - `enabled` boolean, required
  - `is_grading_rule` boolean, required
  - `origin` 'declared' | 'inferred' | 'authored' | 'backfilled' | 'manual', required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable, required
  - `source_chat_id` string, nullable, required
  - `evicted_statements` string[]

## Other responses

- `409` — Business rule violated
- `422` — Validation Error

## Changes

> 29 revisions in range; 1 not diffed.

- **2026-09-30** `518c1e6178a3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/user-memories/post.md)

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc.dev/excellence-ai/apis/excellence-learning/revisions/63b3baf6487c?raw)
