Chat WS API 0.0.11

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:

    SendMessageEventsendMessageEvent

    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:

    • #0MarkMessageDeliveredEventmarkMessageDeliveredEvent

      Event emitted when user receives new message

      Message IDmarkMessageDeliveredEvent
      object
      • #source:client

      Examples

    • #1MarkMessageReadEventmarkMessageReadEvent

      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:

    UpdateTypingEventupdateTypingEvent

    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:

    MessageAddedEventmessageAddedEvent

    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:

    MessageUpdatedEventmessageUpdatedEvent

    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:

    • #0UserConnectedEventuserConnectedEvent

      Event emitted by server when user connects to the room

      Message IDuserConnectedEvent
      object
      • #source:server

      Examples

    • #1UserDisconnectedEventuserDisconnectedEvent

      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:

    • #0MessageAddedEventmessageAddedEvent

      Event emitted when server adds new message to the room

      Message IDmessageAddedEvent
      object
      • #source:server

      Examples

    • #1ChatUpdatedEventchatUpdatedEvent

      Event emitted by server on chat updates

      Message IDchatUpdatedEvent
      object
      • #source:server

      Examples

    • #2OperatorUpdatedEventoperatorUpdatedEvent

      Event emitted by server on operator updates

      Message IDoperatorUpdatedEvent
      object
      • #source:server

      Examples

    • #3TypingUpdatedEventtypingUpdatedEvent

      Event emitted by server when user starts/stops typing

      Message IDtypingUpdatedEvent
      object
      • #source:server

      Examples

    • #4GlobalUpdatedEventglobalUpdatedEvent

      Event emitted by server on global data updates

      Message IDglobalUpdatedEvent
      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 BodychatBody

    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 BodyoperatorsBody

    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 users with role=type_role receive notifications.

    Operation IDcreateMessage

    Available only on servers:

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

    Accepts the following message:

    Message Request BodymessageBody

    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 BodyglobalBody

    Json encoded global data

    Message IDglobalBody
    object

    Event specific payload data

    object

    Examples

Messages

  • #1SendMessageEventsendMessageEvent

    Event emitted when user sends new message to the chat room

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

    Event emitted when user receives new message

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

    Event emitted when user reads a message

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

    Event emitted when server adds new message to the room

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

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

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

    Event emitted when server modifies existing message in the room

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

    Event emitted when user starts/stops typing

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

    Event emitted by server when user starts/stops typing

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

    Event emitted by server when user connects to the room

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

    Event emitted by server when user disconnects from the room

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

    Event emitted by server on chat updates

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

    Event emitted by server on operator updates

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

    Event emitted by server on global data updates

    Message IDglobalUpdatedEvent
    object
    • #source:server

Schemas

  • object

    User related information

  • object

    Additional chat information

  • object

    Message related information

  • object

    Operator related information