Batch upsert by external ID
curl --request POST \
--url https://api.conare.ai/api/v1/memories/lifecycle-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endUserId": "u_123",
"items": [
{
"source": "caeros-profile",
"externalId": "profile_123",
"version": 1752662400000,
"occurredAt": "2026-07-16T10:00:00Z",
"content": "User prefers smaller islands and quiet anchorages.",
"metadata": {
"field": "trip_preferences"
}
}
]
}
'import requests
url = "https://api.conare.ai/api/v1/memories/lifecycle-batch"
payload = {
"endUserId": "u_123",
"items": [
{
"source": "caeros-profile",
"externalId": "profile_123",
"version": 1752662400000,
"occurredAt": "2026-07-16T10:00:00Z",
"content": "User prefers smaller islands and quiet anchorages.",
"metadata": { "field": "trip_preferences" }
}
]
}
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({
endUserId: 'u_123',
items: [
{
source: 'caeros-profile',
externalId: 'profile_123',
version: 1752662400000,
occurredAt: '2026-07-16T10:00:00Z',
content: 'User prefers smaller islands and quiet anchorages.',
metadata: {field: 'trip_preferences'}
}
]
})
};
fetch('https://api.conare.ai/api/v1/memories/lifecycle-batch', 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.conare.ai/api/v1/memories/lifecycle-batch",
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([
'endUserId' => 'u_123',
'items' => [
[
'source' => 'caeros-profile',
'externalId' => 'profile_123',
'version' => 1752662400000,
'occurredAt' => '2026-07-16T10:00:00Z',
'content' => 'User prefers smaller islands and quiet anchorages.',
'metadata' => [
'field' => 'trip_preferences'
]
]
]
]),
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.conare.ai/api/v1/memories/lifecycle-batch"
payload := strings.NewReader("{\n \"endUserId\": \"u_123\",\n \"items\": [\n {\n \"source\": \"caeros-profile\",\n \"externalId\": \"profile_123\",\n \"version\": 1752662400000,\n \"occurredAt\": \"2026-07-16T10:00:00Z\",\n \"content\": \"User prefers smaller islands and quiet anchorages.\",\n \"metadata\": {\n \"field\": \"trip_preferences\"\n }\n }\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.conare.ai/api/v1/memories/lifecycle-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endUserId\": \"u_123\",\n \"items\": [\n {\n \"source\": \"caeros-profile\",\n \"externalId\": \"profile_123\",\n \"version\": 1752662400000,\n \"occurredAt\": \"2026-07-16T10:00:00Z\",\n \"content\": \"User prefers smaller islands and quiet anchorages.\",\n \"metadata\": {\n \"field\": \"trip_preferences\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conare.ai/api/v1/memories/lifecycle-batch")
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 \"endUserId\": \"u_123\",\n \"items\": [\n {\n \"source\": \"caeros-profile\",\n \"externalId\": \"profile_123\",\n \"version\": 1752662400000,\n \"occurredAt\": \"2026-07-16T10:00:00Z\",\n \"content\": \"User prefers smaller islands and quiet anchorages.\",\n \"metadata\": {\n \"field\": \"trip_preferences\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"applied": 123,
"failed": 123,
"items": [
{
"success": true,
"status": 123,
"code": "<string>",
"message": "<string>",
"record": {
"source": "caeros-profile",
"externalId": "profile_123",
"version": 123,
"occurredAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"documentId": "<string>",
"contentHash": "<string>"
},
"receipt": {
"source": "caeros-profile",
"externalId": "profile_123",
"version": 123,
"requestHash": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"appliedAt": "2023-11-07T05:31:56Z",
"documentId": "<string>",
"contentHash": "<string>"
}
}
]
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}Memories
Batch upsert by external ID
Apply up to 100 versioned source upserts in one call — the bulk path for mirroring a system of record.
- Each item is the single-item
PUT /api/v1/memories/{externalId}shape with the same semantics: identical retries replay the same receipt, and version conflicts return per-item409s. success: truemeans the batch was processed — never that every item succeeded. Check the ordered per-item results.- Resume after a crash by re-sending: mark items done on per-item
success or per-item
409(both mean the version is durable). A400or413means nothing was applied.
POST
/
api
/
v1
/
memories
/
lifecycle-batch
Batch upsert by external ID
curl --request POST \
--url https://api.conare.ai/api/v1/memories/lifecycle-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endUserId": "u_123",
"items": [
{
"source": "caeros-profile",
"externalId": "profile_123",
"version": 1752662400000,
"occurredAt": "2026-07-16T10:00:00Z",
"content": "User prefers smaller islands and quiet anchorages.",
"metadata": {
"field": "trip_preferences"
}
}
]
}
'import requests
url = "https://api.conare.ai/api/v1/memories/lifecycle-batch"
payload = {
"endUserId": "u_123",
"items": [
{
"source": "caeros-profile",
"externalId": "profile_123",
"version": 1752662400000,
"occurredAt": "2026-07-16T10:00:00Z",
"content": "User prefers smaller islands and quiet anchorages.",
"metadata": { "field": "trip_preferences" }
}
]
}
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({
endUserId: 'u_123',
items: [
{
source: 'caeros-profile',
externalId: 'profile_123',
version: 1752662400000,
occurredAt: '2026-07-16T10:00:00Z',
content: 'User prefers smaller islands and quiet anchorages.',
metadata: {field: 'trip_preferences'}
}
]
})
};
fetch('https://api.conare.ai/api/v1/memories/lifecycle-batch', 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.conare.ai/api/v1/memories/lifecycle-batch",
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([
'endUserId' => 'u_123',
'items' => [
[
'source' => 'caeros-profile',
'externalId' => 'profile_123',
'version' => 1752662400000,
'occurredAt' => '2026-07-16T10:00:00Z',
'content' => 'User prefers smaller islands and quiet anchorages.',
'metadata' => [
'field' => 'trip_preferences'
]
]
]
]),
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.conare.ai/api/v1/memories/lifecycle-batch"
payload := strings.NewReader("{\n \"endUserId\": \"u_123\",\n \"items\": [\n {\n \"source\": \"caeros-profile\",\n \"externalId\": \"profile_123\",\n \"version\": 1752662400000,\n \"occurredAt\": \"2026-07-16T10:00:00Z\",\n \"content\": \"User prefers smaller islands and quiet anchorages.\",\n \"metadata\": {\n \"field\": \"trip_preferences\"\n }\n }\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.conare.ai/api/v1/memories/lifecycle-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endUserId\": \"u_123\",\n \"items\": [\n {\n \"source\": \"caeros-profile\",\n \"externalId\": \"profile_123\",\n \"version\": 1752662400000,\n \"occurredAt\": \"2026-07-16T10:00:00Z\",\n \"content\": \"User prefers smaller islands and quiet anchorages.\",\n \"metadata\": {\n \"field\": \"trip_preferences\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conare.ai/api/v1/memories/lifecycle-batch")
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 \"endUserId\": \"u_123\",\n \"items\": [\n {\n \"source\": \"caeros-profile\",\n \"externalId\": \"profile_123\",\n \"version\": 1752662400000,\n \"occurredAt\": \"2026-07-16T10:00:00Z\",\n \"content\": \"User prefers smaller islands and quiet anchorages.\",\n \"metadata\": {\n \"field\": \"trip_preferences\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"applied": 123,
"failed": 123,
"items": [
{
"success": true,
"status": 123,
"code": "<string>",
"message": "<string>",
"record": {
"source": "caeros-profile",
"externalId": "profile_123",
"version": 123,
"occurredAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"documentId": "<string>",
"contentHash": "<string>"
},
"receipt": {
"source": "caeros-profile",
"externalId": "profile_123",
"version": 123,
"requestHash": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"appliedAt": "2023-11-07T05:31:56Z",
"documentId": "<string>",
"contentHash": "<string>"
}
}
]
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}Authorizations
A scoped Integration key, prefixed cint_. Send as
Authorization: Bearer cint_... on every request. Server-side only.
Legacy personal cmem_... keys remain accepted during migration;
team/org-scoped cmem_... keys are not valid on this API.
Body
application/json
Response
Batch processed; inspect each ordered per-item result.
⌘I