Deletes one memory permanently: there is no undo and no soft delete. Your own personal memories can always be deleted; shared memory needs the delete-memory permission.
Example
Against https://platform.memtro.com, with your key in MEMTRO_API_KEY.
curl -X DELETE https://platform.memtro.com/v1/memory/6f1c… \
-H "Authorization: Bearer $MEMTRO_API_KEY"
import os, requests
r = requests.delete(
"https://platform.memtro.com/v1/memory/6f1c…",
headers={"Authorization": f"Bearer {os.environ['MEMTRO_API_KEY']}"},
)
r.raise_for_status()
print(r.json())
const res = await fetch("https://platform.memtro.com/v1/memory/6f1c…", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.MEMTRO_API_KEY}` },
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
console.log(await res.json());
The response.
{ "object": "memory.deleted", "id": "6f1c…", "deleted": true }
Authentication
An API key, as Authorization: Bearer or x-api-key. Read-only keys are refused before the lookup.
- Every reply, errors included, carries
x-request-idandrequest-idheaders with the same id, startingreq-. Quote it to support. - Browsers may call it from any origin: it answers CORS preflights and allows the
Authorization,x-api-keyand Anthropic version headers.
Path parameters
idstringRequiredThe memory's id.
Response
200application/json
Confirmation.
object"memory.deleted"OptionalAlways
memory.deleted.idstringOptionalThe id deleted.
deletedtrueOptionalAlways
true.
Errors
In the OpenAI envelope, {"error": {"message", "type", "param", "code"}}. What each code means and what to do about it is in the error catalogue.
| Status | Code | When |
|---|---|---|
| 401 | invalid_api_key | The key is missing, malformed, revoked or expired. |
| 402 | subscription_inactive | The organisation has no active subscription. |
| 403 | read_only_key | The key was issued read only. |
| 403 | insufficient_permission | A shared memory, and the key's holder lacks the delete-memory permission. |
| 404 | not_found | No such memory, or not one this key can read. |