cURL
curl -X PUT 'https://api.nuntly.com/agents/aB3dE7fG/memory' \
-H 'Authorization: Bearer ntly_xxx' \
-H 'Content-Type: application/json' \
-d '{"memory":{"lastTopic":"billing","openTickets":2}}'import { Nuntly } from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'],
});
const response = await client.agents.memory.upsert('aB3dE7fG', {
memory: { lastTopic: 'billing', openTickets: 2 },
});import com.nuntly.sdk.Nuntly;
import com.nuntly.sdk.ClientOptions;
import com.nuntly.sdk.models.*;
var nuntly = Nuntly.create(ClientOptions.builder()
.apiKey(System.getenv("NUNTLY_API_KEY"))
.build());
var response = nuntly.agents().memory().upsert("aB3dE7fG", AgentMemoryRequest.builder()
.memory(java.util.Map.of("lastTopic", "billing", "openTickets", 2))
.build());import requests
url = "https://api.nuntly.com/agents/{agentId}/memory"
payload = {
"memory": {
"lastTopic": "billing",
"openTickets": 2
},
"inboxId": "ibx_01ka8k8s80gvx9604cn9am5st4",
"threadId": "<string>",
"summary": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nuntly.com/agents/{agentId}/memory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'memory' => [
'lastTopic' => 'billing',
'openTickets' => 2
],
'inboxId' => 'ibx_01ka8k8s80gvx9604cn9am5st4',
'threadId' => '<string>',
'summary' => '<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.nuntly.com/agents/{agentId}/memory"
payload := strings.NewReader("{\n \"memory\": {\n \"lastTopic\": \"billing\",\n \"openTickets\": 2\n },\n \"inboxId\": \"ibx_01ka8k8s80gvx9604cn9am5st4\",\n \"threadId\": \"<string>\",\n \"summary\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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))
}require 'uri'
require 'net/http'
url = URI("https://api.nuntly.com/agents/{agentId}/memory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memory\": {\n \"lastTopic\": \"billing\",\n \"openTickets\": 2\n },\n \"inboxId\": \"ibx_01ka8k8s80gvx9604cn9am5st4\",\n \"threadId\": \"<string>\",\n \"summary\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"createdAt": "2026-03-29T12:00:00.000Z",
"updatedAt": "<string>",
"agentId": "<string>",
"inboxId": "ibx_01ka8k8s80gvx9604cn9am5st4",
"threadId": "<string>",
"memory": {},
"summary": "<string>"
}
}{
"error": {
"status": 123,
"code": "<string>",
"title": "<string>",
"details": {}
}
}Agents
Upsert Agent Memory
Saves the key-value memory and optional summary of an AI agent, at organization level or scoped to a specific inbox or thread. Returns the saved memory.
PUT
/
agents
/
{agentId}
/
memory
cURL
curl -X PUT 'https://api.nuntly.com/agents/aB3dE7fG/memory' \
-H 'Authorization: Bearer ntly_xxx' \
-H 'Content-Type: application/json' \
-d '{"memory":{"lastTopic":"billing","openTickets":2}}'import { Nuntly } from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'],
});
const response = await client.agents.memory.upsert('aB3dE7fG', {
memory: { lastTopic: 'billing', openTickets: 2 },
});import com.nuntly.sdk.Nuntly;
import com.nuntly.sdk.ClientOptions;
import com.nuntly.sdk.models.*;
var nuntly = Nuntly.create(ClientOptions.builder()
.apiKey(System.getenv("NUNTLY_API_KEY"))
.build());
var response = nuntly.agents().memory().upsert("aB3dE7fG", AgentMemoryRequest.builder()
.memory(java.util.Map.of("lastTopic", "billing", "openTickets", 2))
.build());import requests
url = "https://api.nuntly.com/agents/{agentId}/memory"
payload = {
"memory": {
"lastTopic": "billing",
"openTickets": 2
},
"inboxId": "ibx_01ka8k8s80gvx9604cn9am5st4",
"threadId": "<string>",
"summary": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nuntly.com/agents/{agentId}/memory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'memory' => [
'lastTopic' => 'billing',
'openTickets' => 2
],
'inboxId' => 'ibx_01ka8k8s80gvx9604cn9am5st4',
'threadId' => '<string>',
'summary' => '<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.nuntly.com/agents/{agentId}/memory"
payload := strings.NewReader("{\n \"memory\": {\n \"lastTopic\": \"billing\",\n \"openTickets\": 2\n },\n \"inboxId\": \"ibx_01ka8k8s80gvx9604cn9am5st4\",\n \"threadId\": \"<string>\",\n \"summary\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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))
}require 'uri'
require 'net/http'
url = URI("https://api.nuntly.com/agents/{agentId}/memory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memory\": {\n \"lastTopic\": \"billing\",\n \"openTickets\": 2\n },\n \"inboxId\": \"ibx_01ka8k8s80gvx9604cn9am5st4\",\n \"threadId\": \"<string>\",\n \"summary\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"createdAt": "2026-03-29T12:00:00.000Z",
"updatedAt": "<string>",
"agentId": "<string>",
"inboxId": "ibx_01ka8k8s80gvx9604cn9am5st4",
"threadId": "<string>",
"memory": {},
"summary": "<string>"
}
}{
"error": {
"status": 123,
"code": "<string>",
"title": "<string>",
"details": {}
}
}Authorizations
Use an API key from https://nuntly.com/api-keys. Required on every endpoint.
Path Parameters
The agent identifier.
Body
application/json
The agent memory key-value data.
Show child attributes
Show child attributes
Example:
{ "lastTopic": "billing", "openTickets": 2 }
The id of an inbox in your organization. Scopes memory to that inbox.
Example:
"ibx_01ka8k8s80gvx9604cn9am5st4"
The id of a thread in your organization. Scopes memory to that thread.
A human-readable conversation summary.
Response
Successful response.
Show child attributes
Show child attributes
