curl --request POST \
--url https://api.neoagent.io/public-api/memories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"audiences": [],
"confidence": 1,
"description": "<string>",
"evidence": "<string>",
"pinned": false,
"restricted_to_agent_ids": [
"<string>"
],
"scope_id": "<string>",
"scope_ids": [
"<string>"
]
}
'import requests
url = "https://api.neoagent.io/public-api/memories"
payload = {
"content": "<string>",
"audiences": [],
"confidence": 1,
"description": "<string>",
"evidence": "<string>",
"pinned": False,
"restricted_to_agent_ids": ["<string>"],
"scope_id": "<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: false,
restricted_to_agent_ids: ['<string>'],
scope_id: '<string>',
scope_ids: ['<string>']
})
};
fetch('https://api.neoagent.io/public-api/memories', 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",
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' => false,
'restricted_to_agent_ids' => [
'<string>'
],
'scope_id' => '<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"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"audiences\": [],\n \"confidence\": 1,\n \"description\": \"<string>\",\n \"evidence\": \"<string>\",\n \"pinned\": false,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_id\": \"<string>\",\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")
.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\": false,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_id\": \"<string>\",\n \"scope_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/memories")
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\": false,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_id\": \"<string>\",\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"
],
"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"
}
}Create an agent memory
Author a manual memory. CLIENT memories are scoped to the caller’s tenant. An END_CLIENT memory names its companies: scope_ids (1 to 500 end-client company ids), or scope_id for one company, never both. One memory serves every company it lists. A create always makes a new memory with a new id. Content that a live memory of the same scope_type already holds is refused with 409 (memory_exists); error.details.memory_id and error.details.scope_ids name that memory, so supersede it to change it or add your companies. Content that is only in a deleted memory makes a new memory, and the deleted one stays deleted. description is one line of at most 120 characters naming the subject and when it applies; omit it and Neo writes one. Omit audiences and Neo decides whether end-user chat and phone read it: it keeps the memory from end-user chat ([TRIGGERED_SCHEDULED_AGENTS, CHAT_AGENTS_INTERNAL]) when it holds a secret, another client’s details, or the MSP’s own notes on money or on a client or person, and leaves it available ([ALL]) otherwise; the response’s audiences_source (NEO) and end_user_hidden_reasons say what Neo decided. One agent run sees at most 100 unpinned memories, MSP-wide plus one company, per agent: a create past that returns 409 (memory_scope_limit_exceeded), names the company and the agent, and saves nothing; a memory for several companies counts in each of them. Set pinned: true to create-and-pin in one call (a pinned memory holds at most 500 characters) — required for standing instructions that must apply on every run. Pins share 4,000 characters per run (MSP-wide plus one company): past that the memory is still created and the call returns 409 (memory_pin_limit_exceeded); curate pins, then POST /memories/<id>/pin. Set restricted_to_agent_ids to limit the memory to those agents (ids from GET /agents, and phone:<id> for a phone agent, with the id from GET /phone/numbers); each must be an agent of your tenant that reads on one of audiences, or the call returns 400. A classic workflow is never an agent, so a restricted memory leaves every classic workflow’s Smart Actions. Tenant-admin only: a non-admin dashboard user or on-behalf-of end user gets 403 (insufficient_scope). Requires technician approval when reached via NEO_API_REQUEST.
curl --request POST \
--url https://api.neoagent.io/public-api/memories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"audiences": [],
"confidence": 1,
"description": "<string>",
"evidence": "<string>",
"pinned": false,
"restricted_to_agent_ids": [
"<string>"
],
"scope_id": "<string>",
"scope_ids": [
"<string>"
]
}
'import requests
url = "https://api.neoagent.io/public-api/memories"
payload = {
"content": "<string>",
"audiences": [],
"confidence": 1,
"description": "<string>",
"evidence": "<string>",
"pinned": False,
"restricted_to_agent_ids": ["<string>"],
"scope_id": "<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: false,
restricted_to_agent_ids: ['<string>'],
scope_id: '<string>',
scope_ids: ['<string>']
})
};
fetch('https://api.neoagent.io/public-api/memories', 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",
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' => false,
'restricted_to_agent_ids' => [
'<string>'
],
'scope_id' => '<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"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"audiences\": [],\n \"confidence\": 1,\n \"description\": \"<string>\",\n \"evidence\": \"<string>\",\n \"pinned\": false,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_id\": \"<string>\",\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")
.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\": false,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_id\": \"<string>\",\n \"scope_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/memories")
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\": false,\n \"restricted_to_agent_ids\": [\n \"<string>\"\n ],\n \"scope_id\": \"<string>\",\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"
],
"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 