Skip to main content
POST
/
api
/
chat-history
/
ingest
/
custom-online
Upload chat history
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",
        "role": "human",
        "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"
}
'
{
  "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"
  }
}

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.id updates it with any new messages rather than duplicating it.
  • Dynamic platform naming: Supply a platform identifier 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 with status: "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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
conversation
object
required

The conversation to upload.

platform
string

Platform identifier for your integration (e.g., 'my-slack-bot', 'internal-tool'). Alphanumeric, hyphens, underscores, dots. Max 100 chars. Defaults to 'custom' if omitted.

Pattern: ^[a-zA-Z0-9\-_.]{1,100}$
Example:

"my-custom-app"

platformDisplayName
string

Human-readable display name for the platform shown in the UI. Max 200 chars. Overwrites previous value if supplied again for the same platform.

Maximum string length: 200
Example:

"My Custom App"

Response

Conversation queued for processing

queued
boolean

Whether the conversation was accepted for processing.

importId
string

The import record ID for this platform.

conversationId
string

The internal conversation ID assigned by MemoryPlugin.

platform
string

The resolved platform identifier.

conversation
object

Conversation details after upsert.