Delete Memories
curl --request DELETE \
--url https://api.memoclaw.com/v1/memories/{id} \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
]
}
'import requests
url = "https://api.memoclaw.com/v1/memories/{id}"
payload = { "ids": ["<string>"] }
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>']})
};
fetch('https://api.memoclaw.com/v1/memories/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.memoclaw.com/v1/memories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.memoclaw.com/v1/memories/{id}"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.memoclaw.com/v1/memories/{id}")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoclaw.com/v1/memories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deleted": 123,
"id": "<string>",
"errors": [
{}
]
}API Reference
Delete Memories
Soft-delete one or many memories by ID.
DELETE
/
v1
/
memories
/
{id}
Delete Memories
curl --request DELETE \
--url https://api.memoclaw.com/v1/memories/{id} \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"<string>"
]
}
'import requests
url = "https://api.memoclaw.com/v1/memories/{id}"
payload = { "ids": ["<string>"] }
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>']})
};
fetch('https://api.memoclaw.com/v1/memories/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.memoclaw.com/v1/memories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.memoclaw.com/v1/memories/{id}"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.memoclaw.com/v1/memories/{id}")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoclaw.com/v1/memories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deleted": 123,
"id": "<string>",
"errors": [
{}
]
}This endpoint requires wallet authentication for identity. It is free — no payment required.
Path Parameters
string
required
UUID of the memory to delete.
Response (200)
boolean
Always
true.string
The deleted memory’s UUID.
Deletion is soft — it sets
deleted_at on the record. Deleted memories are excluded from all queries (recall, list). This allows future recovery if needed.Errors
| Status | Description |
|---|---|
| 404 | Memory not found (or already deleted, or belongs to another wallet). |
| 409 | Memory is immutable and cannot be deleted. |
| 422 | Invalid UUID format. |
Example
curl -X DELETE https://api.memoclaw.com/v1/memories/550e8400-e29b-41d4-a716-446655440000
const response = await fetch(
"https://api.memoclaw.com/v1/memories/550e8400-e29b-41d4-a716-446655440000",
{ method: "DELETE" }
);
const data = await response.json();
from memoclaw import MemoClaw
client = MemoClaw()
result = client.delete("550e8400-e29b-41d4-a716-446655440000")
Response
{
"deleted": true,
"id": "550e8400-e29b-41d4-a716-446655440000"
}
Bulk Delete — DELETE /v1/memories
Delete multiple memories in a single request. Also free. Price: FREERequest Body
string[]
required
Array of memory UUIDs to delete (max 100).
Response (200)
number
Number of memories successfully deleted.
array
Array of IDs that could not be deleted (not found, immutable, or wrong wallet), if any.
Example
curl -X DELETE https://api.memoclaw.com/v1/memories \
-H "Content-Type: application/json" \
-H "x-wallet-auth: 0xYourWallet:1699900000:0xSignature..." \
-d '{"ids": ["id-1", "id-2", "id-3"]}'
from memoclaw import MemoClaw
client = MemoClaw()
# Delete multiple memories at once
result = client.bulk_delete(["id-1", "id-2", "id-3"])
print(f"Deleted {result.deleted} memories")
import { MemoClawClient } from "memoclaw";
const client = new MemoClawClient();
const result = await client.bulkDelete(["id-1", "id-2", "id-3"]);
console.log(`Deleted ${result.deleted} memories`);
Response
{
"deleted": 3,
"errors": []
}
Errors
| Status | Description |
|---|---|
| 422 | ids is missing, empty, or exceeds 100 items. |
⌘I