curl --request POST \
--url https://www.memoryplugin.com/api/chat-history/ingest/custom-online \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation": {
"id": "conv-abc-123",
"title": "Discussion about API design",
"createdAt": "2026-04-27T10:00:00Z",
"messages": [
{
"id": "msg-001",
"content": "How should we structure the API?",
"createdAt": "2026-04-27T10:00:00Z"
}
],
"updatedAt": "2026-04-27T11:30:00Z"
},
"platform": "my-custom-app",
"platformDisplayName": "My Custom App"
}
'import requests
url = "https://www.memoryplugin.com/api/chat-history/ingest/custom-online"
payload = {
"conversation": {
"id": "conv-abc-123",
"title": "Discussion about API design",
"createdAt": "2026-04-27T10:00:00Z",
"messages": [
{
"id": "msg-001",
"content": "How should we structure the API?",
"createdAt": "2026-04-27T10:00:00Z"
}
],
"updatedAt": "2026-04-27T11:30:00Z"
},
"platform": "my-custom-app",
"platformDisplayName": "My Custom App"
}
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({
conversation: {
id: 'conv-abc-123',
title: 'Discussion about API design',
createdAt: '2026-04-27T10:00:00Z',
messages: [
{
id: 'msg-001',
content: 'How should we structure the API?',
createdAt: '2026-04-27T10:00:00Z'
}
],
updatedAt: '2026-04-27T11:30:00Z'
},
platform: 'my-custom-app',
platformDisplayName: 'My Custom App'
})
};
fetch('https://www.memoryplugin.com/api/chat-history/ingest/custom-online', 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://www.memoryplugin.com/api/chat-history/ingest/custom-online",
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([
'conversation' => [
'id' => 'conv-abc-123',
'title' => 'Discussion about API design',
'createdAt' => '2026-04-27T10:00:00Z',
'messages' => [
[
'id' => 'msg-001',
'content' => 'How should we structure the API?',
'createdAt' => '2026-04-27T10:00:00Z'
]
],
'updatedAt' => '2026-04-27T11:30:00Z'
],
'platform' => 'my-custom-app',
'platformDisplayName' => 'My Custom App'
]),
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://www.memoryplugin.com/api/chat-history/ingest/custom-online"
payload := strings.NewReader("{\n \"conversation\": {\n \"id\": \"conv-abc-123\",\n \"title\": \"Discussion about API design\",\n \"createdAt\": \"2026-04-27T10:00:00Z\",\n \"messages\": [\n {\n \"id\": \"msg-001\",\n \"content\": \"How should we structure the API?\",\n \"createdAt\": \"2026-04-27T10:00:00Z\"\n }\n ],\n \"updatedAt\": \"2026-04-27T11:30:00Z\"\n },\n \"platform\": \"my-custom-app\",\n \"platformDisplayName\": \"My Custom App\"\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://www.memoryplugin.com/api/chat-history/ingest/custom-online")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversation\": {\n \"id\": \"conv-abc-123\",\n \"title\": \"Discussion about API design\",\n \"createdAt\": \"2026-04-27T10:00:00Z\",\n \"messages\": [\n {\n \"id\": \"msg-001\",\n \"content\": \"How should we structure the API?\",\n \"createdAt\": \"2026-04-27T10:00:00Z\"\n }\n ],\n \"updatedAt\": \"2026-04-27T11:30:00Z\"\n },\n \"platform\": \"my-custom-app\",\n \"platformDisplayName\": \"My Custom App\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.memoryplugin.com/api/chat-history/ingest/custom-online")
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 \"conversation\": {\n \"id\": \"conv-abc-123\",\n \"title\": \"Discussion about API design\",\n \"createdAt\": \"2026-04-27T10:00:00Z\",\n \"messages\": [\n {\n \"id\": \"msg-001\",\n \"content\": \"How should we structure the API?\",\n \"createdAt\": \"2026-04-27T10:00:00Z\"\n }\n ],\n \"updatedAt\": \"2026-04-27T11:30:00Z\"\n },\n \"platform\": \"my-custom-app\",\n \"platformDisplayName\": \"My Custom App\"\n}"
response = http.request(request)
puts response.read_body{
"queued": true,
"importId": "<string>",
"conversationId": "<string>",
"platform": "<string>",
"conversation": {
"id": "<string>",
"platformConversationId": "<string>",
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"messageCount": 123,
"status": "queued"
}
}{
"error": "<string>",
"text": "<string>",
"score": 123
}{
"error": "<string>",
"text": "<string>",
"score": 123
}{
"error": "<string>",
"text": "<string>",
"score": 123
}Upload Chat History
Upload a single conversation from any platform. Supports upsert semantics — re-sending a conversation with the same ID will update it with new messages. The conversation is processed asynchronously (chunked, embedded, and indexed for search).
curl --request POST \
--url https://www.memoryplugin.com/api/chat-history/ingest/custom-online \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation": {
"id": "conv-abc-123",
"title": "Discussion about API design",
"createdAt": "2026-04-27T10:00:00Z",
"messages": [
{
"id": "msg-001",
"content": "How should we structure the API?",
"createdAt": "2026-04-27T10:00:00Z"
}
],
"updatedAt": "2026-04-27T11:30:00Z"
},
"platform": "my-custom-app",
"platformDisplayName": "My Custom App"
}
'import requests
url = "https://www.memoryplugin.com/api/chat-history/ingest/custom-online"
payload = {
"conversation": {
"id": "conv-abc-123",
"title": "Discussion about API design",
"createdAt": "2026-04-27T10:00:00Z",
"messages": [
{
"id": "msg-001",
"content": "How should we structure the API?",
"createdAt": "2026-04-27T10:00:00Z"
}
],
"updatedAt": "2026-04-27T11:30:00Z"
},
"platform": "my-custom-app",
"platformDisplayName": "My Custom App"
}
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({
conversation: {
id: 'conv-abc-123',
title: 'Discussion about API design',
createdAt: '2026-04-27T10:00:00Z',
messages: [
{
id: 'msg-001',
content: 'How should we structure the API?',
createdAt: '2026-04-27T10:00:00Z'
}
],
updatedAt: '2026-04-27T11:30:00Z'
},
platform: 'my-custom-app',
platformDisplayName: 'My Custom App'
})
};
fetch('https://www.memoryplugin.com/api/chat-history/ingest/custom-online', 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://www.memoryplugin.com/api/chat-history/ingest/custom-online",
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([
'conversation' => [
'id' => 'conv-abc-123',
'title' => 'Discussion about API design',
'createdAt' => '2026-04-27T10:00:00Z',
'messages' => [
[
'id' => 'msg-001',
'content' => 'How should we structure the API?',
'createdAt' => '2026-04-27T10:00:00Z'
]
],
'updatedAt' => '2026-04-27T11:30:00Z'
],
'platform' => 'my-custom-app',
'platformDisplayName' => 'My Custom App'
]),
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://www.memoryplugin.com/api/chat-history/ingest/custom-online"
payload := strings.NewReader("{\n \"conversation\": {\n \"id\": \"conv-abc-123\",\n \"title\": \"Discussion about API design\",\n \"createdAt\": \"2026-04-27T10:00:00Z\",\n \"messages\": [\n {\n \"id\": \"msg-001\",\n \"content\": \"How should we structure the API?\",\n \"createdAt\": \"2026-04-27T10:00:00Z\"\n }\n ],\n \"updatedAt\": \"2026-04-27T11:30:00Z\"\n },\n \"platform\": \"my-custom-app\",\n \"platformDisplayName\": \"My Custom App\"\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://www.memoryplugin.com/api/chat-history/ingest/custom-online")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversation\": {\n \"id\": \"conv-abc-123\",\n \"title\": \"Discussion about API design\",\n \"createdAt\": \"2026-04-27T10:00:00Z\",\n \"messages\": [\n {\n \"id\": \"msg-001\",\n \"content\": \"How should we structure the API?\",\n \"createdAt\": \"2026-04-27T10:00:00Z\"\n }\n ],\n \"updatedAt\": \"2026-04-27T11:30:00Z\"\n },\n \"platform\": \"my-custom-app\",\n \"platformDisplayName\": \"My Custom App\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.memoryplugin.com/api/chat-history/ingest/custom-online")
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 \"conversation\": {\n \"id\": \"conv-abc-123\",\n \"title\": \"Discussion about API design\",\n \"createdAt\": \"2026-04-27T10:00:00Z\",\n \"messages\": [\n {\n \"id\": \"msg-001\",\n \"content\": \"How should we structure the API?\",\n \"createdAt\": \"2026-04-27T10:00:00Z\"\n }\n ],\n \"updatedAt\": \"2026-04-27T11:30:00Z\"\n },\n \"platform\": \"my-custom-app\",\n \"platformDisplayName\": \"My Custom App\"\n}"
response = http.request(request)
puts response.read_body{
"queued": true,
"importId": "<string>",
"conversationId": "<string>",
"platform": "<string>",
"conversation": {
"id": "<string>",
"platformConversationId": "<string>",
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"messageCount": 123,
"status": "queued"
}
}{
"error": "<string>",
"text": "<string>",
"score": 123
}{
"error": "<string>",
"text": "<string>",
"score": 123
}{
"error": "<string>",
"text": "<string>",
"score": 123
}Overview
Upload chat history from any platform to MemoryPlugin. This endpoint accepts a single conversation per request with your own unique identifiers for conversations and messages.Key features
- Upsert semantics: Re-sending a conversation with the same
conversation.idupdates it with any new messages rather than duplicating it. - Dynamic platform naming: Supply a
platformidentifier to group conversations by source. Each platform is scoped to your user account. - Full processing pipeline: Conversations are chunked, embedded, and indexed for semantic search, just like conversations imported via the browser extension.
Limits
- Conversations exceeding 100,000 tokens are rejected during background processing.
- Maximum payload size: 50 MB.
- Platform identifier: alphanumeric, hyphens, underscores, dots. Max 100 characters.
Processing
Conversations are processed asynchronously. The endpoint returns immediately withstatus: "queued". Background processing (chunking, embedding, vector indexing) typically completes within a few seconds for normal-sized conversations.
Example
curl -X POST https://www.memoryplugin.com/api/chat-history/ingest/custom-online \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "my-slack-bot",
"platformDisplayName": "My Slack Bot",
"conversation": {
"id": "conv-abc-123",
"title": "Discussion about architecture",
"createdAt": "2026-04-27T10:00:00Z",
"updatedAt": "2026-04-27T11:30:00Z",
"messages": [
{
"id": "msg-1",
"role": "human",
"content": "How should we structure the API?",
"createdAt": "2026-04-27T10:00:00Z"
},
{
"id": "msg-2",
"role": "assistant",
"content": "I would recommend a RESTful approach with versioned endpoints...",
"createdAt": "2026-04-27T10:01:00Z"
}
]
}
}'
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The conversation to upload.
Show child attributes
Show child attributes
Platform identifier for your integration (e.g., 'my-slack-bot', 'internal-tool'). Alphanumeric, hyphens, underscores, dots. Max 100 chars. Defaults to 'custom' if omitted.
^[a-zA-Z0-9\-_.]{1,100}$"my-custom-app"
Human-readable display name for the platform shown in the UI. Max 200 chars. Overwrites previous value if supplied again for the same platform.
200"My Custom App"
Response
Conversation queued for processing
Whether the conversation was accepted for processing.
The import record ID for this platform.
The internal conversation ID assigned by MemoryPlugin.
The resolved platform identifier.
Conversation details after upsert.
Show child attributes
Show child attributes
Was this page helpful?