Skip to main content

Delete Memory

Deletes the current memory file and produces a deleted version; historical versions remain queryable via the version APIs.

Prerequisites

Endpoint and authentication configured. For details, see Overview and authentication.

Endpoint

DELETE /memory_stores/{memory_store_id}/memories/{memory_id}

Path parameters

FieldRequiredTypeDescription
memory_store_idYesstringMemory store ID
memory_idYesstringMemory ID

Request example

curl "$AGENTSTUDIO_URL/memory_stores/memstore_xxx/memories/mem_xxx" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response example

{
  "id": "mem_xxx",
  "type": "memory_deleted"
}

Response fields

FieldTypeDescription
idstringMemory ID
typestringAlways memory_deleted

Error codes

HTTP statusError codeDescription
401InvalidApiKeyAPI key missing, invalid, or expired
403permission_errorInsufficient identity or resource access permissions
404not_found_errorResource does not exist or does not belong to the current workspace
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration