Delete Memory
Updated at:
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
| Field | Required | Type | Description |
|---|---|---|---|
memory_store_id | Yes | string | Memory store ID |
memory_id | Yes | string | Memory 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
| Field | Type | Description |
|---|---|---|
id | string | Memory ID |
type | string | Always memory_deleted |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 401 | InvalidApiKey | API key missing, invalid, or expired |
| 403 | permission_error | Insufficient identity or resource access permissions |
| 404 | not_found_error | Resource does not exist or does not belong to the current workspace |
Is this page helpful?