WebSocket API

Real-time updates via Socket.IO with Redis adapter

Connection

import { io } from 'socket.io-client';

const socket = io('https://devadm.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 Admin JWT / CRM access token — Admin namespace for CRM panel
  • /provider Logto JWT — Provider namespace for Provider API clients
  • /widget Widget key — Widget namespace for embeddable customer widgets
  • /customer Store key + optional session / anonymous token — Customer API namespace for external Customer App clients
  • /stat Public — Statistics namespace for real-time public counters

Events

admin namespace

chat:reaction:addedChat reaction addedServer → client
chat:reaction:removedChat reaction removedServer → client
attention_alertMention attention alertServer → client
notifications:messageAdmin notification changedServer → client
chat:activityChat list activityServer → client
order_sync:{sourceRefId}:messageOrder import completedServer → client
attention:dismissedAttention event dismissedServer → client
attention:snoozedAttention event snoozedServer → client
order:migration_startedOrder chat migration startedServer → client
order:migration_completedOrder chat migration completedServer → client
order:migration_failedOrder chat migration failedServer → client
{domain}:updatedEntity updated in domainServer → client
{domain}_feed:messageEntity feed messageServer → client
mattermost:{channelId}:messageMattermost timeline updateServer → client
{domain}:event_logDomain event log entryServer → client
socket:metrics_updatedSocket metrics updatedServer → client
presence:updatePresence status changedServer → client
presence:resultPresence query resultServer → client
user:typingUser started typingServer → client
user:typing:stopUser stopped typingServer → client
chat:messageChat message receivedServer → client
chat:notificationChat notificationServer → client
channel:readChannel marked as readServer → client
message:readMessage read receiptServer → client
chat:alertChat alert for profileServer → client
chat:{chatId}:messageChat assignment changedServer → client
followed_chatsFollowed chats listServer → client
chat:createdNew chat entity createdServer → client
attention:item_addedAttention item addedServer → client
attention:item_removedAttention item removedServer → client
attention:item_resolvedAttention item resolvedServer → client
attention:item_snoozedAttention item snoozedServer → client
attention:item_restoredAttention item restoredServer → client
attention:item_movedAttention item movedServer → client
attention:items_changedAttention items bulk changeServer → client
attention:reraisedAttention item reraised (legacy)Server → client
subscribeSubscribe to domains and channelsClient → server
unsubscribeUnsubscribe from domains and channelsClient → server
get_followed_chatsRequest followed chatsClient → server
channel:viewingStart viewing channelClient → server
channel:leftStop viewing channelClient → server
presence:queryQuery presence statusClient → server
typing:startStart typing indicatorClient → server
typing:stopStop typing indicatorClient → server

provider namespace

chat:reaction:addedChat reaction addedServer → client
chat:reaction:removedChat reaction removedServer → client
notification:{eventType}Recipient notification changedServer → client
attention_alertMention attention alertServer → client
channel:updatedChannel status changedServer → client
offer:listedOffer listedServer → client
offer:delistedOffer delistedServer → client
notification:soundNotification sound cueServer → client
attention:refreshRefresh provider attentionServer → client
event_logActivity timeline eventServer → client
presence:updatePresence status changedServer → client
presence:resultPresence query resultServer → client
user:typingUser started typingServer → client
user:typing:stopUser stopped typingServer → client
chat:messageChat message receivedServer → client
chat:actionEmbed action clickedServer → client
chat:notificationChat notificationServer → client
channel:readChannel marked as readServer → client
message:readMessage read receiptServer → client
chat:alertChat alert for profileServer → client
chat:createdNew chat channel availableServer → client
typing:startStart typing indicatorClient → server
typing:stopStop typing indicatorClient → server
presence:queryQuery presence statusClient → server

widget namespace

widget:updateWidget configuration updateServer → client
widget:intercom:notifyIntercom ticket notificationServer → client
discord:request-responseDiscord request responseServer → client
discord:request-sendSend Discord boost requestClient → server

customer namespace

chat:reaction:addedChat reaction addedServer → client
chat:reaction:removedChat reaction removedServer → client
notification:{eventType}Recipient notification changedServer → client
event_logActivity timeline eventServer → client
chat:messageChat message from MattermostServer → client
chat:actionEmbed action clickedServer → client
order:updatedOrder changedServer → client
deal:updatedDeal updatedServer → client
ticket:updatedTicket updatedServer → client
coins:updatedCoins balance changedServer → client
identity:revokedIdentity revoked (storefront logout or sign-out-all)Server → client
channel:readChannel marked as readServer → client
message:readPer-message read boundaryServer → client
identity:updateIdentity field became availableServer → client
chat:createdNew chat channel availableServer → client
channel:updatedChannel status changedServer → client
user:typingUser started typingServer → client
user:typing:stopUser stopped typingServer → client
presence:updatePresence status changedServer → client
typing:startStart typing indicatorClient → server
typing:stopStop typing indicatorClient → server
chat:subscribeSubscribe to chat roomClient → server

stat namespace

stat:loadInitial statistics snapshotServer → client
stat:updateIncremental statistics updateServer → client

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). Subscription filters use colon notation: 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 (default: 3 attempts; configurable per subscription)

Events (56)

deal

deal.updatedDeal fields updated
deal.provider_changedDeal provider changed
deal.scheduled_date_triggeredDeal scheduled date triggered
deal.timing_addedDeal timing added
deal.timing_updatedDeal timing updated
deal.link_addedDeal external link added
deal.link_updatedDeal external link updated
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.link_addedOrder external link added
order.link_updatedOrder external link updated
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.updatedOrder updated
order.coins_transactionOrder coins transaction

payout

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

customer

customer.createdCustomer created
customer.kyc_completedCustomer KYC completed
customer.kyc_requestedCustomer KYC requested
customer.kyc_status_changedCustomer KYC status changed
customer.coins_adjustedCustomer coins adjusted
customer.manager_assignedCustomer manager assigned
customer.manager_reassignedCustomer manager reassigned
customer.updatedCustomer updated
customer.note_updatedCustomer note updated

provider

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

product

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

profile

profile.createdProfile created
profile.kyc_status_changedProfile KYC status changed
profile.kyc_requestedProfile KYC requested
profile.username_changedProfile username changed
profile.updatedProfile updated

store

store.createdStore created
store.updatedStore updated
Loading changelog...