WebSocket API
Real-time updates via Socket.IO with Redis adapter
Connection
import { io } from 'socket.io-client';
const socket = io('https://api.mmonster.co/admin', {
auth: { token: 'your-jwt-token' }
});
socket.emit('subscribe', {
entities: { orders: [101], deals: [555] }
});
socket.on('orders_updated', (data) => console.log(data));
Namespaces
- /admin JWT token — Admin namespace for CRM panel
- /provider Logto JWT — Provider namespace for Provider App
- /widget Widget key — Widget namespace for embeddable customer widgets
- /stat No auth — Statistics namespace for real-time public counters
Events
admin namespace
{domain}_updatedEntity updated in domain{feedChannel}_messageEntity feed messageevent_log_createdEvent log entry created{domain}_event_logDomain event log entrysocket_metrics_updatedSocket metrics updatedpresence:updatePresence status changedpresence:resultPresence query resultuser:typingUser started typinguser:typing:stopUser stopped typingchat_messageChat message receivedchatNotificationChat notificationchannel:readChannel marked as readmessage:readMessage read receiptchat_alertChat alert for profileassignment_changedChat assignment changedfollowed_chatsFollowed chats listattention:item_addedAttention item addedattention:item_removedAttention item removedattention:item_resolvedAttention item resolvedattention:item_snoozedAttention item snoozedattention:item_restoredAttention item restoredattention:item_movedAttention item movedattention:items_changedAttention items bulk changeattention:reraisedAttention item reraised (legacy)subscribeSubscribe to domains and channelsunsubscribeUnsubscribe from domains and channelsget_followed_chatsRequest followed chatschannel:viewingStart viewing channelchannel:leftStop viewing channelpresence:queryQuery presence statustyping:startStart typing indicatortyping:stopStop typing indicatorprovider namespace
presence:updatePresence status changedpresence:resultPresence query resultuser:typingUser started typinguser:typing:stopUser stopped typingchat_messageChat message receivedchatNotificationChat notificationchannel:readChannel marked as readmessage:readMessage read receiptchat_alertChat alert for profiletyping:startStart typing indicatortyping:stopStop typing indicatorpresence:queryQuery presence statuswidget namespace
widget:updateWidget configuration updatewidget:intercom:notifyIntercom ticket notificationdiscord:request-responseDiscord request responsediscord:request-sendSend Discord boost requeststat namespace
stat:loadInitial statistics snapshotstat:updateIncremental statistics updateWebhook Events
Outbound HTTP callbacks dispatched when platform events occur
Overview
Subscribe to events via the REST API (POST /crm/webhook-subscriptions).
When an event fires, the platform sends a signed HTTP POST to your endpoint with the event payload.
Event types follow the pattern domain.event_type (e.g., deal.status_changed).
Use wildcards in subscriptions: deal.* matches all deal events.
- HMAC All deliveries signed with HMAC-SHA256 — verify via
X-Webhook-Signatureheader - RETRY Failed deliveries retried with exponential backoff (3 attempts)
Events (37)
deal
deal.createdDeal createddeal.status_changedDeal status changeddeal.provider_assignedProvider assigned to dealdeal.provider_reassignedProvider reassigned to dealdeal.completedDeal completeddeal.returnedDeal returned for revisiondeal.note_updatedDeal note updateddeal.reminder_triggeredDeal reminder triggereddeal.deadline_triggeredDeal deadline triggereddeal.message_sentDeal message sentdeal.report_offlineClient reported offlinedeal.report_problemDeal problem reportedorder
order.createdOrder createdorder.status_changedOrder status changedorder.payment_status_changedOrder payment status changedorder.shipping_status_changedOrder shipping status changedorder.note_updatedOrder note updatedorder.coins_transactionOrder coins transactionpayout
payout.createdPayout requestedpayout.status_changedPayout status changedpayout.note_updatedPayout note updatedcustomer
customer.createdCustomer createdcustomer.kyc_completedCustomer KYC completedcustomer.coins_adjustedCustomer coins adjustedcustomer.manager_assignedCustomer manager assignedcustomer.manager_reassignedCustomer manager reassignedcustomer.updatedCustomer updatedprovider
provider.createdProvider createdprovider.status_changedProvider status changedprovider.note_updatedProvider note updatedproduct
product.createdProduct createdproduct.pricing_changedProduct pricing changedproduct.autodeal_changedProduct auto-deal config changedprofile
profile.createdProfile createdprofile.kyc_status_changedProfile KYC status changedprofile.username_changedProfile username changedprofile.updatedProfile updatedLoading changelog...