Edit a memory
curl --request PATCH \
--url https://api.tensorpro.ai/api/v1/memory/records/{record_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "Tom manages the website project."
}
'import requests
url = "https://api.tensorpro.ai/api/v1/memory/records/{record_id}"
payload = { "content": "Tom manages the website project." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: 'Tom manages the website project.'})
};
fetch('https://api.tensorpro.ai/api/v1/memory/records/{record_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.tensorpro.ai/api/v1/memory/records/{record_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => 'Tom manages the website project.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.tensorpro.ai/api/v1/memory/records/{record_id}"
payload := strings.NewReader("{\n \"content\": \"Tom manages the website project.\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.tensorpro.ai/api/v1/memory/records/{record_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"Tom manages the website project.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/memory/records/{record_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"Tom manages the website project.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1b3d5f7a-9c2e-4a6b-8d0f-2e4a6c8e0b1d",
"content_summary": "Tom manages the website project.",
"full_text": "Tom manages the website project.",
"provenance": "USER_CONFIRMED",
"domain": "factual",
"status": "current",
"created_at": "2026-11-11T09:12:44+00:00",
"project_id": null,
"session_id": "chat-42",
"source_id": null,
"supersedes": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
"superseded_by": null,
"event_date": null,
"document_date": "2026-11-10T04:43:25+00:00"
}
Manage memory
Edit a memory
Change what a memory says. EDN saves the new text as a new USER_CONFIRMED memory and keeps the old version in the history. Returns the new memory: use its id from now on. USER_STATED, USER_CONFIRMED, AI_INFERRED and AI_GENERATED memories can be edited; documents and conversation turns return 409.
PATCH
/
api
/
v1
/
memory
/
records
/
{record_id}
Edit a memory
curl --request PATCH \
--url https://api.tensorpro.ai/api/v1/memory/records/{record_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "Tom manages the website project."
}
'import requests
url = "https://api.tensorpro.ai/api/v1/memory/records/{record_id}"
payload = { "content": "Tom manages the website project." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: 'Tom manages the website project.'})
};
fetch('https://api.tensorpro.ai/api/v1/memory/records/{record_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.tensorpro.ai/api/v1/memory/records/{record_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => 'Tom manages the website project.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.tensorpro.ai/api/v1/memory/records/{record_id}"
payload := strings.NewReader("{\n \"content\": \"Tom manages the website project.\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.tensorpro.ai/api/v1/memory/records/{record_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"Tom manages the website project.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/memory/records/{record_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"Tom manages the website project.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1b3d5f7a-9c2e-4a6b-8d0f-2e4a6c8e0b1d",
"content_summary": "Tom manages the website project.",
"full_text": "Tom manages the website project.",
"provenance": "USER_CONFIRMED",
"domain": "factual",
"status": "current",
"created_at": "2026-11-11T09:12:44+00:00",
"project_id": null,
"session_id": "chat-42",
"source_id": null,
"supersedes": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
"superseded_by": null,
"event_date": null,
"document_date": "2026-11-10T04:43:25+00:00"
}
Use this endpoint when a user fixes a memory directly, for example in a memory settings screen. EDN never overwrites a memory: it saves the new text as a new version and keeps the old one in the history.
Returns the new version of the memory, with the same fields as Get a memory. The most useful ones:
See Error handling.
What EDN does
- Saves the new text as a new
USER_CONFIRMEDmemory with a new ID. - Marks the old memory as replaced, so SIPs stop using it.
- Keeps the old version in the memory’s history.
Required headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | Your EDN API key. Create keys in the Console. See Authentication |
Content-Type | application/json | The request body is JSON |
Request
Path parameters
| Parameter | Type | Description |
|---|---|---|
record_id | string | Identifier for the current version of the memory to edit |
Body
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The corrected text for the memory. 1 to 1,000 characters |
curl -X PATCH "https://api.tensorpro.ai/api/v1/memory/records/8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17" \
-H "Authorization: Bearer $EDN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Tom manages the website project."
}'
import os
import requests
resp = requests.patch(
"https://api.tensorpro.ai/api/v1/memory/records/8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
headers={"Authorization": f"Bearer {os.environ['EDN_API_KEY']}"},
json={
"content": "Tom manages the website project."
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.tensorpro.ai/api/v1/memory/records/8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.EDN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"content": "Tom manages the website project."
}),
});
console.log(await resp.json());
Response
200 OK
{
"id": "1b3d5f7a-9c2e-4a6b-8d0f-2e4a6c8e0b1d",
"content_summary": "Tom manages the website project.",
"full_text": "Tom manages the website project.",
"provenance": "USER_CONFIRMED",
"domain": "factual",
"status": "current",
"created_at": "2026-11-11T09:12:44+00:00",
"project_id": null,
"session_id": "chat-42",
"source_id": null,
"supersedes": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
"superseded_by": null,
"event_date": null,
"document_date": "2026-11-10T04:43:25+00:00"
}
| Field | Type | Description |
|---|---|---|
id | string | Identifier for the new version. Use it from now on |
provenance | string | Always USER_CONFIRMED |
status | string | Always current |
supersedes | string | Identifier for the version you edited |
Important behavior
- The edited memory gets a new ID. The old ID still works with Get a memory and history.
-
Only current versions can be edited. Editing a replaced or deleted version returns
404. -
USER_STATED,USER_CONFIRMED,AI_INFERREDandAI_GENERATEDmemories can be edited. Documents (DOCUMENT_VERIFIED) and conversation turns (ROUND) return409.
Errors
| Status | Code | When |
|---|---|---|
401 | UNAUTHORIZED | The API key is missing, invalid or revoked |
404 | NOT_FOUND | The memory doesn’t exist, was deleted, was already replaced, or isn’t yours |
409 | CONFLICT | The memory is a document, a conversation turn or system-derived, so it can’t be edited |
422 | VALIDATION_ERROR | content is missing, empty or longer than 1,000 characters |
429 | RATE_LIMITED | Per-minute limit reached. Retry after Retry-After seconds |
500 | INTERNAL_ERROR | Something failed on EDN’s side. Retry later |
{
"id": "1b3d5f7a-9c2e-4a6b-8d0f-2e4a6c8e0b1d",
"content_summary": "Tom manages the website project.",
"full_text": "Tom manages the website project.",
"provenance": "USER_CONFIRMED",
"domain": "factual",
"status": "current",
"created_at": "2026-11-11T09:12:44+00:00",
"project_id": null,
"session_id": "chat-42",
"source_id": null,
"supersedes": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
"superseded_by": null,
"event_date": null,
"document_date": "2026-11-10T04:43:25+00:00"
}
Authorizations
Path Parameters
Body
application/json
Response
Successful Response
