curl --request POST \
--url https://api.neoagent.io/public-api/memories/{memory_id}/supersede \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"audiences": [],
"confidence": 1,
"description": "<string>",
"evidence": "<string>",
"pinned": true,
"restricted_to_agent_ids": [
"<string>"
],
"scope_ids": [
"<string>"
]
}
'import requests
url = "https://api.neoagent.io/public-api/memories/{memory_id}/supersede"
payload = {
"content": "<string>",
"audiences": [],
"confidence": 1,
"description": "<string>",
"evidence": "<string>",
"pinned": True,
"restricted_to_agent_ids": ["<string>"],
"scope_ids": ["<string>"]
}
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({
content: '<string>',
audiences: [],
confidence: 1,
description: '<string>',
evidence: '<string>',
pinned: true,
restricted_to_agent_ids: ['<string>'],
scope_ids: ['<string>']
})
};
fetch('https://api.neoagent.io/public-api/memories/{memory_id}/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.neoagent.io/public-api/memories/{memory_id}/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([
'content' => '<string>',
'audiences' => [
],
'confidence' => 1,
'description' => '<string>',
'evidence' => '<string>',
'pinned' => true,
'restricted_to_agent_ids' => [
'<string>'
],
'scope_ids' => [
'<string>'
]
]),
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.neoagent.io/public-api/memories/{memory_id}/supersede"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"audiences\": [],\n \"confidence\": 1,\n \"description\": \"<string>\",\n \"evidence\": \"<string>\",\n \"pinned\": true,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_ids\": [\n \"<string>\"\n ]\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.neoagent.io/public-api/memories/{memory_id}/supersede")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"audiences\": [],\n \"confidence\": 1,\n \"description\": \"<string>\",\n \"evidence\": \"<string>\",\n \"pinned\": true,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/memories/{memory_id}/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 \"content\": \"<string>\",\n \"audiences\": [],\n \"confidence\": 1,\n \"description\": \"<string>\",\n \"evidence\": \"<string>\",\n \"pinned\": true,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"audiences": [
"ALL"
],
"audiences_source": "NEO",
"category": "SEMANTIC",
"confidence": 123,
"content": "<string>",
"created_at": "<string>",
"created_by": "SYNC_PSA_DISCOVERY",
"created_by_user_name": "<string>",
"deleted_at": "<string>",
"derivation": "STRUCTURAL",
"description": "<string>",
"end_user_hidden_reasons": [
"SECRET"
],
"end_user_warning_reasons": [
"SECRET"
],
"evidence": "<string>",
"id": "<string>",
"last_confirmed_at": "<string>",
"pinned": true,
"pinned_at": "<string>",
"restricted_to_agent_ids": [
"<string>"
],
"scope_id": "<string>",
"scope_ids": [
"<string>"
],
"scope_type": "CLIENT",
"superseded_at": "<string>",
"superseded_by": "<string>",
"supersedes_id": "<string>",
"test_mode": true
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Supersede an agent memory
Replace a memory’s content within its own scope/category, preserving surface targeting unless re-tagged. The memory keeps its id, pin and state, so links to it stay valid, and the response is that memory; new content keeps the old text as a version of its own. A superseded memory (an older version) is history and returns 400. New content that another live memory of the same scope_type already holds returns 409 (memory_exists), with that memory in error.details.memory_id. scope_ids: omit to keep a company memory’s companies, or send the full list to replace them; an MSP-wide (CLIENT) memory stays MSP-wide. An added company that has no room returns 409 and names it; removing companies always saves. description: omit to keep the current one when the content is unchanged. restricted_to_agent_ids: omit to keep the agent restriction, send a list of agent ids to replace it, or [] to let every agent read the memory again. The ids are validated as on create. Omit audiences to keep the current ones; new content sent without them goes through Neo’s end-user check, as on create. When Neo set the current audiences (audiences_source NEO, or [ALL] with no source on an older memory), Neo decides again: it hides the memory from end-user chat and phone when the new text holds a secret, another client’s details, or the MSP’s own notes on money or on a client or person, makes it available again when the text no longer does, and the response’s audiences_source and end_user_hidden_reasons say so. When a person set them, they stay; if end-user chat or phone can read the memory and Neo finds such text, end_user_warning_reasons lists why, so you can re-send with audiences that hide it. A pinned memory’s content may keep a stored length over 500 characters but never grow past it. pinned: omit to keep the pin, or send true or false to pin or unpin in the same edit; the length limit and the budget are then those of the result, so one edit can unpin a memory and make it longer, or shorten it to 500 characters and pin it. Widening the restriction, making a pinned memory longer, or a pin or unpin the budget has no room for returns 409: memory_pin_limit_exceeded for a pin, memory_scope_limit_exceeded for an unpinned memory, and nothing is saved. Tenant-admin only (403 insufficient_scope otherwise). Always requires technician approval when reached via NEO_API_REQUEST.
curl --request POST \
--url https://api.neoagent.io/public-api/memories/{memory_id}/supersede \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"audiences": [],
"confidence": 1,
"description": "<string>",
"evidence": "<string>",
"pinned": true,
"restricted_to_agent_ids": [
"<string>"
],
"scope_ids": [
"<string>"
]
}
'import requests
url = "https://api.neoagent.io/public-api/memories/{memory_id}/supersede"
payload = {
"content": "<string>",
"audiences": [],
"confidence": 1,
"description": "<string>",
"evidence": "<string>",
"pinned": True,
"restricted_to_agent_ids": ["<string>"],
"scope_ids": ["<string>"]
}
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({
content: '<string>',
audiences: [],
confidence: 1,
description: '<string>',
evidence: '<string>',
pinned: true,
restricted_to_agent_ids: ['<string>'],
scope_ids: ['<string>']
})
};
fetch('https://api.neoagent.io/public-api/memories/{memory_id}/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.neoagent.io/public-api/memories/{memory_id}/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([
'content' => '<string>',
'audiences' => [
],
'confidence' => 1,
'description' => '<string>',
'evidence' => '<string>',
'pinned' => true,
'restricted_to_agent_ids' => [
'<string>'
],
'scope_ids' => [
'<string>'
]
]),
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.neoagent.io/public-api/memories/{memory_id}/supersede"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"audiences\": [],\n \"confidence\": 1,\n \"description\": \"<string>\",\n \"evidence\": \"<string>\",\n \"pinned\": true,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_ids\": [\n \"<string>\"\n ]\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.neoagent.io/public-api/memories/{memory_id}/supersede")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"audiences\": [],\n \"confidence\": 1,\n \"description\": \"<string>\",\n \"evidence\": \"<string>\",\n \"pinned\": true,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/memories/{memory_id}/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 \"content\": \"<string>\",\n \"audiences\": [],\n \"confidence\": 1,\n \"description\": \"<string>\",\n \"evidence\": \"<string>\",\n \"pinned\": true,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"audiences": [
"ALL"
],
"audiences_source": "NEO",
"category": "SEMANTIC",
"confidence": 123,
"content": "<string>",
"created_at": "<string>",
"created_by": "SYNC_PSA_DISCOVERY",
"created_by_user_name": "<string>",
"deleted_at": "<string>",
"derivation": "STRUCTURAL",
"description": "<string>",
"end_user_hidden_reasons": [
"SECRET"
],
"end_user_warning_reasons": [
"SECRET"
],
"evidence": "<string>",
"id": "<string>",
"last_confirmed_at": "<string>",
"pinned": true,
"pinned_at": "<string>",
"restricted_to_agent_ids": [
"<string>"
],
"scope_id": "<string>",
"scope_ids": [
"<string>"
],
"scope_type": "CLIENT",
"superseded_at": "<string>",
"superseded_by": "<string>",
"supersedes_id": "<string>",
"test_mode": true
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Authorization: Bearer <token> where <token> is either a neo_sk_<env>_<secret> API key (service account) or a Microsoft Entra ID access token (dashboard user). A key created with scopes reaches only the permission groups they name, and gets 403 insufficient_scope elsewhere; GET /public-api/scopes lists them.
Body
Which agent surface a memory targets: ALL (every surface), TRIGGERED_SCHEDULED_AGENTS (automation agents working tickets), CHAT_AGENTS_INTERNAL (technician-facing chat), or CHAT_AGENTS_EXTERNAL (end-user-facing chat).
ALL, TRIGGERED_SCHEDULED_AGENTS, CHAT_AGENTS_INTERNAL, CHAT_AGENTS_EXTERNAL 