Skip to main content
Memory Stores

Create a Memory

Create a Memory entry in a Forward Memory Store.

Creates a Memory entry in a Memory Store. An active path must be unique within a Store. Creating a duplicate path returns 409. Creating a Memory automatically produces a version snapshot with operation=created.

Path

POST /api/v1/forward/memory_stores/{memory_store_id}/memories

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or admin SAT>
Content-TypeYesapplication/json

Path parameters

ParameterTypeRequiredDescription
memory_store_idstringYesMemory Store ID (memstore_...).

Request body

FieldTypeRequiredDescription
pathstringYesCase-sensitive relative path in the Store. See Path constraints.
contentstringYesPlain-text UTF-8 content, not base64. The raw content is limited to 100 KiB. See Content constraints.
metadataobjectNoKey-value metadata whose values must be strings. Up to 16 keys. See Memory metadata constraints.

Example request

curl -X POST "https://api.qoder.com/api/v1/forward/memory_stores/memstore_00mc7mukn7lkxr454tjd/memories" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "decisions/arch-choice.md",
    "content": "# Architecture decision\n\nUse a microservices architecture.",
    "metadata": {"owner": "backend-team"}
  }'

Example response

HTTP 200 OK
{
  "id": "mem_00mc7mvag5u68kkfvxhy",
  "type": "memory",
  "memory_store_id": "memstore_00mc7mukn7lkxr454tjd",
  "path": "decisions/arch-choice.md",
  "content": "# Architecture decision\n\nUse a microservices architecture.",
  "content_size_bytes": 99,
  "content_sha256": "1712de0d497a5aeef2beeccf4fbb7d5a16944975438d0c25447b9c1fba13099a",
  "metadata": {"owner": "backend-team"},
  "created_at": "2026-08-14T10:00:00Z",
  "updated_at": "2026-08-14T10:00:00Z"
}

Response

Returns a Memory object, including content.

Notes

Memories cannot be created in an archived Memory Store. The endpoint returns 409.

Errors

HTTPTypeTrigger
400invalid_request_errorpath or content is missing or invalid, content exceeds 100 KiB or contains non-printable control characters, or metadata violates its constraints.
401authentication_errorThe authentication token is missing or invalid.
403permission_errorThe caller cannot access the resource.
404not_found_errorThe Memory Store does not exist or is not visible across users.
409conflict_errorAn active Memory with this path already exists in the Store, or the Store is archived.
500/502/503api_errorForward or a dependent service failed.