curl --request PUT \
--url https://api.conare.ai/api/v1/memories/{externalId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endUserId": "u_123",
"source": "caeros-profile",
"version": 2,
"occurredAt": "2023-11-07T05:31:56Z",
"content": "<string>",
"containerTag": "workspace:acme",
"metadata": {}
}
'import requests
url = "https://api.conare.ai/api/v1/memories/{externalId}"
payload = {
"endUserId": "u_123",
"source": "caeros-profile",
"version": 2,
"occurredAt": "2023-11-07T05:31:56Z",
"content": "<string>",
"containerTag": "workspace:acme",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endUserId: 'u_123',
source: 'caeros-profile',
version: 2,
occurredAt: '2023-11-07T05:31:56Z',
content: '<string>',
containerTag: 'workspace:acme',
metadata: {}
})
};
fetch('https://api.conare.ai/api/v1/memories/{externalId}', 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/{externalId}",
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([
'endUserId' => 'u_123',
'source' => 'caeros-profile',
'version' => 2,
'occurredAt' => '2023-11-07T05:31:56Z',
'content' => '<string>',
'containerTag' => 'workspace:acme',
'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.conare.ai/api/v1/memories/{externalId}"
payload := strings.NewReader("{\n \"endUserId\": \"u_123\",\n \"source\": \"caeros-profile\",\n \"version\": 2,\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"content\": \"<string>\",\n \"containerTag\": \"workspace:acme\",\n \"metadata\": {}\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))
}HttpResponse<String> response = Unirest.put("https://api.conare.ai/api/v1/memories/{externalId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endUserId\": \"u_123\",\n \"source\": \"caeros-profile\",\n \"version\": 2,\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"content\": \"<string>\",\n \"containerTag\": \"workspace:acme\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conare.ai/api/v1/memories/{externalId}")
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 \"endUserId\": \"u_123\",\n \"source\": \"caeros-profile\",\n \"version\": 2,\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"content\": \"<string>\",\n \"containerTag\": \"workspace:acme\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"record": {
"source": "caeros-profile",
"externalId": "profile_123",
"version": 123,
"status": "active",
"occurredAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"documentId": "<string>",
"contentHash": "<string>"
},
"success": true,
"receipt": {
"source": "caeros-profile",
"externalId": "profile_123",
"version": 123,
"operation": "upsert",
"requestHash": "<string>",
"outcome": "created",
"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": {}
}{
"statusCode": 123,
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}Upsert a memory by external ID
Create or update a memory that mirrors a record your system owns.
Identity is (endUserId, source, externalId); bump version whenever
the source record changes.
- Retrying the same version and payload returns the same durable receipt — re-sending after a crash is safe.
- A different payload for an existing version returns
409. - Delayed older versions return
409and never overwrite newer content or undo a delete. - The memory lands in container
containerTagwhen provided, otherwise in containersource— either way it is reachable by container-scoped search/recall. A new version with a differentcontainerTagmoves the same memory to the new container.
curl --request PUT \
--url https://api.conare.ai/api/v1/memories/{externalId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endUserId": "u_123",
"source": "caeros-profile",
"version": 2,
"occurredAt": "2023-11-07T05:31:56Z",
"content": "<string>",
"containerTag": "workspace:acme",
"metadata": {}
}
'import requests
url = "https://api.conare.ai/api/v1/memories/{externalId}"
payload = {
"endUserId": "u_123",
"source": "caeros-profile",
"version": 2,
"occurredAt": "2023-11-07T05:31:56Z",
"content": "<string>",
"containerTag": "workspace:acme",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endUserId: 'u_123',
source: 'caeros-profile',
version: 2,
occurredAt: '2023-11-07T05:31:56Z',
content: '<string>',
containerTag: 'workspace:acme',
metadata: {}
})
};
fetch('https://api.conare.ai/api/v1/memories/{externalId}', 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/{externalId}",
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([
'endUserId' => 'u_123',
'source' => 'caeros-profile',
'version' => 2,
'occurredAt' => '2023-11-07T05:31:56Z',
'content' => '<string>',
'containerTag' => 'workspace:acme',
'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.conare.ai/api/v1/memories/{externalId}"
payload := strings.NewReader("{\n \"endUserId\": \"u_123\",\n \"source\": \"caeros-profile\",\n \"version\": 2,\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"content\": \"<string>\",\n \"containerTag\": \"workspace:acme\",\n \"metadata\": {}\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))
}HttpResponse<String> response = Unirest.put("https://api.conare.ai/api/v1/memories/{externalId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endUserId\": \"u_123\",\n \"source\": \"caeros-profile\",\n \"version\": 2,\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"content\": \"<string>\",\n \"containerTag\": \"workspace:acme\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conare.ai/api/v1/memories/{externalId}")
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 \"endUserId\": \"u_123\",\n \"source\": \"caeros-profile\",\n \"version\": 2,\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"content\": \"<string>\",\n \"containerTag\": \"workspace:acme\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"record": {
"source": "caeros-profile",
"externalId": "profile_123",
"version": 123,
"status": "active",
"occurredAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"documentId": "<string>",
"contentHash": "<string>"
},
"success": true,
"receipt": {
"source": "caeros-profile",
"externalId": "profile_123",
"version": 123,
"operation": "upsert",
"requestHash": "<string>",
"outcome": "created",
"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": {}
}{
"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.
Headers
Optional event key; reuse with a different mutation returns 409. Optional stable source-event key.
^[A-Za-z0-9][A-Za-z0-9._:-]{0,199}$Path Parameters
Stable ID of this record in the source system. Stable record ID inside the named source.
^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$"profile_123"
Body
Your stable internal user ID. No colon allowed.
1 - 128^[A-Za-z0-9@._-]{1,128}$"u_123"
Stable source-system name, such as caeros-profile or conversation.
^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"caeros-profile"
Monotonically increasing version for this source record.
x >= 1When the source event happened, not when the retry ran.
Correct current content (max 65536 UTF-8 bytes).
1Container this memory lands in, for container-scoped reads.
Omit and it lands in container source. Changing it on a later
version moves the memory; it never changes the record's
(source, externalId) identity.
1 - 128"workspace:acme"
Response
Mutation applied or converged to its prior receipt.