# Update a project's memory

> Replace the specialist's memory, the one document every conversation with it reads, at the version you read. Needs edit access.

Source: https://docs.generalinput.com/api/projects/memory



<Endpoint method="PUT" path="/v1/projects/:id/memory" />

<Access scope="projects:manage" />

The memory is what the specialist is for, how its work is done, and what has been decided. The specialist rewrites it from its conversations; people replace it here. Every write names the version it read, so two writers never overwrite each other silently.

## Body [#body]

| Field     | Type         | Notes                                                                        |
| --------- | ------------ | ---------------------------------------------------------------------------- |
| `text`    | string, null | The whole document as markdown; `null` clears it. 12,000 characters at most. |
| `version` | integer      | The `memory.version` from [get](/api/projects/get).                          |

## Response [#response]

The memory as saved, with its new `version`.

## Conflict [#conflict]

A `409` means the memory moved on since `version` was read. The body carries the current memory; merge into its `text` and write again with its `version`.

```json
{
  "error": "The memory changed since it was read; it is now version 4",
  "memory": {
    "text": "…",
    "version": 4,
    "updatedAt": "…",
    "updatedBy": { "…": "…" }
  }
}
```
