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 message
event_log_createdEvent log entry created
{domain}_event_logDomain event log entry
socket_metrics_updatedSocket metrics updated
presence:updatePresence status changed
presence:resultPresence query result
user:typingUser started typing
user:typing:stopUser stopped typing
chat_messageChat message received
chatNotificationChat notification
channel:readChannel marked as read
message:readMessage read receipt
chat_alertChat alert for profile
assignment_changedChat assignment changed
followed_chatsFollowed chats list
attention:item_addedAttention item added
attention:item_removedAttention item removed
attention:item_resolvedAttention item resolved
attention:item_snoozedAttention item snoozed
attention:item_restoredAttention item restored
attention:item_movedAttention item moved
attention:items_changedAttention items bulk change
attention:reraisedAttention item reraised (legacy)
subscribeSubscribe to domains and channels
unsubscribeUnsubscribe from domains and channels
get_followed_chatsRequest followed chats
channel:viewingStart viewing channel
channel:leftStop viewing channel
presence:queryQuery presence status
typing:startStart typing indicator
typing:stopStop typing indicator

provider namespace

presence:updatePresence status changed
presence:resultPresence query result
user:typingUser started typing
user:typing:stopUser stopped typing
chat_messageChat message received
chatNotificationChat notification
channel:readChannel marked as read
message:readMessage read receipt
chat_alertChat alert for profile
typing:startStart typing indicator
typing:stopStop typing indicator
presence:queryQuery presence status

widget namespace

widget:updateWidget configuration update
widget:intercom:notifyIntercom ticket notification
discord:request-responseDiscord request response
discord:request-sendSend Discord boost request

stat namespace

stat:loadInitial statistics snapshot
stat:updateIncremental statistics update

Webhook 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-Signature header
  • RETRY Failed deliveries retried with exponential backoff (3 attempts)

Events (37)

deal

deal.createdDeal created
deal.status_changedDeal status changed
deal.provider_assignedProvider assigned to deal
deal.provider_reassignedProvider reassigned to deal
deal.completedDeal completed
deal.returnedDeal returned for revision
deal.note_updatedDeal note updated
deal.reminder_triggeredDeal reminder triggered
deal.deadline_triggeredDeal deadline triggered
deal.message_sentDeal message sent
deal.report_offlineClient reported offline
deal.report_problemDeal problem reported

order

order.createdOrder created
order.status_changedOrder status changed
order.payment_status_changedOrder payment status changed
order.shipping_status_changedOrder shipping status changed
order.note_updatedOrder note updated
order.coins_transactionOrder coins transaction

payout

payout.createdPayout requested
payout.status_changedPayout status changed
payout.note_updatedPayout note updated

customer

customer.createdCustomer created
customer.kyc_completedCustomer KYC completed
customer.coins_adjustedCustomer coins adjusted
customer.manager_assignedCustomer manager assigned
customer.manager_reassignedCustomer manager reassigned
customer.updatedCustomer updated

provider

provider.createdProvider created
provider.status_changedProvider status changed
provider.note_updatedProvider note updated

product

product.createdProduct created
product.pricing_changedProduct pricing changed
product.autodeal_changedProduct auto-deal config changed

profile

profile.createdProfile created
profile.kyc_status_changedProfile KYC status changed
profile.username_changedProfile username changed
profile.updatedProfile updated
Loading changelog...