---
title: "Save changes to an Agent memory repo"
method: POST
path: "/api/agent-memory/{repo}/revisions"
tags: ["Agent Memory"]
---

# Save changes to an Agent memory repo

`POST /api/agent-memory/{repo}/revisions`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `x-sixb-csrf`
  - HTTP bearer
  - HTTP bearer

Stores the changes as the repo's next revision. When another save changed one of the files after baseRevision, nothing is saved and the response holds those files as they are now.

## Path parameters

- `repo` 'user' | 'project', required: user: the caller's own memory. project: the memory the whole project shares.

## Request body

- object
  - `baseRevision` integer, required: The revision the changes were made against
  - `message` string, required: What was learned, as the revision's entry in the history
  - `changes` object[], required
    - `path` string, required: The file's path from the repo root
    - `contents` string, nullable, required: The file's new contents, or null to delete it

## Response `201`

Response for status 201

- object
  - `repo` 'user' | 'project', required
  - `revision` integer, required
  - `warnings` object[], required: Links in the saved repo that point at no file
    - `path` string, required
    - `link` string, required

## Other responses

- `400`: Response for status 400
- `403`: Response for status 403
- `409`: Response for status 409
- `501`: Response for status 501

## Changes

- **2026-10-21** `54deed43546b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sixb-ai/apis/sixb-api/changes/api/agent-memory/:repo/revisions/post.md)

---

[API](https://skmtc.dev/sixb-ai/apis/sixb-api.md) - [All operations](https://skmtc.dev/sixb-ai/apis/sixb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sixb-ai/apis/sixb-api/revisions/a227d682eaa2?raw)
