POST
/
integrations
/
chat
curl -X POST 'https://api.memsync.ai/integrations/chat' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "platform": "chatgpt",
    "chat_data": [
      {
        "timestamp": "2024-01-15T14:30:00Z",
        "role": "user",
        "content": "Tell me about machine learning applications in healthcare"
      },
      {
        "timestamp": "2024-01-15T14:30:15Z", 
        "role": "assistant",
        "content": "Machine learning has numerous applications in healthcare..."
      }
    ],
    "extract_mode": "conversations"
  }'
{
  "integration_id": "chat_int_789abc",
  "platform": "chatgpt",
  "status": "completed",
  "processing_stats": {
    "total_messages": 24,
    "conversations_identified": 3,
    "memories_extracted": 5,
    "topics_detected": [
      "Machine Learning in Healthcare",
      "Python Programming",
      "Career Development"
    ],
    "date_range": {
      "start": "2024-01-10T09:00:00Z",
      "end": "2024-01-15T17:30:00Z"
    }
  },
  "memories": [
    {
      "memory_id": "mem_chat_001",
      "content": "Discussed machine learning applications in medical diagnosis, specifically how neural networks can improve accuracy in identifying diseases from medical imaging. Learned about specific techniques and real-world implementations.",
      "category": "learning",
      "conversation_topic": "Machine Learning in Healthcare",
      "participants": ["user", "assistant"],
      "start_time": "2024-01-15T14:30:00Z",
      "end_time": "2024-01-15T14:45:00Z"
    }
  ]
}
Import chat histories from various platforms to automatically extract and store conversational memories.
curl -X POST 'https://api.memsync.ai/integrations/chat' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "platform": "chatgpt",
    "chat_data": [
      {
        "timestamp": "2024-01-15T14:30:00Z",
        "role": "user",
        "content": "Tell me about machine learning applications in healthcare"
      },
      {
        "timestamp": "2024-01-15T14:30:15Z", 
        "role": "assistant",
        "content": "Machine learning has numerous applications in healthcare..."
      }
    ],
    "extract_mode": "conversations"
  }'

Request Body

platform
string
required
Chat platform source. Supported: chatgpt, claude, telegram, whatsapp, slack, discord
chat_data
array
required
Array of chat messages
extract_mode
string
default:"conversations"
Extraction strategy. Options: conversations, insights, topics, all
conversation_settings
object
Settings for conversation processing
auto_categorize
boolean
default:"true"
Whether to automatically categorize extracted memories

Response

integration_id
string
Unique identifier for the chat integration
platform
string
Chat platform that was processed
status
string
Processing status: processing, completed, error
processing_stats
object
Statistics about the processing
memories
array
List of extracted memories
{
  "integration_id": "chat_int_789abc",
  "platform": "chatgpt",
  "status": "completed",
  "processing_stats": {
    "total_messages": 24,
    "conversations_identified": 3,
    "memories_extracted": 5,
    "topics_detected": [
      "Machine Learning in Healthcare",
      "Python Programming",
      "Career Development"
    ],
    "date_range": {
      "start": "2024-01-10T09:00:00Z",
      "end": "2024-01-15T17:30:00Z"
    }
  },
  "memories": [
    {
      "memory_id": "mem_chat_001",
      "content": "Discussed machine learning applications in medical diagnosis, specifically how neural networks can improve accuracy in identifying diseases from medical imaging. Learned about specific techniques and real-world implementations.",
      "category": "learning",
      "conversation_topic": "Machine Learning in Healthcare",
      "participants": ["user", "assistant"],
      "start_time": "2024-01-15T14:30:00Z",
      "end_time": "2024-01-15T14:45:00Z"
    }
  ]
}

Extraction Modes

Supported Platforms

Privacy and Security

  • Data Processing: Chat data is processed securely and not stored permanently
  • Participant Privacy: Names and identifiers can be anonymized
  • Content Filtering: Sensitive content is automatically filtered out
  • Retention: Original chat data is deleted after processing