Skip to main content
Memory Stores

Archive a Memory Store

Archive a Forward Memory Store.

Archives an active Memory Store. An archived Store remains readable, but its Memory entries cannot be created or updated. Mounts are checked before archiving. If the Store is still mounted to any (identity, template) pair, the endpoint returns 409. Detach every mount before archiving the Store.

Path

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

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or admin SAT>
No request body is required.

Path parameters

ParameterTypeRequiredDescription
memory_store_idstringYesMemory Store ID (memstore_...).

Example request

curl -X POST "https://api.qoder.com/api/v1/forward/memory_stores/memstore_00mc7mukn7lkxr454tjd/archive" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example response

HTTP 200 OK
{
  "id": "memstore_00mc7mukn7lkxr454tjd",
  "type": "memory_store",
  "name": "project-alpha-memory",
  "description": "Agent knowledge base for project Alpha",
  "status": "archived",
  "entry_count": 12,
  "total_size": 4096,
  "metadata": {"created_by": "forward", "team": "backend"},
  "system_managed": false,
  "identity_id": null,
  "created_at": "2026-08-14T10:00:00Z",
  "updated_at": "2026-08-14T11:00:00Z",
  "archived_at": "2026-08-14T11:00:00Z",
  "binding_info": {"identity_template_count": 0}
}

Response

Returns the archived Memory Store object, with status set to archived and archived_at populated.

Notes

Archiving a system-managed default Store (system_managed=true) causes Forward to create a new empty default Store the next time a Session is created for that (identity, template) pair. The historical Memory entries become orphaned. Do not archive a system-managed default Store unless you no longer need those Memories.

Errors

HTTPTypeTrigger
400invalid_request_errorA path parameter is invalid.
401authentication_errorThe authentication token is missing or invalid.
403permission_errorThe caller cannot access the resource.
404not_found_errorThe Store does not exist or is not visible across users.
409conflict_errorThe Store is already archived or is still mounted to an (identity, template) pair.
500/502/503api_errorForward or a dependent service failed.