Skip to main content
Memory Stores

Mount a Memory Store to an Identity

Mount a Memory Store to an Identity and Template.

Mounts an existing Memory Store to an (identity, template) pair. Sessions created by that Identity with the Template then receive the Store's Memory content automatically. Explicitly mounted Stores always use read_only. An (identity, template) pair can have at most 10 explicit mounts, excluding the system-managed default Store slot. Repeated mounts are idempotent. Mounting the same Store again returns the existing mount record, and created_at remains the time of the first mount.

Path

POST /api/v1/forward/identities/{identity_id}/templates/{template_id}/memory_stores

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT, admin SAT, or SAT for this Identity>
Content-TypeYesapplication/json
An Identity-level Service Account Token can only operate on its own Identity. Operating on another Identity returns 403.

Path parameters

ParameterTypeRequiredDescription
identity_idstringYesIdentity ID (idn_...).
template_idstringYesTemplate ID (tmpl_...).

Request body

FieldTypeRequiredDescription
memory_store_idstringYesID of the Memory Store to mount (memstore_...). It must be an active Store visible to the caller.

Example request

curl -X POST "https://api.qoder.com/api/v1/forward/identities/idn_63ee28747a35cff93771c491/templates/tmpl_eb3377fb74ad413e17b3d755/memory_stores" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "memory_store_id": "memstore_00mc7mukn7lkxr454tjd"
  }'

Example response

HTTP 200 OK
{
  "memory_store_id": "memstore_00mc7mukn7lkxr454tjd",
  "identity_id": "idn_63ee28747a35cff93771c491",
  "template_id": "tmpl_eb3377fb74ad413e17b3d755",
  "access": "read_only",
  "system_managed": false,
  "name": "team-a",
  "status": "active",
  "entry_count": 12,
  "created_at": "2026-08-14T10:00:00Z"
}

Response

Returns a Memory Store mount object.

Notes

When multiple Stores are mounted, the Agent sees the Memories from all Stores merged into a flat namespace by path. Identical paths can shadow each other. See Visibility in a Session.

Errors

HTTPTypeTrigger
400invalid_request_errormemory_store_id is missing, the Store is archived, or the (identity, template) pair already has 10 explicit mounts.
401authentication_errorThe authentication token is missing or invalid.
403permission_errorAn Identity-level SAT tried to operate on another Identity.
404not_found_errorThe Identity, Template, or Memory Store does not exist or is not visible.
500/502/503api_errorForward or a dependent service failed.