> 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/ja/api-integration/endpoint-behaviors/member-memory-api.md).

# メンバーメモリ管理 API

ログイン済みのメンバーが API を使用して自分の永続的なメモリを管理する方法を説明します。

メンバーは `/api/v1/me/memories/`（`/api/me/memories/` も同じ動作です）で、自分のメモリを確認・管理できます。リクエストには `X-Organization-Id` を含め、操作対象の組織を指定してください。API Key で呼び出す場合も必要です。サービスは、呼び出し元がその組織で有効なメンバー資格を持っていることに基づいてデータを取得します。ログインと共通のリクエスト方法は[クイックスタート](/tech/ja/api-integration/quickstart.md)をご覧ください。

## 利用できる操作 <a href="#operations" id="operations"></a>

| 操作        | エンドポイント                                                                                                                         | 動作                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| 一覧取得      | [`GET /api/v1/me/memories/`](https://docs.maiagent.ai/api/api-reference/zu-zhi-he-cheng-yuan#me-memories-list)                  | 現在のメンバーの `active` と `expired` のメモリを一覧表示します。`status`、`kind` クエリパラメーターで絞り込めます。                       |
| 作成        | [`POST /api/v1/me/memories/`](https://docs.maiagent.ai/api/api-reference/zu-zhi-he-cheng-yuan#me-memories-create)               | 自分のメモリを作成します。同じメンバーに同一の `topic` を持つ有効なメモリが既にある場合は、そのメモリを更新します。新規作成時は HTTP 201、更新時は HTTP 200 を返します。 |
| 変更または再有効化 | [`PATCH /api/v1/me/memories/{id}/`](https://docs.maiagent.ai/api/api-reference/zu-zhi-he-cheng-yuan#me-memories-partial-update) | 表示対象のメモリを変更するか、`status` を `active`／`expired` に設定します。                                               |
| 削除        | [`DELETE /api/v1/me/memories/{id}/`](https://docs.maiagent.ai/api/api-reference/zu-zhi-he-cheng-yuan#me-memories-destroy)       | 自分の指定したメモリを削除します。                                                                                  |

リクエストフィールド（`topic`、`summary`、`details`、`kind`、`status`）と文字数制限は、上表の各エンドポイントの API ドキュメントをご覧ください。

{% hint style="info" %}
一覧取得と個別操作では、`active`、`expired` のメモリだけが表示されます。確認待ちや拒否されたメモリは、このメンバー向けインターフェースには表示されません。
{% endhint %}

## 連携時のステータス処理 <a href="#status-handling" id="status-handling"></a>

メンバーがメモリを `expired` に設定しても、連携側では一覧で引き続き確認でき、`PATCH` でステータスを `active` に戻せます。有効なメンバー資格がない場合、メモリの作成は HTTP 404 を返します。連携側では、リクエストで指定した組織に対応するメモリを表示し、異なる組織のデータを同じ画面に混在させないようにしてください。


---

# 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/ja/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.
