Chat WS API 0.0.21

This Chat API allows your clients and operators to communicate in real time.

Servers

  • https://sockets-chat.bezlimit.ru/httpschat-sockets

    Deafault chat server

Operations

  • REPLY /chat

    Used to send new messages from clients/operators

    Operation IDsendMessage

    Available only on servers:

    object

    Accepts the following message:

    SendMessageEvent

    Event emitted when user sends new message to the chat room

    Message IDsendMessageEvent
    object
    • #source:client

    Examples

    REPLY INFORMATION

    REPLY CHANNEL INFORMATION

    Reply will be provided via this designated address: /chat
  • REPLY /chat

    Used to notify server that user has successefuly received/read message

    Operation IDupdateMessageStatus

    Available only on servers:

    object

    Accepts one of the following messages:

    • #0MarkMessageDeliveredEvent

      Event emitted when user receives new message

      Message IDmarkMessageDeliveredEvent
      object
      • #source:client

      Examples

    • #1MarkMessageReadEvent

      Event emitted when user reads a message

      Message IDmarkMessageReadEvent
      object
      • #source:client

      Examples

    REPLY INFORMATION

    REPLY CHANNEL INFORMATION

    Reply will be provided via this designated address: /chat
  • REPLY /chat

    Used to notify room about typing updates

    Operation IDupdateTyping

    Available only on servers:

    object

    Accepts the following message:

    UpdateTypingEvent

    Event emitted when user starts/stops typing

    Message IDupdateTypingEvent
    object
    • #source:client

    Examples

    REPLY INFORMATION

    REPLY CHANNEL INFORMATION

    Reply will be provided via this designated address: /chat
  • SEND /chat

    Used to notify users that a new message was added to the room

    Operation IDreceiveNewMessage

    Available only on servers:

    object

    Accepts the following message:

    MessageAddedEvent

    Event emitted when server adds new message to the room

    Message IDmessageAddedEvent
    object
    • #source:server

    Examples

  • SEND /chat

    Used to notify users that some message in the current room was updated

    Operation IDreceiveMessageUpdate

    Available only on servers:

    object

    Accepts the following message:

    MessageUpdatedEvent

    Event emitted when server modifies existing message in the room

    Message IDmessageUpdatedEvent
    object
    • #source:server

    Examples

  • SEND /chat

    Used to notify users that somebody just joined/left the room

    Operation IDtrackUserConnection

    Available only on servers:

    object

    Accepts one of the following messages:

    • #0UserConnectedEvent

      Event emitted by server when user connects to the room

      Message IDuserConnectedEvent
      object
      • #source:server

      Examples

    • #1UserDisconnectedEvent

      Event emitted by server when user disconnects from the room

      Message IDuserDisconnectedEvent
      object
      • #source:server

      Examples

  • SEND /broadcast

    Used to notify operators about new messages in every room and global updates

    Operation IDreceiveBroadcast

    Available only on servers:

    object

    Accepts one of the following messages:

    • #0MessageAddedEvent

      Event emitted when server adds new message to the room

      Message IDmessageAddedEvent
      object
      • #source:server

      Examples

    • #1MessageUpdatedEvent

      Event emitted when server modifies existing message in the room

      Message IDmessageUpdatedEvent
      object
      • #source:server

      Examples

    • #2ChatUpdatedEvent

      Event emitted by server on chat updates

      Message IDchatUpdatedEvent
      object
      • #source:server

      Examples

    • #3OperatorUpdatedEvent

      Event emitted by server on operator updates

      Message IDoperatorUpdatedEvent
      object
      • #source:server

      Examples

    • #4TypingUpdatedEvent

      Event emitted by server when user starts/stops typing

      Message IDtypingUpdatedEvent
      object
      • #source:server

      Examples

    • #5GlobalUpdatedEvent

      Event emitted by server on global data updates

      Message IDglobalUpdatedEvent
      object
      • #source:server

      Examples

    • #6ChatNotificationEvent

      Event emitted by server on chat notification

      Message IDchatNotificationEvent
      object
      • #source:server

      Examples

  • RECEIVE /update/chat

    Used to notify operators about updates in chat

    Operation IDupdateChat

    Available only on servers:

    Additional security requirements:
    • HTTP API key
      • Name: Api-Token
      • In: header
    object

    Accepts the following message:

    Chat Request Body

    Json encoded chat

    Message IDchatBody
    object

    Additional chat information

    Examples

  • RECEIVE /update/operators

    Used to notify broadcast listener about updates related to operators

    Operation IDupdateOperators

    Available only on servers:

    Additional security requirements:
    • HTTP API key
      • Name: Api-Token
      • In: header
    object

    Accepts the following message:

    Operators Request Body

    Json encoded operators data

    Message IDoperatorsBody
    array<object>

    List of updated operators data

    object

    Examples

  • RECEIVE /message

    Used to notify users about new messages

    Messages with type=standard are added to both chat and broadcast channels.

    Messages with type=system are added only to the chat channel, and only to users with role=type_role receive.

    Messages with type=note are only sent to operators in the relevant chat channel

    Messages with type=bot are added to both chat and broadcast channels.

    Operation IDcreateMessage

    Available only on servers:

    Additional security requirements:
    • HTTP API key
      • Name: Api-Token
      • In: header
    object

    Accepts the following message:

    Message Request Body

    Json encoded message data

    Message IDmessageBody
    object

    Message related information

    object

    Examples

  • RECEIVE /message

    Used to notify users about updates in messages

    Operation IDupdateMessage

    Available only on servers:

    Additional security requirements:
    • HTTP API key
      • Name: Api-Token
      • In: header
    object

    Accepts the following message:

    Message Request Body

    Json encoded message data

    Message IDmessageBody
    object

    Message related information

    object

    Examples

  • RECEIVE /global

    Used to notify broadcast listener about updates to global data

    Operation IDupdateGlobal

    Available only on servers:

    Additional security requirements:
    • HTTP API key
      • Name: Api-Token
      • In: header
    object

    Accepts the following message:

    Global Data Request Body

    Json encoded global data

    Message IDglobalBody
    object

    Event specific payload data

    object

    Examples

  • RECEIVE /online-users

    Used to retrieve active broadcast sessions for operators

    Operation IDgetOnlineUsers

    Available only on servers:

    Additional security requirements:
    • HTTP API key
      • Name: Api-Token
      • In: header
    object

    Accepts the following message:

    Online Users Response Body

    List of active broadcast sessions

    Message IDonlineUsersBody
    array<object>

    Active operator sessions with available widget and department sources

    Examples

  • RECEIVE /notifications/chat

    Used to notify operator about important events

    Notification is only sent to operator with id=chat.operator_user.id

    Operation IDcreateNotification

    Available only on servers:

    Additional security requirements:
    • HTTP API key
      • Name: Api-Token
      • In: header
    object

    Accepts the following message:

    Chat Request Body

    Json encoded chat

    Message IDchatBody
    object

    Additional chat information

    Examples

Messages

  • #1SendMessageEvent

    Event emitted when user sends new message to the chat room

    Message IDsendMessageEvent
    object
    • #source:client
  • #2MarkMessageDeliveredEvent

    Event emitted when user receives new message

    Message IDmarkMessageDeliveredEvent
    object
    • #source:client
  • #3MarkMessageReadEvent

    Event emitted when user reads a message

    Message IDmarkMessageReadEvent
    object
    • #source:client
  • #4MessageAddedEvent

    Event emitted when server adds new message to the room

    Message IDmessageAddedEvent
    object
    • #source:server
  • #5MessageNotAddedEvent

    Event emitted when server could not add new message to the room

    Message IDmessageNotAddedEvent
    object
    • #source:server
  • #6MessageUpdatedEvent

    Event emitted when server modifies existing message in the room

    Message IDmessageUpdatedEvent
    object
    • #source:server
  • #7UpdateTypingEvent

    Event emitted when user starts/stops typing

    Message IDupdateTypingEvent
    object
    • #source:client
  • #8TypingUpdatedEvent

    Event emitted by server when user starts/stops typing

    Message IDtypingUpdatedEvent
    object
    • #source:server
  • #9UserConnectedEvent

    Event emitted by server when user connects to the room

    Message IDuserConnectedEvent
    object
    • #source:server
  • #10UserDisconnectedEvent

    Event emitted by server when user disconnects from the room

    Message IDuserDisconnectedEvent
    object
    • #source:server
  • #11ChatUpdatedEvent

    Event emitted by server on chat updates

    Message IDchatUpdatedEvent
    object
    • #source:server
  • #12OperatorUpdatedEvent

    Event emitted by server on operator updates

    Message IDoperatorUpdatedEvent
    object
    • #source:server
  • #13GlobalUpdatedEvent

    Event emitted by server on global data updates

    Message IDglobalUpdatedEvent
    object
    • #source:server
  • #14ChatNotificationEvent

    Event emitted by server on chat notification

    Message IDchatNotificationEvent
    object
    • #source:server

Schemas

  • object

    Active operator session and its available broadcast sources

  • object

    User related information

  • object

    Additional chat information

  • object

    Message related information

  • object

    Operator related information