Fizz Documentation (1.0.0)

Introduction

Fizz is a platform aimed at improving user acquisition, retention and conversion. Fizz provides different services that work together to achieve these goals. However, it is also possible to opt in the services individually to add value to your products (depending on your needs). Following is a brief description of the Fizz services:

Chat

Chat is a multilingual chat solution for powering global audiences in games. The Chat service is segregated into a RESTful API that allows performing different operations on the service (e.g. publish a message) and a messaging system that implements the MQTT protocol. It is possible to perform operations on the service without integrating the messaging system. This allows systems to perform operations (such as send custom messages based on game events in a channel) without needing to integrate the messaging (MQTT) system.

Analytics

Provides insights into user behavior by running analyses on application events. These events are collected via the ingestion API. The platform specializes in allowing user chat data to be mined for insights by cross referencing user behavioral data with the chat logs.

Cloud Messaging

Creates channels of communication that allows messages to be sent to different segments of users, e.g. push in-app messages to all whales or to user in their first week of usage, etc.

Translate

Translate text in 36 languages in real-time with slang support.

Config

Using segmented application configurations engineer custom experiences for users. For instance run different tutorials based on user age, perform A/B tests, etc

Glossary

Application

A tenant of the system. Each application's state is segregated from the others. An application can perform operations on resources owned by itself only.

User

All operations in the Fizz services are performed by users. A user is anyone (anything) that uses the Fizz system. Users can include application users, bots, systems, etc. Please note that Fizz does not ensure that users are uniquely identified, it is the responsibility of the application system to assign unique identifiers to users.

Subscriber

An entity that subscribes to messages published on a topic (or channel).

Topic

Fizz implements a topic-based publish-subscribe system that allows entities (publishers) to send messages to subscribers in a reliable way.

Channel

Establishes a channel of communication (or "chat-room") between different entities. Entities can publish messages to a channel, which are then delivered to all subscribing entities. Channels persist all messages to a message journal, which allows offline entities to read through the message history. A channel can also comprise of multiple topics for load-balancing large channels.

Event

A thing of interest that takes place in a system. Fizz allows events to be ingested into the system. The analytics service runs various kinds of analyses on the ingested data to extract valuable insights.

Security

Resource Owner

All resources in the Fizz platform are owned by an application. Each application is authorized to access its own resources only and cross application resource sharing is not allowed.

Auth Grants

Fizz can only authenticate and authorize applications. Each application is supplied an Id and a secret which can be used to authorize the application. Since the platform cannot authenticate or authorize users, the application must grant users rights to its resources (scoped to that user).

User Sessions

To grant a user access to resources (owned by the application) a user session must be generated. To generate a user session the application must authenticate itself.

Application Authentication

Authentication is performed by generating a signature of the request body using the application secret. The secret is used to compute an HMAC-SHA256 (base64 encoded) digest of the raw body of the request. It is expected that the digest is supplied in the Authorization header with the keyword HMAC-SHA256.

    private string GenerateHmac(string json, string secretKey)
    {
        var encoding = new System.Text.UTF8Encoding();
        var body = encoding.GetBytes(json);
        var key = encoding.GetBytes(secretKey);

        using (var encoder = new HMACSHA256(key))
        {
            byte[] hashmessage = encoder.ComputeHash(body);
            return System.Convert.ToBase64String(hashmessage);
        }
    }

    digest = GenerateHmac(requestBody, appSecret)

    //Set authorization header to "HMAC-SHA256 digest" when sending request

Client Authentication Integration

A signature based authentication mechanism allows user sessions to be generated from the application client as well. A signature based authentication protects against a MITM attack (by not sending the credentials over the wire). It is however recommended that the user sessions are generated from the application server for higher security. Please keep in mind that the Id and secret gives access to all resources owned by the application and cannot be changed once generated.

User Moderation

The chat service allows the role of administrator to be assigned to users. This is an application scoped role and assigned rights to users to perform (almost) any operation on any resource in the service. It is therefore not recommended to assign application end users the role of administrators.

The following user moderation operations are available to administrators:

Message Deletion

Delete messages sent by users (excluding administrators) in a channel. This allows administrators to moderate the content published by users.

Muting

Muted users have read-only access to the channel (they can only read messages in a channel).

Banning

Banned users are prevented from performing any operation on a channel.

Messaging System Integration

Real-Time Events

The Fizz platform includes a messaging service that supports sending real-time messages between internet enabled machines (devices, services, etc). The Chat service uses the messaging system to push real-time events to the end users. These include events such as chat message published, chat message modified and chat message deleted.

MQTT

The messaging system implements the MQTT protocol. MQTT is a lightweight publish-subscribe message transport. The pubsub model allows message publishers to communicate with message subscribers via topics. This allows the two to be decoupled from on another.

Please see http://mqtt.org/ for more details.

Being an open standard MQTT supports a wide variety of platforms. For a list of MQTT clients please see the https://github.com/mqtt/mqtt.github.io/wiki/libraries.

The Fizz MQTT broker can be accessed at mqtt.fizz.io (please note that TLS is supported).

MQTT Standard Support

Currently Chat does not support all the MQTT operations. All topic subscription and message publishing is done using the REST API. However in the future more of the MQTT protocol will be supported.

User Sessions

On connection a session is created for a user. A user session stores all topic subscriptions and all unread messages. On session expiration the topic subscriptions and unread messages are removed as well. When connecting with the messaging system the 'Session Present' flag is set to true if a session is being resumed or false if a new session is being created.

At least Once Delivery

The messaging system supports the QoS1 quality level for ensuring alteast once delivery. However this quality level is ensured as long as the user has an existing session on the system. This prevents message loss for a user that has intermittent access to the internet.

State Synchronization

As mentioned, a user session in the messaging system stores both the topic subscriptions and the unread messages. If a new user session is started the application client must synchronize the state with the system. This includes the following:

  1. Subscribe (or resubscribe) to all channels the user is interested in.
  2. Fetch the last page of messages from the channel message journal.

Therefore when connecting with the system the client must check the value of the 'Session Present' flag and perform the following:

  void OnConnected(bool sessionPresent) 
  {
      if (sessionPresent) 
      {
          return; // do nothing since all missed messages will be received
      }

      foreach (string channel in channelList) 
      {
          subscribeToChannel(channel); // subscribe to channel
          fetchMessages(channel); // store last page of messages in channel
      }
  }

Topic Messages

All message payloads published on the MQTT topics use a JSON payload with the following schema:

{
  "id":   "string",   // Uniquely identifies the messages.
  "type": "string",   // Determines the type of the message.
  "from": "string",   // The id of the sender.
  "data": "string",   // The message payload.   
  "created": "string" // Time of message creation in Unix timestamp.
}

The following code snippet demonstrates a topic message declaration in C#.

public class FizzTopicMessage
{
    public static readonly string KEY_ID = "id";
    public static readonly string KEY_TYPE = "type";
    public static readonly string KEY_FROM = "from";
    public static readonly string KEY_DATA = "data";
    public static readonly string KEY_CREATED = "created";

    public FizzTopicMessage(string json)
    {
        JSONNode data = JSONNode.Parse(json);
        Id = (long)data[KEY_ID].AsDouble;
        Type = data[KEY_TYPE];
        From = data[KEY_FROM];
        Data = data[KEY_DATA];
        Created = (long)data[KEY_CREATED].AsDouble;
    }

    public long Id { get; private set; }
    public String Type { get; private set; }
    public String From { get; private set; }
    public String Data { get; private set; }
    public long Created { get; private set; }
}

Channel Messages

Each channel in the Chat service comprises of at least one topic (multiple topic can be created when load balancing the traffic on a channel). Operations performed on channels (e.g. publishing, editing or deleting a message) results in event published on the channel's topic. All events are encoded using topic messages (described above). The channel message payload is encoded as a JSON string and stored in the topic message's data property.

The following demonstrates parsing channel message events published on topic messages.

  private void OnMessage(int connId, object sender, MqttApplicationMessageReceivedEventArgs args)
  {
      try
      {
          string payload = Encoding.UTF8.GetString(args.ApplicationMessage.Payload);
          FizzTopicMessage message = new FizzTopicMessage(payload);

          switch(message.Type) {
              case "CMSGP": // Channel Message Published
                  if (OnMessagePublished != null)
                  {
                      OnMessagePublished.Invoke(AdaptTo(message));
                  }
                  break;
              case "CMSGU": // Channel Message Updated
                  if (OnMessageUpdated != null)
                  {
                      OnMessageUpdated.Invoke(AdaptTo(message));
                  }
                  break;
              case "CMSGD": // Channel Message Deleted
                  if (OnMessageDeleted != null)
                  {
                      OnMessageDeleted.Invoke(AdaptTo(message));
                  }
                  break;
              default:
                  FizzLogger.W("unrecognized packet received: " + payload);
                  break;
          }
      }
      catch
      {
          FizzLogger.W("received invalid message: " + args.ApplicationMessage.Payload);
      }
  }

  private FizzChannelMessage AdaptTo(FizzTopicMessage message) 
  {
      JSONNode payload = JSONNode.Parse(message.Data);
      JSONClass translationData = payload["translations"].AsObject;
      IDictionary<string, string> translations = null;

      if (translationData != null)
      {
          translations = new Dictionary<string, string>();
          foreach (string key in translationData.Keys)
          {
              translations.Add(key, translationData[key]);
          }
      }

      return new FizzChannelMessage(
          message.Id,
          message.From,
          payload["nick"],
          payload["to"],
          payload["body"],
          payload["data"],
          translations,
          message.Created
      );
  }
}

Custom Messaging

Fizz allows the messaging system to be extended by allowing applications to associate custom data with messages. This allows applications to implement features such as donations, guild notifications, location sharing, polls, etc

Each channel message contains a 'data' field. This field is owned by the application and can be used to store any metadata about the message. For instance the data field can be used to add custom message types using the following (stringified) JSON payload:

{
  "type": "troop_donation",
  "requester_id": "userA",
  "requested": 40,
  "donated": 0
}

Donations

Some games implement a donations feature which allows users to request donations (cards, troops, etc) from other users through the chat. On receiving a message in the channel requesting donations, other users can donate via the chat UI to the requester.

Normally this feature is implemented using the follwoing scheme:

Following are the details of the steps involved:

  1. Client A sends a donations request to the game server (via a game server API).
  2. After validations (whether A can request donations or not), the game server pubslishes a donations request message in the appropriate channel (the sender can be a user created specifically for this purpose and used only by the game server).
  3. Fizz pubslishes the messages to all clients in the specified channel (Client A and Client B in this scenario).
  4. On receiving the message, Client B decides to donate to Client A via the chat UI. This in turn sends a request to the Game Server to donate to Client A.
  5. After validations (whether B can donate to A or not), the Game Server updates the donations request message by updating the number of donations (1 in this case).
  6. Fizz pushes the message update in the channel which updates the donation count for each client in the channel.

Please note that the donations message can contain any data needed to implement this feature. As an example, something similar the JSON payload above can be used to implement this feature.

Custom Content Moderation

Allow companies to update their own custom profanity lists on Azure. Please follow the instructions below as shown in the video:

Create and Publish a Google Spreadsheet

  1. Please create a sample spreadsheet in the following format Fizz Bad Words.
  2. The sheet name should be fizz_cm_custom_list and all the profane words should be listed under the column fizz_bad_words.
  3. Please follow the steps mentioned here Publish Google Docs and choose fizz_cm_custom_list as a publishing option.
  4. Once you have made it public, it should generate a URL. Close the dialogue of publish settings and check the URL of the google sheet which is in the following format: https://docs.google.com/spreadsheets/d/spread_sheet_id/edit#gid=0

Import Postman Collection for Azure Content Moderation

  1. Open postman client and make sure its updated to the latest version.
  2. Import the collection from Azure Content Moderation. You should see the following requests in your collection:
  1. Once you have Imported the postman collection create a new postman environment by the name Azure.
  2. In the Azure environment add following environment variables:
    4.1. region: region for the azure server e-g; eastus.
    4.2. spread_sheet_id: the id you got in the url after publishing your google sheet.
    4.3. subscription_key: the OCIM subscription key for your Azure Account.
    4.4. list_id: just add this with empty value. Will be needed for future steps.

Create an Azure Custom Profanity List

  1. Please execute the createList request from the Postman Collection.
  2. In the response you will get a listId. Fill this listId in list_id environment variable (Section: Import Postman Collection Step: 4.4) to update it later.
  3. Execute getAllList request to see all your custom listIds in case you forgot the id or have not saved it in environment variables.

Update a Custom List

  1. Please fill in the list_id environment variable of postman collection (Section: Import Postman Collection Step: 4.4) for the list you want to update.
  2. Please execute the readBadWords request. This reads all the Profane words mentioned in your google spreadsheet (Section: Create and Publish a Google Spreadsheet Step: 3)
  3. Please execute the updateList postman request. This will update the Azure Profanity List.
  4. Please execute the refreshList postman request. This will clear cached data and your latest changes will be reflected for sure.
  5. YAY! Your custom list is updated. You can execute the getAllTerms postman request to verify the changes.

Load Balancing

The Fizz chat platform allows an unlimited number of users to be subscribed to the same channel. However, internally a load balancing component creates and distributes the subscribers between different topics for the same channel. This allows Fizz to keep the conversation running at a reasonable pace.

Each channel contains a 'default topic' which is created by default for each channel. All operations performed on the channel are applied to the default topic.

As more users subscribe to the same channel, the load balancer creates additional topics and distributes the subscribers (equally) amongst these topics.

Note: Some operations are currently enabled for the default topic only. These include message edit, delete, etc. Please contact [email protected] if you have a use case that requires these operations to be supported for all topics.

Authentication

digest

HMAC SHA256 digest of the request body. Please see the introduction for more details.

Security scheme type: API Key
Header parameter name: Authorization

session_token

Session token generated using the application credentials.

Security scheme type: API Key
Header parameter name: Session-Token

Auth

Manage application user authentication and authorization.

Create user session

Authenticate and create a new session for a user.

Authorizations:
Request Body schema: application/json
user_id
string [ 1 .. 64 ] characters

Uniquely identifies a user.

app_id
string [ 1 .. 64 ] characters

Uniquely identifies the Fizz application.

locale
string
Enum:"af" "ar" "bg" "bn" "bs" "ca" "cs" "cy" "da" "de" "el" "en" "es" "et" "fa" "fi" "fil" "fj" "fr" "he" "hi" "hr" "ht" "hu" "id" "is" "it" "ja" "ko" "lt" "lv" "mg" "ms" "mt" "mww" "nb" "nl" "otq" "pl" "pt" "ro" "ru" "sk" "sl" "sm" "sr-Cyrl" "sr-Latn" "sv" "sw" "ta" "te" "th" "tlh" "tlh-Qaak" "to" "tr" "ty" "uk" "ur" "vi" "yua" "yue" "zh-Hans" "zh-Hant"

Idenitifies a language:

  • AFRIKAANS("af")
  • ARABIC("ar")
  • BULGARIAN("bg")
  • BANGLA("bn")
  • BOSNIAN_LATIN("bs")
  • CATALAN("ca")
  • CZECH("cs")
  • CANTONESE("yue")
  • CHINESE_SIMPLIFIED("zh-Hans")
  • CHINESE_TRADITIONAL("zh-Hant")
  • WELSH("cy")
  • DANISH("da")
  • GERMAN("de")
  • GREEK("el")
  • ENGLISH("en")
  • SPANISH("es")
  • ESTONIAN("et")
  • PERSIAN("fa")
  • FINNISH("fi")
  • FILIPINO("fil")
  • FIJIAN("fj")
  • FRENCH("fr")
  • HEBREW("he")
  • HINDI("hi")
  • CROATIAN("hr")
  • HAITIAN_CREOLE("ht")
  • HUNGARIAN("hu")
  • INDONESIAN("id")
  • ICELANDIC("is")
  • ITALIAN("it")
  • JAPANESE("ja")
  • KOREAN("ko")
  • KLINGON("tlh"),
  • KLINGON_PLQAD("tlh-Qaak")
  • LITHUANIAN("lt")
  • LATVIAN("lv")
  • MALAGASY("mg")
  • MALAY("ms")
  • MALTESE("mt")
  • HMONGDAW("mww")
  • NORWEGIAN("nb")
  • DUTCH("nl")
  • QUERETARO_OTOMI("otq")
  • POLISH("pl")
  • PORTUGUESE("pt")
  • ROMANIAN("ro")
  • RUSSIAN("ru")
  • SLOVAK("sk")
  • SLOVENIAN("sl")
  • SAMOAN("sm")
  • SERBIAN_CYRILLIC("sr-Cyrl")
  • SERBIAN_LATIN("sr-Latn")
  • SWEDISH("sv")
  • KISWAHILI("sw")
  • TAMIL("ta")
  • TELUGU("te")
  • THAI("th")
  • TOGAN("to")
  • TURKISH("tr")
  • TAHITIAN("ty")
  • UKRAINIAN("uk")
  • URDU("ur")
  • VIETNAMESE("vi")
  • YUCATECMAYA("yua")

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

post /sessions
https://api.fizz.io/v1/sessions

Request samples

application/json
Copy
Expand all Collapse all
{
  • "user_id": "string",
  • "app_id": "string",
  • "locale": "af"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "token": "string",
  • "subscriber_id": "string",
  • "now_ts": 0
}

Create an administrator

Assign the administrator role to the user identified by the specified id.

Authorizations:
Request Body schema: application/json
user_id
string [ 1 .. 64 ] characters

Uniquely identifies a user.

app_id
string [ 1 .. 64 ] characters

Uniquely identifies the Fizz application.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

post /admins
https://api.fizz.io/v1/admins

Request samples

application/json
Copy
Expand all Collapse all
{
  • "user_id": "string",
  • "app_id": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Remove an administrator

Revoke the administrator role from the user identified by the specified id.

Authorizations:
Request Body schema: application/json
user_id
string [ 1 .. 64 ] characters

Uniquely identifies a user.

app_id
string [ 1 .. 64 ] characters

Uniquely identifies the Fizz application.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

delete /admins
https://api.fizz.io/v1/admins

Request samples

application/json
Copy
Expand all Collapse all
{
  • "user_id": "string",
  • "app_id": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Ingestion

Submit application events for ingestion.

Ingest application events

Submit application events to track user behavior and generate insights.

Authorizations:
Request Body schema: application/json
Array
  • session_started
  • session_ended
  • text_msg_sent
  • product_purchased
user_id
required
string <= 64 characters

Uniquely identifies a user. Should be same across user sessions.

type
required
string
Enum:"session_started" "session_ended" "text_msg_sent" "product_purchased"

Type of the event. Specify the appropriate value based on type.

ver
required
integer

Version of the event being used. Should be set to 1.

session_id
required
string <= 64 characters

Uniquely identifies a session. Can be set to a random UUID generated at session started time. Should be the same across all events of the same session.

time
required
number <int64>

Time when event took place. Should be a unix timestamp in UTC.

platform
string
Enum:"ios" "android" "windows" "windows_phone" "mac_osx" "web_player"

The platform of the user.

build
string <= 32 characters

The build version of the user.

custom_01
string <= 32 characters

A custom segment that can be used for various reason e.g A/B testing, classifying users etc

custom_02
string <= 32 characters

A custom segment that can be used for various reason e.g A/B testing, classifying users etc

custom_03
string <= 32 characters

A custom segment that can be used for various reason e.g A/B testing, classifying users etc

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

post /events
https://api.fizz.io/v1/events

Request samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

application/json
Copy
Expand all Collapse all
{ }

Chat

Implement multi-lingual chat in your application.

Publish message in a channel

Publish messages to a specific channel.

Authorizations:
path Parameters
channelId
required
string

The channel's Id (name).

Request Body schema: application/json
nick
string <= 64 characters

Human friendly name of the sender.

body
string <= 1024 characters

The message body.

data
string <= 1024 characters

Any user specified data that can be attached with the message.

translate
boolean

The message body will be translated if set to true.

filter
boolean
Default: true

The message body will be moderated if set to true.

persist
boolean

Persist the message in the channel's message journal. All messages are persisted by default. Set to false to prevent the system from persisting the message.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

post /channels/{channelId}/messages
https://api.fizz.io/v1/channels/{channelId}/messages

Request samples

application/json
Copy
Expand all Collapse all
{
  • "nick": "string",
  • "body": "string",
  • "data": "string",
  • "translate": true,
  • "filter": true,
  • "persist": true
}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Query channel messages

Query the messages in a specific channel. If both before_id and after_id are not specified then the latest count messages are queried. If both before_id and after_id are specified then before_id takes precedence.

Authorizations:
path Parameters
channelId
required
string

The channel's Id (name).

query Parameters
count
required
integer

The number of messages to query.

before_id
number <int64>

Fetch count messages before the specified message id.

after_id
number <int64>

Fetch count messages after the specified message id.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

get /channels/{channelId}/messages
https://api.fizz.io/v1/channels/{channelId}/messages

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Update channel message

Update an existing message in the channel. Only the original sender can update the message.

Authorizations:
path Parameters
channelId
required
string

The channel's Id (name).

messageId
required
string

The id of the message that needs to be updated.

Request Body schema: application/json
nick
string <= 64 characters

Human friendly name of the sender.

body
string <= 1024 characters

The message body.

data
string <= 1024 characters

Any user specified data that can be attached with the message.

translate
boolean

The message body will be translated if set to true.

filter
boolean
Default: true

The message body will be moderated if set to true.

Responses

200

OK

400

Bad Request

409

The request conflicts with the current server state, e.g. the message does not exist etc

500

The server encountered an unexpected error

post /channels/{channelId}/messages/{messageId}
https://api.fizz.io/v1/channels/{channelId}/messages/{messageId}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "nick": "string",
  • "body": "string",
  • "data": "string",
  • "translate": true,
  • "filter": true
}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Delete channel message

Delete an existing message in the channel. Only the original sender can delete the message.

Authorizations:
path Parameters
channelId
required
string

The channel's Id (name).

messageId
required
string

The id of the message that needs to be updated.

Responses

200

OK

400

Bad Request

409

The request conflicts with the current server state, e.g. the message does not exist etc

500

The server encountered an unexpected error

delete /channels/{channelId}/messages/{messageId}
https://api.fizz.io/v1/channels/{channelId}/messages/{messageId}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Subscribe to channel

Subscribe to a specific channel.

Authorizations:
path Parameters
channelId
required
string

The channel Id.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

post /channels/{channelId}/subscribers
https://api.fizz.io/v1/channels/{channelId}/subscribers

Response samples

application/json
Copy
Expand all Collapse all
{ }

Unsubscribe from channel

Unsubscribe from a specific channel.

Authorizations:
path Parameters
channelId
required
string

The channel Id.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

delete /channels/{channelId}/subscribers
https://api.fizz.io/v1/channels/{channelId}/subscribers

Response samples

application/json
Copy
Expand all Collapse all
{ }

Ban a user

Banned users can not publish or receive messages.

Authorizations:
path Parameters
channelId
required
string

The channel Id.

Request Body schema: application/json
user_id
string [ 1 .. 64 ] characters

Uniquely identifies a user.

duration
number <int32> >= 1

Duration of the ban in seconds.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

post /channels/{channelId}/bans
https://api.fizz.io/v1/channels/{channelId}/bans

Request samples

application/json
Copy
Expand all Collapse all
{
  • "user_id": "string",
  • "duration": 1
}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Remove a user's ban

After ban removal, users are able to publish or receive messages.

Authorizations:
path Parameters
channelId
required
string

The channel Id.

bannedUserId
required
string

Id of the user that was banned.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

delete /channels/{channelId}/bans/{bannedUserId}
https://api.fizz.io/v1/channels/{channelId}/bans/{bannedUserId}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Mute a user

Muted users can only retreive messages from a channel.

Authorizations:
path Parameters
channelId
required
string

The channel Id.

Request Body schema: application/json
user_id
string [ 1 .. 64 ] characters

Uniquely identifies a user.

duration
number <int32> >= 1

Duration of the mute in seconds.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

post /channels/{channelId}/mutes
https://api.fizz.io/v1/channels/{channelId}/mutes

Request samples

application/json
Copy
Expand all Collapse all
{
  • "user_id": "string",
  • "duration": 1
}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Unmute a user

After mute removal, users are able to publish or receive messages.

Authorizations:
path Parameters
channelId
required
string

The channel Id.

mutedUserId
required
string

Id of the user that was muted.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

delete /channels/{channelId}/mutes/{mutedUserId}
https://api.fizz.io/v1/channels/{channelId}/mutes/{mutedUserId}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Moderation

Report chat message

report chat message of others.

Authorizations:
Request Body schema: application/json
channel_id
required
string

The channel's Id (name).

message
required
string <= 1024 characters

The body of reported message.

message_id
required
string

The id of the message.

language
required
string
Enum:"af" "ar" "bg" "bn" "bs" "ca" "cs" "cy" "da" "de" "el" "en" "es" "et" "fa" "fi" "fil" "fj" "fr" "he" "hi" "hr" "ht" "hu" "id" "is" "it" "ja" "ko" "lt" "lv" "mg" "ms" "mt" "mww" "nb" "nl" "otq" "pl" "pt" "ro" "ru" "sk" "sl" "sm" "sr-Cyrl" "sr-Latn" "sv" "sw" "ta" "te" "th" "tlh" "tlh-Qaak" "to" "tr" "ty" "uk" "ur" "vi" "yua" "yue" "zh-Hans" "zh-Hant"

Idenitifies a language:

  • AFRIKAANS("af")
  • ARABIC("ar")
  • BULGARIAN("bg")
  • BANGLA("bn")
  • BOSNIAN_LATIN("bs")
  • CATALAN("ca")
  • CZECH("cs")
  • CANTONESE("yue")
  • CHINESE_SIMPLIFIED("zh-Hans")
  • CHINESE_TRADITIONAL("zh-Hant")
  • WELSH("cy")
  • DANISH("da")
  • GERMAN("de")
  • GREEK("el")
  • ENGLISH("en")
  • SPANISH("es")
  • ESTONIAN("et")
  • PERSIAN("fa")
  • FINNISH("fi")
  • FILIPINO("fil")
  • FIJIAN("fj")
  • FRENCH("fr")
  • HEBREW("he")
  • HINDI("hi")
  • CROATIAN("hr")
  • HAITIAN_CREOLE("ht")
  • HUNGARIAN("hu")
  • INDONESIAN("id")
  • ICELANDIC("is")
  • ITALIAN("it")
  • JAPANESE("ja")
  • KOREAN("ko")
  • KLINGON("tlh"),
  • KLINGON_PLQAD("tlh-Qaak")
  • LITHUANIAN("lt")
  • LATVIAN("lv")
  • MALAGASY("mg")
  • MALAY("ms")
  • MALTESE("mt")
  • HMONGDAW("mww")
  • NORWEGIAN("nb")
  • DUTCH("nl")
  • QUERETARO_OTOMI("otq")
  • POLISH("pl")
  • PORTUGUESE("pt")
  • ROMANIAN("ro")
  • RUSSIAN("ru")
  • SLOVAK("sk")
  • SLOVENIAN("sl")
  • SAMOAN("sm")
  • SERBIAN_CYRILLIC("sr-Cyrl")
  • SERBIAN_LATIN("sr-Latn")
  • SWEDISH("sv")
  • KISWAHILI("sw")
  • TAMIL("ta")
  • TELUGU("te")
  • THAI("th")
  • TOGAN("to")
  • TURKISH("tr")
  • TAHITIAN("ty")
  • UKRAINIAN("uk")
  • URDU("ur")
  • VIETNAMESE("vi")
  • YUCATECMAYA("yua")
user_id
required
string [ 1 .. 64 ] characters

Uniquely identifies a user.

offense
required
string
Enum:"Spam" "Toxic" "Harassment" "Hate Speech" "Sexually Explicit" "Offensive Name" "Other"

Type of offense.

description
string <= 1024 characters

Any user provided information about the reported message.

time
required
number <int64>

Unix timestamp (in milliseconds) of the message's creation time.

Responses

200

OK

400

Bad Request

500

The server encountered an unexpected error

post /reports
https://api.fizz.io/v1/reports

Request samples

application/json
Copy
Expand all Collapse all
{
  • "channel_id": "string",
  • "message": "string",
  • "message_id": "string",
  • "language": "af",
  • "user_id": "string",
  • "offense": "Spam",
  • "description": "string",
  • "time": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "string"
}

Moderate text

Filter out profane words to sanitize text.

Authorizations:
Request Body schema: application/json
Array
string <= 1024 characters

Responses

200

List of moderated texts.

400

Bad Request

500

The server encountered an unexpected error

post /moderatedTexts
https://api.fizz.io/v1/moderatedTexts

Request samples

application/json
Copy
Expand all Collapse all
[
  • "string"
]

Response samples