> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/tech/en/api-integration/endpoint-behaviors/member-memory-api.md).

# Member Memory Management API

Explains how signed-in members can manage their own persistent memories through the API.

Members can view and manage their own memories via `/api/v1/me/memories/` (`/api/me/memories/` behaves identically). Include `X-Organization-Id` in each request to specify the organization you are working with, including when calling with an API Key. The service retrieves data based on the caller's valid membership in that organization. For sign-in and common request conventions, see [Quickstart](/tech/en/api-integration/quickstart.md).

## Available Operations <a href="#operations" id="operations"></a>

| Operation            | Endpoint                                                                                                                        | Behavior                                                                                                                                                                                     |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| List                 | [`GET /api/v1/me/memories/`](https://docs.maiagent.ai/api/api-reference/zu-zhi-he-cheng-yuan#me-memories-list)                  | Lists the current member's `active` and `expired` memories. Filter using the `status` and `kind` query parameters.                                                                           |
| Create               | [`POST /api/v1/me/memories/`](https://docs.maiagent.ai/api/api-reference/zu-zhi-he-cheng-yuan#me-memories-create)               | Creates a memory for the caller. If the same member already has an active memory with the same `topic`, updates that memory instead. Returns HTTP 201 for creation and HTTP 200 for updates. |
| Modify or reactivate | [`PATCH /api/v1/me/memories/{id}/`](https://docs.maiagent.ai/api/api-reference/zu-zhi-he-cheng-yuan#me-memories-partial-update) | Modifies a visible memory or sets its `status` to `active`/`expired`.                                                                                                                        |
| Delete               | [`DELETE /api/v1/me/memories/{id}/`](https://docs.maiagent.ai/api/api-reference/zu-zhi-he-cheng-yuan#me-memories-destroy)       | Deletes a specified memory belonging to the caller.                                                                                                                                          |

For request fields (`topic`, `summary`, `details`, `kind`, `status`) and length limits, see the API documentation for each endpoint in the table above.

{% hint style="info" %}
List and individual operations expose only `active` and `expired` memories. Memories awaiting confirmation or rejected memories do not appear in this member interface.
{% endhint %}

## Handling Status in Integrations <a href="#status-handling" id="status-handling"></a>

If a member marks a memory as `expired`, integrations can still see it in the list and use `PATCH` to change its status back to `active`. Creating a memory without valid membership returns HTTP 404. Display memories for the organization specified in the request to avoid mixing data from different organizations on the same screen.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/tech/en/api-integration/endpoint-behaviors/member-memory-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
