Replace a Memory (optimistic-locked).
curl --request POST \
--url https://api.reload.chat/v1/sdk/supersede \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"old_memory_id": "<string>",
"expected_version": 123,
"new_content": "<string>",
"derived_from": [
{
"id": "<string>"
}
],
"confidence": 1,
"ttl_seconds": 123,
"stated_by_identity_id": "<string>",
"where": "<string>",
"why": "<string>",
"metadata": {}
}
'import requests
url = "https://api.reload.chat/v1/sdk/supersede"
payload = {
"old_memory_id": "<string>",
"expected_version": 123,
"new_content": "<string>",
"derived_from": [{ "id": "<string>" }],
"confidence": 1,
"ttl_seconds": 123,
"stated_by_identity_id": "<string>",
"where": "<string>",
"why": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
old_memory_id: '<string>',
expected_version: 123,
new_content: '<string>',
derived_from: [{id: '<string>'}],
confidence: 1,
ttl_seconds: 123,
stated_by_identity_id: '<string>',
where: '<string>',
why: '<string>',
metadata: {}
})
};
fetch('https://api.reload.chat/v1/sdk/supersede', 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.reload.chat/v1/sdk/supersede",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'old_memory_id' => '<string>',
'expected_version' => 123,
'new_content' => '<string>',
'derived_from' => [
[
'id' => '<string>'
]
],
'confidence' => 1,
'ttl_seconds' => 123,
'stated_by_identity_id' => '<string>',
'where' => '<string>',
'why' => '<string>',
'metadata' => [
]
]),
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.reload.chat/v1/sdk/supersede"
payload := strings.NewReader("{\n \"old_memory_id\": \"<string>\",\n \"expected_version\": 123,\n \"new_content\": \"<string>\",\n \"derived_from\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"confidence\": 1,\n \"ttl_seconds\": 123,\n \"stated_by_identity_id\": \"<string>\",\n \"where\": \"<string>\",\n \"why\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.reload.chat/v1/sdk/supersede")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"old_memory_id\": \"<string>\",\n \"expected_version\": 123,\n \"new_content\": \"<string>\",\n \"derived_from\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"confidence\": 1,\n \"ttl_seconds\": 123,\n \"stated_by_identity_id\": \"<string>\",\n \"where\": \"<string>\",\n \"why\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reload.chat/v1/sdk/supersede")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"old_memory_id\": \"<string>\",\n \"expected_version\": 123,\n \"new_content\": \"<string>\",\n \"derived_from\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"confidence\": 1,\n \"ttl_seconds\": 123,\n \"stated_by_identity_id\": \"<string>\",\n \"where\": \"<string>\",\n \"why\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"org_id": "<string>",
"content": "<string>",
"confidence": 123,
"version": 123,
"ttl_seconds": 123,
"created_at": "2023-11-07T05:31:56Z",
"last_reinforced_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"invalidated_at": "2023-11-07T05:31:56Z",
"invalidated_by": "<string>",
"invalidated_reason": "<string>",
"content_hash": "<string>",
"metadata": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}Replace a Memory (optimistic-locked).
Supersede an existing Memory with a new version. expected_version guards against concurrent writes — a mismatch returns 409 VERSION_CONFLICT.
POST
/
v1
/
sdk
/
supersede
Replace a Memory (optimistic-locked).
curl --request POST \
--url https://api.reload.chat/v1/sdk/supersede \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"old_memory_id": "<string>",
"expected_version": 123,
"new_content": "<string>",
"derived_from": [
{
"id": "<string>"
}
],
"confidence": 1,
"ttl_seconds": 123,
"stated_by_identity_id": "<string>",
"where": "<string>",
"why": "<string>",
"metadata": {}
}
'import requests
url = "https://api.reload.chat/v1/sdk/supersede"
payload = {
"old_memory_id": "<string>",
"expected_version": 123,
"new_content": "<string>",
"derived_from": [{ "id": "<string>" }],
"confidence": 1,
"ttl_seconds": 123,
"stated_by_identity_id": "<string>",
"where": "<string>",
"why": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
old_memory_id: '<string>',
expected_version: 123,
new_content: '<string>',
derived_from: [{id: '<string>'}],
confidence: 1,
ttl_seconds: 123,
stated_by_identity_id: '<string>',
where: '<string>',
why: '<string>',
metadata: {}
})
};
fetch('https://api.reload.chat/v1/sdk/supersede', 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.reload.chat/v1/sdk/supersede",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'old_memory_id' => '<string>',
'expected_version' => 123,
'new_content' => '<string>',
'derived_from' => [
[
'id' => '<string>'
]
],
'confidence' => 1,
'ttl_seconds' => 123,
'stated_by_identity_id' => '<string>',
'where' => '<string>',
'why' => '<string>',
'metadata' => [
]
]),
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.reload.chat/v1/sdk/supersede"
payload := strings.NewReader("{\n \"old_memory_id\": \"<string>\",\n \"expected_version\": 123,\n \"new_content\": \"<string>\",\n \"derived_from\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"confidence\": 1,\n \"ttl_seconds\": 123,\n \"stated_by_identity_id\": \"<string>\",\n \"where\": \"<string>\",\n \"why\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.reload.chat/v1/sdk/supersede")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"old_memory_id\": \"<string>\",\n \"expected_version\": 123,\n \"new_content\": \"<string>\",\n \"derived_from\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"confidence\": 1,\n \"ttl_seconds\": 123,\n \"stated_by_identity_id\": \"<string>\",\n \"where\": \"<string>\",\n \"why\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reload.chat/v1/sdk/supersede")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"old_memory_id\": \"<string>\",\n \"expected_version\": 123,\n \"new_content\": \"<string>\",\n \"derived_from\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"confidence\": 1,\n \"ttl_seconds\": 123,\n \"stated_by_identity_id\": \"<string>\",\n \"where\": \"<string>\",\n \"why\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"org_id": "<string>",
"content": "<string>",
"confidence": 123,
"version": 123,
"ttl_seconds": 123,
"created_at": "2023-11-07T05:31:56Z",
"last_reinforced_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"invalidated_at": "2023-11-07T05:31:56Z",
"invalidated_by": "<string>",
"invalidated_reason": "<string>",
"content_hash": "<string>",
"metadata": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryable": true,
"suggestion": "<string>",
"docs": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"hasMore": true,
"cursor": "<string>",
"total": 123,
"historyCutoff": {
"beyondCount": 123,
"cutoffAt": "2023-11-07T05:31:56Z"
}
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Optimistic-lock guard. Mismatch → 409.
Minimum array length:
1Show child attributes
Show child attributes
Required range:
0 <= x <= 1Named TTL bucket: 7d / 90d / 365d.
Available options:
VOLATILE, ACTIVE, STABLE Free-form JSON metadata. Capped at 4KB serialized (server rejects oversize).
⌘I

