Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/memory_stores/{memory_store_id}/memories
指定された Memory Store に新しいメモリエントリを作成します。
パスパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|
memory_store_id | string | はい | Memory Store ID(memstore_ プレフィックス) |
ヘッダー
| ヘッダー | 値 | 必須 |
|---|
| Authorization | Bearer $QODER_PAT | はい |
| Content-Type | application/json | はい |
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|
path | string | はい | 相対パス(/ で始まることはできない) |
content | string | はい | メモリ内容(テキスト) |
リクエスト例
curl -X POST "https://openapi.qoder.sh/api/v1/cloud/memory_stores/memstore_xxx/memories" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"path": "notes/meeting.md",
"content": "会議議事録の内容..."
}'
レスポンス例
HTTP 201 Created
作成された MemoryEntry オブジェクトを返します。
{
"id": "mem_019e3bb965a671fca51bde1cf8d87de0",
"type": "memory",
"store_id": "memstore_019e3bb93b7074f9a5130d39ddcca90f",
"path": "notes/meeting.md",
"content": "会議議事録の内容...",
"size": 11,
"content_sha256": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c",
"version": 1,
"metadata": {},
"created_at": "2026-05-18T15:34:26.494349Z",
"updated_at": "2026-05-18T15:34:26.494349Z"
}
レスポンスフィールド
| フィールド | 型 | 説明 |
|---|
id | string | 一意識別子、mem_ プレフィックス |
type | string | 固定値 "memory" |
store_id | string | 所属する Memory Store の ID |
path | string | 相対パス |
content | string | メモリ内容 |
size | int64 | 内容サイズ(バイト) |
content_sha256 | string | 内容の SHA-256 ハッシュ |
version | int64 | バージョン番号(初回作成は 1) |
metadata | object | カスタムメタデータ |
created_at | string | 作成時刻(ISO 8601) |
updated_at | string | 最終更新時刻(ISO 8601) |
エラーレスポンス
| HTTP | type | 説明 |
|---|
| 400 | invalid_request_error | リクエストパラメータエラー(path が / で始まるなど) |
| 401 | TOKEN_INVALID | 認証トークンが提供されていないまたは無効 |
| 404 | not_found_error | 指定の Memory Store が存在しない |
| 409 | conflict_error | 同一 Store 配下に同一 path のエントリがすでに存在 |
エラー例
path が / で始まる場合:
{
"error": {
"message": "Field 'path' must be a relative path (cannot start with '/').",
"type": "invalid_request_error"
},
"type": "error"
}
パス競合:
{
"error": {
"message": "Version or state conflict.",
"type": "conflict_error"
},
"type": "error"
}
注意事項
path は相対パスでなければならず、/ で始まることはできません
- 同一 Store 配下に同一
path のメモリエントリは 2 つ存在できません(409 を返します)
- 作成時のバージョン番号は初期値 1 です
- サーバー側で
size と content_sha256 を自動計算します
- 作成操作は同期的に
action: "created" のバージョンレコードを生成します