Skip to content

Unified Inbox

Aggregates comments and messages from connected social platforms.

API Endpoints

MethodEndpointDescription
GET/api/inboxList conversations
GET/api/inbox/:idGet conversation thread
POST/api/inbox/:id/replyReply to message/comment
POST/api/inbox/:id/archiveArchive conversation
POST/api/inbox/:id/sentimentUpdate sentiment label
POST/api/inbox/bulkBulk actions

Data Model

prisma
model InboxConversation {
  id              String
  companyId       String
  socialAccountId String
  platform        String
  type            String     // 'comment', 'dm', 'mention'
  participantId   String     // External user ID
  participantName String
  sentiment       String?    // 'positive', 'neutral', 'negative'
  isArchived      Boolean
  lastMessageAt   DateTime
  messages        InboxMessage[]
}

model InboxMessage {
  id             String
  conversationId String
  direction      String     // 'inbound', 'outbound'
  content        String
  sentAt         DateTime
  externalId     String?    // Platform's message ID
}

Platform Support

PlatformCommentsDMsMentions
Twitter/X
Facebook
Instagram
LinkedIn
Pinterest

Sync Process

  1. Webhook receives new activity
  2. Fetch full conversation/thread
  3. Upsert into InboxConversation
  4. AI sentiment analysis (optional)
  5. Notify user if enabled

Sentiment Analysis

Uses AI to classify message sentiment:

  • Positive: Praise, thanks, excitement
  • Neutral: Questions, general
  • Negative: Complaints, issues

TendSocial Documentation