Introduction

API Endpoint

https://api.hitbox.tv/

Common Success Response

{
  "success": true,
  "error": false,
  "message": ""
}

Common Failure Response

{
  "success": false,
  "error": true,
  "error_msg": ""
}

The hitbox API enables you to develop your own applications using the feature set that we provide.

General Information

All dates & times, unless noted otherwise, are in UTC time zone.

All images, unless noted otherwise, are hosted on http(s)://edge.sf.hitbox.tv

All authToken are noted as SuperSecret, You should replace with a valid authToken.

Authentication

These collection of APIs allow you to authenticate an account. All default app’s (e.g. desktop) can store 10 authentication tokens per user, OAuth apps will only save one token per app per user.

Login

Example POST Payload

URL: https://api.hitbox.tv/auth/login
{
  "login": "test-account",
  "pass": "thisismypassword",
  "app": "desktop"
}

Alternatively

{
  "app": "desktop",
  "authToken": "SuperSecret"
}

Success Response

{
  "user_id": "1",
  "user_name": "masta",
  "user_logo": "/static/img/channel/masta_56413fc1455f6_large.png",
  "user_logo_small": "/static/img/channel/masta_56413fc1455f6_small.png",
  "user_banned": "0",
  "user_partner": null,
  "user_banned_channel": "0",
  "superadmin": "0",
  "livestream_count": "1",
  "followers": "1",
  "authToken": "SuperSecret",
  "login": "true",
  "data": {
    "user_id": "1",
    "user_name": "masta",
    "user_logo": "/static/img/channel/masta_56413fc1455f6_large.png",
    "user_logo_small": "/static/img/channel/masta_56413fc1455f6_small.png",
    "user_banned": "0",
    "user_partner": null,
    "user_banned_channel": "0",
    "superadmin": "0",
    "livestream_count": "1",
    "followers": "1",
    "authToken": "SuperSecret",
    "login": "true",
    "app": "desktop"
  },
  "access": "all",
  "app": "desktop"
}

POST /auth/login
Authenticates and returns account information.

Token

Get Token

Example POST Payload

URL: https://api.hitbox.tv/auth/token
{
  "login": "test-account",
  "pass": "thisismypassword",
  "app": "desktop"
}

Example Response

{
  "authToken": "SuperSecret"
}

POST /auth/token
Alternatively, You can use this API to just get an authentication token rather than account information.

Check Token

Example Request

curl -X GET https://api.hitbox.tv/auth/valid/:appID?token=SuperSecret

Example Responses
Valid

{
  "success": true,
  "error": false,
  "msg": "logged_in"
}

Invalid

{
  "success": false,
  "error": true,
  "error_msg": "auth_failed"
}

GET /auth/valid/:appID
Checks if the Token is valid.

Get User From Token

Example Request

curl -X GET https://api.hitbox.tv/userfromtoken/SuperSecret

Example Responses
Auth Token has a user associated with it:

{
  "user_name": "masta"
}

Auth Token is not associated with a user:

[]

GET /userfromtoken/:authToken
Returns user associated with authToken

OAuth Flow

You will need to setup a server that can handle redirects from the hitbox API after user authorization and a app_token and app_secret, which can be generated from your hitbox account settings page.

OAuth Login

First, send the user to the hitbox OAuth authentication page:

https://api.hitbox.tv/oauth/login?app_token=APP_TOKEN

We also support sending a state URL query with the login call. The query will be returned to your redirect_uri on successful or unsuccessful authentication.

You can add force_auth=true to the URL query to force authorization again.


You should then handle three types of flows:

Request Token

If the user hasn’t authenticated with your application previously and accepted the authorization, the user will be redirected to:

https://redirect_uri?request_token=REQUEST_TOKEN

Exchange

Request

POST /oauth/exchange
{
  "request_token": "",
  "app_token": "",
  "hash": ""
}

Once the user is redirected, you need to exchange the request_token for an authToken.

The hash value is a Base64 encode of the app_token and app_secret. As an example, you can open up the Chrome/Firefox Developer Tool, go to the console and type btoa("app_token"+"app_secret"); and the result would be your hash.

Other languages should have methods to Base64 Encode strings.

You will then get back either of the two responses:

Success

Success Response

{
  "access_token": ""
}

This access_token is the equivalent of a regular authToken. You are now able to use this on the hitbox API just like any other token.

Failure

Failure Response

authentication_failed

Exchange can fail due to incorrect request_token, app_tokens, or a invalid hash.

Auth Token

If the user has already authenticated with your application and you’ve exchanged the request_token, the hitbox API will skip the login screen. The user will be reditected with an authToken:

https://redirect_uri?authToken=AUTH_TOKEN

Error

The hitbox API will redirect to the following URL when there’s an error with authorization. (eg. User Canceled)

https://redirect_uri?error=ERROR

User

These are members of the hitbox community who have a hitbox account. If broadcasting, they can own a stream that they can broadcast on their channel. If mainly viewing, they might follow or subscribe to channels.

Get User Object

Example Request

curl -X GET https://api.hitbox.tv/user/masta

Example Response

{
  "user_name": "masta",
  "user_cover": "/static/img/channel/cover_53ff9cfe4724f.jpg",
  "user_status": "1",
  "user_logo": "/static/img/channel/masta_55270735d51ac_large.jpg",
  "user_logo_small": "/static/img/channel/masta_55270735d51ac_small.jpg",
  "user_is_broadcaster": true,
  "followers": "68",
  "user_partner": "1",
  "user_id": "1",
  "is_live": "0",
  "live_since": "2015-10-17 23:05:18",
  "twitter_account": "hitboxlive",
  "twitter_enabled": "0",
  "user_beta_profile": "1"
}

Example Authenticated Response

{
  "followers": "19",
  "videos": "3",
  "recordings": "4",
  "teams": "7",
  "user_id": "1",
  "user_name": "masta",
  "user_status": "1",
  "user_logo": "/static/img/channel/masta_55270735d51ac_large.jpg",
  "user_cover": "/static/img/channel/cover_53ff9cfe4724f.jpg",
  "user_logo_small": "/static/img/channel/masta_55270735d51ac_small.png",
  "user_email": "example@example.com",
  "user_partner": "1",
  "partner_type": "migrated",
  "user_beta_profile": "1",
  "media_is_live": "0",
  "media_live_since": "2015-10-17 23:05:18",
  "user_media_id": "15830",
  "twitter_account": "hitboxlive",
  "twitter_enabled": "0",
  "livestream_count": "1"
}

User Not Found

{
  "user_name": null,
  "user_cover": null,
  "user_status": null,
  "user_logo": null,
  "user_logo_small": null,
  "user_is_broadcaster": null,
  "followers": null,
  "user_partner": null,
  "user_id": null,
  "is_live": null,
  "live_since": null,
  "twitter_account": null,
  "twitter_enabled": null
}

GET /user/:user

Query String Description
authToken Returns private user details.

When a user isn’t found, this API returns a regular response but with all values containing null

Update User Object

Example PUT Payload

URL: https://api.hitbox.tv/user/masta?authToken=SuperSecret
{
  "user_id": "1",
  "user_name": "masta",
  "user_display_name": "masta",
  "user_email": "example@example.com",
  "twitter_enabled": true,
  "twitter_account": "hitboxlive"
}

Example Success Response

{
  "success": true,
  "error": false,
  "message": "user_updated"
}

PUT /user/:user

Query String Description
authToken Users Authentication Token

Check Verified Email

Example Request

curl -X GET https://api.hitbox.tv/user/checkVerifiedEmail/masta

Example Response

{
  "request": {
    "this": "/user/checkVerifiedEmail/masta"
  },
  "user": {
    "user_activated": "1"
  }
}

GET /user/checkVerifiedEmail/:user
Check if user has validated their email address.

User Access Levels

Example Request

curl -X GET https://api.hitbox.tv/user/access/masta/SuperSecret

Example Response

{
  "user_id": "1",
  "access_user_id": "1",
  "settings": "admin",
  "account": "admin",
  "livestreams": "admin",
  "partner": null,
  "broadcast": "admin",
  "videos": "admin",
  "recordings": "admin",
  "statistics": "admin",
  "inbox": "admin",
  "revenues": "admin",
  "chat": "admin",
  "following": "admin",
  "teams": "admin",
  "subscriptions": "admin",
  "admin": null,
  "superadmin": null,
  "payments": "admin",
  "isSubscriber": false,
  "isFollower": true
}

GET /user/access/:channel/:auth
Return access levels that :auth has in :channel

Default Team

Example Request

URL: https://api.hitbox.tv/user/masta/team/default?authToken=SuperSecret
{
  "group_id": "44"
}

Response

{
  "success": true,
  "error": false,
  "message": "successful"
}

POST /user/:user/team/default
Sets default team by group_id

OAuth

Looking for how to use OAuth Applications?

List OAuth Access

Example Request

curl -X GET https://api.hitbox.tv/oauthaccess/masta?authToken=SuperSecret

Example Request

{
  "apps": [
    {
      "name": "OAuth App Name",
      "description": "Full access"
    },
    ...
  ]
}

GET /oauthaccess/:user
Returns OAuth Applications the user has authenticated with.

Query String Description
authToken Users Authentication Token

Remove OAuth Access

Example POST Payload

URL: https://api.hitbox.tv/oauthaccess/masta?authToken=SuperSecret
{
  "authToken": "SuperSecret",
  "user_name": "masta",
  "app": "OAuth_App_Name"
}

Example Success Response

{
  "error": false,
  "success": true
}

POST /oauthaccess/:user
Remove OAuth Application a user has authenticated with.

Query String Description
authToken Users Authentication Token

List OAuth Applications

Example Request

curl -X GET https://api.hitbox.tv/oauthapps/masta?authToken=SuperSecret

Example Response

{
  "success": true,
  "apps": [
    {
      "app_id": "1",
      "app_name": "Our First App",
      "app_note": "Full access",
      "app_enabled": "1",
      "app_redirect_uri": "http://localhost",
      "app_token": "k90932ijofsanmasdn213213e",
      "app_secret": "SuperSecretAppSecret",
      "app_user_id": "1"
    }
  ]
}

GET /oauthapps/:user
Get OAuth Applications that a user has created.

Query String Description
authToken Users Authentication Token

Create OAuth Application

Example POST Payload

URL: https://api.hitbox.tv/oauthapps/masta?authToken=SuperSecret
{
  "authToken": "SuperSecret",
  "user_name": "masta",
  "app": {
    "app_name": "Our First App",
    "app_redirect_uri": "http://localhost"
  }
}

Example Response

{
  "error": false,
  "success": true
}

POST /oauthapps/:user
Creates a OAuth Application.

Query String Description
authToken Users Authentication Token

Update OAuth Application

Example PUT Payload

URL: https://api.hitbox.tv/oauthapps/masta/1?authToken=SuperSecret
{
  "authToken": "SuperSecret",
  "user_name": "masta",
  "app": {
    "app_id": "1",
    "app_name": "Our First App",
    "app_note": "Full access",
    "app_enabled": "1",
    "app_redirect_uri": "http://localhost",
    "app_token": "pOAidj8dasijAhjdashAW89",
    "app_secret": "SuperSecret_App_Token",
    "app_user_id": "278723",
    "isExpanded": false
  },
  "app_id": "1"
}

Example Success Response

{
  "error": false,
  "success": true
}

PUT /oauthapps/:user/:app_id
Updates a OAuth Application.

Query String Description
authToken Users Authentication Token

Remove OAuth Application

Example DELETE Request

curl -X DELETE https://api.hitbox.tv/oauthapps/masta/1?authToken=SuperSecret

Example Response

{
  "error": false,
  "success": true
}

DELETE /oauthapps/:user/:app_id
Removes a OAuth Application.

Query String Description
authToken Users Authentication Token

Channel

Stream Key

Get Stream Key

Example Request

curl -X GET https://api.hitbox.tv/mediakey/masta?authToken=SuperSecret

Example Response

{
  "streamKey": "HeyItsMyKey"
}

Unauthorized

{
  "success": false,
  "error": true,
  "error_msg": "auth_required"
}

GET /mediakey/:channel
Get the stream key for :channel

Query String Description
authToken Users Authentication Token

Reset Stream Key

Example PUT Payload

URL: https://api.hitbox.tv/mediakey/masta?authToken=SuperSecret

Example Response

{
  "streamKey": "HeyItsANewKey"
}

Unauthorized

{
  "success": false,
  "error": true,
  "error_msg": "auth_required"
}

PUT /mediakey/:channel
Sets a new stream key for :channel

Query String Description
authToken Users Authentication Token

Commercial Breaks

Run Commercial Break

Example Request

URL: https://api.hitbox.tv/ws/combreak/masta/1
{
  "user_name": "Masta",
  "authToken": "SuperSecret"
}

Example Response

{
  "method": "commercialBreak",
  "params": {
    "channel": "masta",
    "count": "1",
    "delay": "0",
    "token": "SuperSecret",
    "url": "http://hitbox.tv",
    "timestamp": 1428528241
  }
}

Unauthorized

{
  "success": false,
  "error": true,
  "error_msg": "auth_required"
}

POST /ws/combreak/:channel/:adCount
Runs a number (defined by :adCount) of commercials on :channel

Last Commercial

Example Request

curl -X GET https://api.hitbox.tv/ws/combreak/masta

Example Response

{
  "seconds_ago": "285623",
  "ad_count": "1",
  "timeout": -285593
}

GET /ws/combreak/:channel
Returns last commercial break object.

Statistics

Channel Statistics

Example Request

curl -X GET https://api.hitbox.tv/streamoverallstats/masta/1427673600000/1427760000000?authToken=SuperSecret

Example Response

{
  "channel": "masta",
  "startTime": 1427673600000,
  "endTime": 1427760000000,
  "totalUniques": 1,
  "totalViewtime": 1927,
  "totalViews": 13,
  "totalCountries": 1,
  "countries": {
    "US": {
      "uniques": 1,
      "views": 13,
      "viewtime": 1927
    }
  }
}

GET /streamoverallstats/:channel/:startDate/:endDate
Returns the numbers of unique viewers, viewed time, views and the viewers countries of :channel for a given time period.

Query String Description
authToken Users Authentication Token

Streamed Seconds Statistics

Example Request

curl -X GET https://api.hitbox.tv/streamedseconds/masta/1448928000/1451692799?authToken=SuperSecret

Example Response

{
  "channel": "masta",
  "startTime": 1448928000000,
  "endTime": 1451692799000,
  "streamed_seconds": 2736
}

GET /streamedseconds/:channel/:startEpoch/:endEpoch
Gets how long in seconds :channel has streamed between :startEpoch and :endEpoch

Query String Description
authToken Users Authentication Token

Viewer Statistics

Example Request

curl -X GET https://api.hitbox.tv/streamstats/masta/1427673600000/1427760000000?authToken=SuperSecret

Example Response

{
  "channel": "masta",
  "startTime": "1427673600000",
  "endTime": "1427760000000",
  "step": 60000,
  "maxviewer": 2,
  "maxfollower": 2,
  "maxregistered": 2,
  "maxembed": 0,
  "maxsubscriber": 1,
  "maxandroid": 0,
  "maxios": 0,
  "maxchromecast": 0,
  "maxweb": 2,
  "totalads": 0,
  "timeline": {
    "viewer": [
      [
        1427688900000,
        1
      ]
    ],
    "viewer_avg": [
      [
        1427688900000,
        1
      ]
    ],
    "follower": [
      [
        1427688900000,
        1
      ]
    ],
    ...
  }
}

GET /streamstats/:channel/:startEpoch/:endEpoch
Returns maximum numbers and timeline data for different viewer types of :channel for a given time period.

Query String Description
authToken Users Authentication Token

Revenue Statistics

Example Request

curl -X GET https://api.hitbox.tv/revenues/channel/masta?authToken=SuperSecret&startDate=2015-03-07&endDate=2015-04-08

Example Response

{
  "request": {
    "this": "/revenues/channel/masta",
    "type": "channel",
    "user": "masta"
  },
  "revenues": {
    "summary": {
      "currency": "USD",
      "last_updated": "2016-01-01 00:00:00",
      "total_earnings": 0,
      "max_earnings": 0,
      "viewed_hours": 0,
      "unique_user": 0
    },
    "plans": [
      {
        "plan_id": "1",
        "plan_name": "masta",
        "plan_group_id": null,
        "plan_user_id": "1",
        "plan_countries": "*",
        "plan_cpm": "0.00",
        "plan_currency": "USD",
        "plan_date_added": "2015-08-03 00:00:00"
      },
      {
        "plan_id": "2",
        "plan_name": "masta",
        "plan_group_id": null,
        "plan_user_id": "1",
        "plan_countries": "Austria,Germany,Switzerland",
        "plan_cpm": "0.00",
        "plan_currency": "USD",
        "plan_date_added": "2015-08-03 00:00:00"
      },
      {
        "plan_id": "3",
        "plan_name": "masta",
        "plan_group_id": null,
        "plan_user_id": "1",
        "plan_countries": "Australia,Belgium,Canada,Denmark,Finland,France,Luxembourg,Netherlands,Norway,Sweden,United Kingdom,United States",
        "plan_cpm": "0.00",
        "plan_currency": "USD",
        "plan_date_added": "2015-08-03 00:00:00"
      },
      {
        "plan_id": "4",
        "plan_name": "masta",
        "plan_group_id": null,
        "plan_user_id": "1",
        "plan_countries": "Australia,Belgium,Canada,Denmark,Finland,France,Luxembourg,Netherlands,Norway,Sweden,United Kingdom,United States",
        "plan_cpm": "0.00",
        "plan_currency": "USD",
        "plan_date_added": "2015-04-26 00:00:00"
      },
      {
        "plan_id": "5",
        "plan_name": "masta",
        "plan_group_id": null,
        "plan_user_id": "1",
        "plan_countries": "*",
        "plan_cpm": "0.00",
        "plan_currency": "USD",
        "plan_date_added": "2015-04-26 00:00:00"
      },
      {
        "plan_id": "6",
        "plan_name": "masta",
        "plan_group_id": null,
        "plan_user_id": "1",
        "plan_countries": "Austria,Germany,Switzerland",
        "plan_cpm": "0.00",
        "plan_currency": "USD",
        "plan_date_added": "2015-04-26 00:00:00"
      }
    ],
    "timeline": [
      [
        1448928000000,
        0
      ],
      ...
    ],
    "daily": {
      "2015-12-01": {
        "earnings": 0
      },
      ...
    },
    "groups": {
      "1448928000000": [
        null,
        null
      ],
      ...
    },
    "live": {
      "1448928000000": 0,
      ...
    },
    "total": {
      "1448928000000": 0,
      ...
    },
    "timeline_ads": [
      [
        1448928000000,
        0
      ],
      ...
    ],
    "timeline_subs": [
      [
        1448928000000,
        0
      ],
      ...
    ],
    "subs": {
      "1448928000000": 0,
      ...
    },
    "top": {
      "countries": {
        "United States": 0,
        ...
      },
      "content": {
        "live": {
          "earnings": 0
        },
        "video": {
          "earnings": 0
        },
        "subscriptions": {
          "earnings": 0
        }
      }
    }
  }
}

GET /revenues/channel/:channel
Returns revenue data of :channel for a given time period.

Query String Description
authToken Users Authentication Token
startDate Date Format YYYY-MM-DD
endDate Date Format YYYY-MM-DD

Editors

Get Editors List

Example Request

curl -X GET https://api.hitbox.tv/editors/masta?authToken=SuperSecret

Example Response

{
  "list": [
    {
      "user_name": "OneSavvySiren",
      "user_logo": "/static/img/channel/OneSavvySiren_547d4d85b111a_large.jpg",
      "user_logo_small": "/static/img/channel/OneSavvySiren_547d4d85b111a_small.jpg"
    },
    ...
  ]
}

Unauthorized

{
  "success": false,
  "error": true,
  "error_msg": "permission_denied"
}

GET /editors/:channel
Returns list of editor objects that have access to :channel.

Query String Description
authToken Users Authentication Token

Add / Remove Editors

Example PUT Payload

URL: https://api.hitbox.tv/editors/masta?authToken=SuperSecret
{
  "authToken": "SuperSecret",
  "editor": "Quiett",
  "remove": false
}

Example Responses
Successful

{
  "success": true,
  "error": false,
  "message": "success"
}

Not Found

{
  "success": false,
  "error": true,
  "error_msg": "editor_not_found"
}

Error Adding (Staff/Ambassadors can not be added)

{
  "success": false,
  "error": true,
  "error_msg": "error_adding_editor"
}

POST /editors/:channel
Add or Remove Editors for :channel

Query String Description
authToken Users Authentication Token

Get Editor List

Example Request

curl -X GET https://api.hitbox.tv/editor/masta?authToken=SuperSecret

Example Response

{
  "list": [
    {
      "user_name": "test-account",
      "user_logo": "/static/img/channel/test-account_522230b14fd5f_large.jpg",
      "user_logo_small": "/static/img/channel/test-account_522230b14fd5f_small.jpg"
    },
    ...
  ]
}

Unauthorized

{
  "success": false,
  "error": true,
  "error_msg": "unauthorized"
}

GET /editor/:user
Returns list of editor objects that :user has access to.

Query String Description
authToken Users Authentication Token

Profile Panels

Toggle Panels

Example POST Payload

URL: https://api.hitbox.tv/profileenable/masta
{
  "user_name": "masta",
  "authToken": "SuperSecret",
  "enabled": false
}

Example Success Response

{
  "success": true
}

POST /profileenable/:channel
Toggles profile panels.

Get Profile Panels

Example Request

curl -X GET https://api.hitbox.tv/profile/masta

Example Response

{
  "profile": {
    "panels": [
      {
        "id": 1,
        "template": "content",
        "headline": "Panel One",
        "link": "http://LinkForImage.example",
        "content": "Markdown Content Here!",
        "image": "http://edge.sf.hitbox.tv/static/img/channel/panelimage-jpg_5675370d32923.jpg"
      },
      ...
    ],
    "sorted": [
      {
        "id": 1,
        "template": "content",
        "headline": "Panel One",
        "link": "http://LinkForImage.example",
        "content": "Markdown Content Here!",
        "image": "http://edge.sf.hitbox.tv/static/img/channel/panelimage-jpg_5675370d32923.jpg",
        "$index": 0
      },
      ...
    ],
    "preview": []
  }
}

GET /profile/:channel
Get Profile Panels for :channel

Update Profile Panels

Example POST Payload

URL: https://api.hitbox.tv/profile/masta
{
  "user_name": "masta",
  "authToken": "SuperSecret",
  "profile": {
    "panels": [
      {
        "id": 2,
        "template": "content",
        "headline": "Panel Two",
        "link": "http://LinkForImage.example",
        "content": "Markdown Content Here!",
        "image": "http://edge.sf.hitbox.tv/static/img/channel/panelimage-jpg_5675370d32923.jpg"
      },
      {
        "id": 1,
        "template": "content",
        "headline": "Panel One",
        "link": "http://LinkForImage.example",
        "content": "Markdown Content Here!",
        "image": "http://edge.sf.hitbox.tv/static/img/channel/panelimage-jpg_5675370d32923.jpg"
      }
    ],
    "sorted": [
      {
        "id": 2,
        "template": "content",
        "headline": "Panel Two",
        "link": "http://LinkForImage.example",
        "content": "Markdown Content Here!",
        "image": "http://edge.sf.hitbox.tv/static/img/channel/panelimage-jpg_5675370d32923.jpg",
        "$index": 0
      },
      {
        "id": 1,
        "template": "content",
        "headline": "Panel One",
        "link": "http://LinkForImage.example",
        "content": "Markdown Content Here!",
        "image": "http://edge.sf.hitbox.tv/static/img/channel/panelimage-jpg_5675370d32923.jpg",
        "$index": 1
      }
    ],
    "preview": []
  }
}

Example Response

{
  "error": false
}

POST /profile/:channel
Updates Profile Panels.

Social

Twitter Post

Example POST Payload

URL: https://api.hitbox.tv/twitter/post?authToken=SuperSecret&user_name=masta
{
  "user_name": "masta",
  "authToken": "SuperSecret",
  "message": "This is what you send to twitter! Twitter Character Limit Applies"
}

Example Success Response

{
  "success": true,
  "error": false,
  "message": "success"
}

POST /twitter/post
Send Tweet To Twitter.

Query String Description
authToken Users Authentication Token
user_name Channel to send tweet for.

We automatically append via @hitboxlive, keep that in mind for character limits.

Facebook Post

Example POST Payload

URL: https://api.hitbox.tv/facebook/post?authToken=SuperSecret&user_name=masta
{
  "user_name": "masta",
  "authToken": "SuperSecret",
  "message": "This is what you send to Facebook! Facebook Char Limit Applies"
}

Example Success Response

{
  "success": true,
  "error": false,
  "message": "success"
}

POST /facebook/post
Send Facebook Post to enabled facebook pages.

Query String Description
authToken Users Authentication Token
user_name Channel to send post for.

Hosters

Example Request

curl -X GET https://api.hitbox.tv/hosters/masta?authToken=SuperSecret

Example Response

{
  "hosters": [
    {
      "user_name": "xtreemo",
      "user_logo": "/static/img/channel/xtreemo_522230b14fd5f_large.jpg"
    }
  ]
}

Unauthorized

{
  "success": false,
  "error": true,
  "error_msg": "permission_denied"
}

GET /hosters/:channel
Returns a list of channels hosting :channel

Query String Description
authToken Users Authentication Token

Media

Live

On June 28th, 2016, we have changed allowing broadcasters to set two countries with one language. To prevent third party apps from breaking, we have not changed the type or name of media_countries.

Get Live Media

Example Request

curl -X GET https://api.hitbox.tv/media/live/masta

Example UnAuthenticated Response

{
  "request": {
    "this": "/media/live/masta"
  },
  "media_type": "live",
  "livestream": [
    {
      "media_user_name": "masta",
      "media_id": "1",
      "media_file": "masta",
      "media_user_id": "1",
      "media_profiles": "[{\"height\":\"360\",\"bitrate\":\"500\"},{\"height\":\"480\",\"bitrate\":\"1000\"}]",
      "media_type_id": "1",
      "media_is_live": "0",
      "media_live_delay": "0",
      "media_date_added": "2013-05-16 09:40:15",
      "media_live_since": "2015-04-02 15:33:38",
      "media_transcoding": "1",
      "media_chat_enabled": "1",
      "media_countries": [
        "EN"
      ],
      "media_offline_id": null,
      "media_hosted_id": null,
      "media_mature": null,
      "media_hidden": "1",
      "user_banned": null,
      "media_name": "masta",
      "media_display_name": "masta",
      "media_status": "Losing ELO ;>>>",
      "media_title": null,
      "media_description": "Channel description Markdown",
      "media_description_md": "Channel description HTML",
      "media_tags": "",
      "media_duration": null,
      "media_bg_image": "/static/img/channel/cover_53ff9cfe4724f.jpg",
      "media_views": "1",
      "media_views_daily": "0",
      "media_views_weekly": "1",
      "media_views_monthly": "1",
      "category_id": "447",
      "category_name": "Quake Live",
      "category_name_short": null,
      "category_seo_key": "quake-live",
      "category_viewers": "0",
      "category_media_count": "1",
      "category_channels": null,
      "category_logo_small": null,
      "category_logo_large": "/static/img/games/293456-quakelive2.jpg",
      "category_updated": "2015-04-05 20:07:27",
      "team_name": null,
      "media_start_in_sec": "0",
      "media_thumbnail": "/static/img/media/live/masta_mid_000.jpg",
      "media_thumbnail_large": "/static/img/media/live/masta_large_000.jpg",
      "channel": {
        "followers": "58",
        "videos": "2",
        "recordings": "5",
        "teams": "3",
        "user_id": "1",
        "user_name": "masta",
        "user_status": "1",
        "user_logo": "/static/img/channel/masta_54ddf4ed758e5_large.jpg",
        "user_cover": "/static/img/channel/cover_53ff9cfe4724f.jpg",
        "user_logo_small": "/static/img/channel/masta_54ddf4ed758e5_small.jpg",
        "user_partner": "1",
        "partner_type": "migrated",
        "user_beta_profile": "1",
        "media_is_live": "0",
        "media_live_since": "2015-04-02 15:33:38",
        "user_media_id": "1",
        "twitter_account": "renehtbx",
        "twitter_enabled": "1",
        "livestream_count": "1",
        "channel_link": "http://hitbox.tv/masta"
      }
    }
  ]
}

No Media Found

{
  "success": false,
  "error": true,
  "error_msg": "no_media_found"
}

GET /media/live/:channel
Returns a live media object.

Query String Description
authToken Returns Private Media Details.
showHidden Boolean; Show Hidden Media.
fast Returns pertinent information.

:channel can also be a string delimeters list of channels, and this API will return a response similar to the Media List API.

When a channel isn’t found or is hidden (and showHidden is false), this API returns an error response with no_media_found as an error_msg

When a channel is being hosted, there will be a media_hosted_media object that contains a copy of this API for the hosted channel.

Create Live Media

Example POST Payload

URL: https://api.hitbox.tv/media/live/masta?authToken=SuperSecret
{
  "user_name": "masta",
  "authToken": "SuperSecret",
  "media_type": "live",
  "media_description": "",
  "media_status": "My first hitbox Livestream",
  "media_name": "masta",
  "media_category_id": ""
}

Example Response

{
  "media_id": 974125
}

POST /media/live/:channel Updates live media object.

Query String Description
authToken Users Authentication Token

Update Live Media

Example PUT Payload

URL: https://api.hitbox.tv/media/live/masta?authToken=SuperSecret
{
  "livestream": [
    {
      "media_user_name": "masta",
      "media_id": "1",
      "media_category_id": "447",
      "media_live_delay": "0",
      "media_hidden": "0",
      "media_recording": "1",
      "media_mature": "0",
      "media_hosted_name": "off",
      "media_countries": [
        "EN"
      ],
      "media_status": "This is a stream title!",
      "media_description": ""
    }
  ]
}

Example Response

{
  "livestream": [
    {
      "media_user_name": "masta",
      "media_id": "1",
      "media_category_id": "447",
      "media_live_delay": "0",
      "media_hidden": "0",
      "media_recording": "1",
      "media_mature": "0",
      "media_countries": [
        "EN"
      ],
      "media_status": "This is a stream title!",
      "media_description_md": null
    }
  ]
}

PUT /media/live/:channel Updates live media object.

Query String Description
authToken Users Authentication Token

List Live Media

Example Request

curl -X GET https://api.hitbox.tv/media/live/list

Example Response

{
  "request": {
    "this": "/media/live/list"
  },
  "media_type": "live",
  "livestream": [
    {
      "media_user_name": "masta",
      "media_id": "1",
      "media_file": "masta",
      "media_user_id": "1",
      "media_profiles": "[{\"height\":\"360\",\"bitrate\":\"500\"},{\"height\":\"480\",\"bitrate\":\"1000\"}]",
      "media_type_id": "1",
      "media_is_live": "0",
      "media_live_delay": "0",
      "media_date_added": "2013-05-16 09:40:15",
      "media_live_since": "2015-04-06 19:03:18",
      "media_transcoding": "1",
      "media_chat_enabled": "1",
      "media_countries": [
        "EN"
      ],
      "media_hosted_id": null,
      "media_mature": null,
      "media_hidden": null,
      "user_banned": null,
      "media_name": "masta",
      "media_display_name": "masta",
      "media_status": "Losing ELO ;>>>",
      "media_title": null,
      "media_tags": "",
      "media_duration": "0.0000",
      "media_bg_image": "/static/img/channel/cover_53ff9cfe4724f.jpg",
      "media_views": "1",
      "media_views_daily": "0",
      "media_views_weekly": "1",
      "media_views_monthly": "1",
      "category_id": "447",
      "category_name": "Quake Live",
      "category_name_short": null,
      "category_seo_key": "quake-live",
      "category_viewers": "0",
      "category_media_count": "1",
      "category_channels": null,
      "category_logo_small": null,
      "category_logo_large": "/static/img/games/293456-quakelive2.jpg",
      "category_updated": "2015-04-05 20:07:27",
      "team_name": null,
      "media_start_in_sec": "0",
      "media_duration_format": "00:00:00",
      "media_thumbnail": "/static/img/media/live/masta_mid_000.jpg",
      "media_thumbnail_large": "/static/img/media/live/masta_large_000.jpg",
      "channel": {
        "followers": "58",
        "videos": "2",
        "recordings": "5",
        "teams": "3",
        "user_id": "1",
        "user_name": "masta",
        "user_status": "1",
        "user_logo": "/static/img/channel/masta_54ddf4ed758e5_large.jpg",
        "user_cover": "/static/img/channel/cover_53ff9cfe4724f.jpg",
        "user_logo_small": "/static/img/channel/masta_54ddf4ed758e5_small.jpg",
        "user_partner": "1",
        "user_beta_profile": "0",
        "media_is_live": "0",
        "media_live_since": "2015-04-06 19:03:18",
        "user_media_id": "1",
        "twitter_account": "renehtbx",
        "twitter_enabled": "1",
        "livestream_count": "1",
        "channel_link": "http://hitbox.tv/masta"
      }
    },
    ...
  ]
}

Example Follower Response
Returns when follower_id is provided.
The following example is with the fast query.

{
  "request": {
    "this": "/media/live/list"
  },
  "media_type": "live",
  "hosting": [
    {
      "media_id": "1",
      "channel": "ChannelHostingUser",
      "hosted_media_id": "2",
      "hosted_channel": "HostedChannel",
      "hosted_media_is_live": "1",
      "user_logo_small": "/static/img/channel/masta_547d4d85b111a_small.jpg",
      "hosted_user_logo_small": "/static/img/channel/markus_564101d060bc7_small.jpg",
      "hosted_media_live_since": "2015-11-16 03:14:19",
      "hosted_media_thumbnail": "/static/img/media/live/markus_mid_000.jpg",
      "hosted_media_thumbnail_large": "/static/img/media/live/masta_large_000.jpg"
    }
  ],
  "livestream": [
    {
      "media_display_name": "Masta",
      "media_status": "OK Let's do this!!",
      "media_name": "masta",
      "category_name": "Counter-Strike: Global Offensive",
      "media_views": "7",
      "media_countries": [
        "EN"
      ],
      "media_live_since": "2015-11-16 02:05:08",
      "media_is_live": "1",
      "user_logo": "/static/img/channel/masta_53d8a389e01b1_large.png",
      "user_logo_small": "/static/img/channel/masta_53d8a389e01b1_small.png",
      "user_partner": null,
      "media_offline_id": null,
      "media_id": "1",
      "media_thumbnail": "/static/img/media/live/masta_mid_000.jpg",
      "media_thumbnail_large": "/static/img/media/live/masta_large_000.jpg",
      "channel": {
        "user_logo": "/static/img/channel/masta_53d8a389e01b1_large.png",
        "user_logo_small": "/static/img/channel/masta_53d8a389e01b1_small.png",
        "channel_link": "http://hitbox.tv/masta"
      }
    }
  ]
}

GET /media/live/list
Returns list of live media objects.

Query String Description
authToken Returns Private Media Details.
publicOnly Boolean; Show Only Visible Media.
showHidden Boolean; Show Hidden Media.
hiddenOnly Boolean; Only Show Hidden Media.
liveonly Boolean; Show Only Live Streams.
filter Filters Media. Valid: recent, popular (Default)
game Filters Media category_id, game SEO or URL Encoded game name.
limit Maximum number of objects to fetch. Default and maximum is 100.
start The offset for pagination. Default is 0.
follower_id Returns live & hosted channels for a Users` ID.
search Search keyword for media_status.
language Filter by ISO 639-1 language code.
fast Returns pertinent information.

Example Request

curl -X GET https://api.hitbox.tv/mediafeatured

Example Response

{
  "media_id": "1",
  "media_display_name": "masta",
  "media_name": "masta",
  "backdrop": "masta_backdrop.jpg",
  "backdrop_html": "</div>"
}

GET /mediafeatured
Returns a featured live stream.

Example Request

curl -X GET https://api.hitbox.tv/mediafeaturedlist

Example Response

{
  "request": {
    "this": "/mediafeaturedlist"
  },
  "media_featured_list": [
    {
      "media_id": "1",
      "media_display_name": "masta",
      "media_name": "masta",
      "media_status": "Boat Fight",
      "media_thumbnail_large": "/static/img/media/live/masta_large_000.jpg",
      "media_user_name": "masta",
      "category_name": "World of Warships",
      "category_seo_key": "world-of-warships",
      "user_logo": "/static/img/channel/masta_53ee6d1f75728_large.png",
      "user_cover": "/static/img/channel/cover_540dczc2e91229.jpg",
      "media_backdrop_custom": null,
      "media_backdrop_default": "/static/img/media/live/masta_backdrop.jpg"
    },
    ...
  ]
}

GET /mediafeaturedlist
Returns multiple featured streams.

Live Status

Example Request

curl -X GET https://api.hitbox.tv/media/status/masta

Example Response

{
  "media_is_live": "0",
  "media_views": "1"
}

GET /media/status/:channel
Returns media status and viewer count for :channel

Total Views

Example Request

curl -X GET https://api.hitbox.tv/media/views/masta

Example Response

{
  "total_live_views": "33930"
}

GET /media/views/:channel
Returns Total Media Views for :channel

Stream Details

Example Request

curl -X GET https://api.hitbox.tv/mediainfo/live/1

Example Response

{
  "request": {
    "this": "/mediainfo/live/1"
  },
  "mediainfo": {
    "log_id": "252202",
    "media_id": "1",
    "width": "1280",
    "height": "720",
    "vbitrate": "512000",
    "abitrate": "131072",
    "vcodec": "h264",
    "acodec": "aac",
    "profile": "Main",
    "level": "41",
    "fps": "30",
    "gop": null,
    "kf_interval": "2",
    "hostname": "VIE-BCE1-BL06",
    "useragent": null,
    "log_date": "2015-04-02 18:57:05"
  }
}

GET /mediainfo/live/:media_id
Returns stream information for :media_id

Get Game Accounts

Example Request

curl -X GET https://api.hitbox.tv/gameaccounts/masta

Example Response lol_stats and wot_stats properties are JSON strings of statistics.

{
  "gameaccounts": [
    {
      "user_id": "278723",
      "lol_region": "euw",
      "lol_account": "masta",
      "lol_stats": "",
      "lol_stats_updated": "2016-01-01 03:19:36",
      "wot_account": "masta",
      "wot_stats": "",
      "wot_stats_updated": "2016-01-01 03:02:49"
    }
  ]
}

GET /gameaccounts/:channel
Returns game accounts for :channel

Update Game Accounts

Example POST Payload

URL: https://api.hitbox.tv/gameaccounts/masta?authToken=SuperSecret

World Of Tanks Account

{
  "wot_account": "MastaTanks",
  "user_name": "masta",
  "authToken": "SuperSecret"
}

League Of Legends Account

{
  "lol_account": "MastaLeague",
  "user_name": "masta",
  "authToken": "SuperSecret",
  "lol_region": "euw"
}

Example Response

{
  "success": true,
  "error": false
}

POST /gameaccounts/:channel
Updates Game Accounts for :channel

Query String Description
authToken Returns Private Media Details.

eSports

Example Request

https://api.hitbox.tv/esport/events/all

Example Response

{
  "success": true,
  "livestream": [
    {
      "media_display_name": "uccleague",
      "media_status": "SEA Kappa Invitational | WG.Unity vs Signature Trust | bo1 by @MrDoubleD",
      "media_name": "uccleague",
      "category_name": "Dota 2",
      "category_seo_key": "dota-2",
      "media_views": "956",
      "media_countries": [
        "RU"
      ],
      "media_live_since": "2016-06-30 12:44:15",
      "media_is_live": "1",
      "user_logo": "/static/img/channel/uccleague_564a21c42a3f1_large.jpg",
      "user_logo_small": "/static/img/channel/uccleague_564a21c42a3f1_small.jpg",
      "user_partner": "1",
      "media_offline_id": null,
      "media_id": "493496",
      "following": false,
      "subscribed": false,
      "media_thumbnail": "/static/img/media/live/uccleague_mid_000.jpg",
      "media_thumbnail_large": "/static/img/media/live/uccleague_large_000.jpg",
      "channel": {
        "user_logo": "/static/img/channel/uccleague_564a21c42a3f1_large.jpg",
        "user_logo_small": "/static/img/channel/uccleague_564a21c42a3f1_small.jpg",
        "channel_link": "http://hitbox.tv/uccleague"
      },
      "esport": {
        "title": "LB Semifinals",
        "start": "2016-06-30T13:00:00+0000",
        "end": "2016-06-30T15:00:00+0000",
        "bestOf": 1,
        "game": {
          "title": "Dota 2",
          "long_title": "Defense of the Ancients 2",
          "deleted_at": null,
          "images": {
            "square": "https://img.abiosgaming.com/games/dota-flat-game-icon.png",
            "circle": "https://img.abiosgaming.com/games/round-dota-logo.png",
            "rectangle": "https://img.abiosgaming.com/games/flat-rectangular-Dota-logo.jpg"
          },
          "backdrop": "/static/img/esport/dota.jpg",
          "image": "//edge.sf.hitbox.tv/static/img/esport/icons/dota2.png"
        },
        "tournament": {
          "title": "2016 SEA Kappa Invitational",
          "format": "<p>The tournament will start with open qualifiers for eight regions, the open qualifiers will be played out in a single-elimination bracket with best-of-one matches except the finalsl that will be best-of-three.&nbsp;<br /><br />Playoff stage will be a double elimination bracket with all matches best-of-three besides the grand finals being best-of-five.</p>",
          "start": "2016-02-19T00:00:00+0000",
          "end": null,
          "city": "Online",
          "admin_note_id": null,
          "short_title": "SEA KInv",
          "url": "http://abiosgaming.com/tournaments/Dota-2/2016-SEA-Kappa-Invitational",
          "description": "<p>SEA Kappa Invitational is a tournament featuring the best teams from the SEA region that will fight for a share of the $ 50,000 prize-pool. The tournament will run over four seasons this year and the first three seasons will give out $ 10,000 and the final season will give out $ 20,000. <br /><br />The event will mainly feature teams from the SEA region but there will be a qualifier called ''non SEA qualifier'' for teams outside the SEA region.&nbsp;</p><p>SEA Kappa invitational will be played Online and it will be starting with a series of qualifiers to determine the teams.</p>",
          "short_description": "SEA Kappa Invitational is a tournament featuring the best teams from the SEA region that will fight for a share of the $ 50,000 prize-pool.",
          "images": {
            "large": "https://img.abiosgaming.com/events/SEA-Kappa-Invitationals-Large.jpg",
            "default": "https://img.abiosgaming.com/events/SEA-Kappa-Invitationals-Small.jpg",
            "thumbnail": "https://img.abiosgaming.com/events/thumbnails/SEA-Kappa-Invitationals-Small.jpg"
          },
          "prizepool": {
            "total": "$ 50,000",
            "first": "$ 7,500 per Season",
            "second": "$ 2,500 per Season",
            "third": "N/A"
          },
          "links": {
            "website": "http://www.seakappa.com/",
            "wiki": "",
            "youtube": "https://www.youtube.com/188BETASIA"
          },
          "game": {
            "id": 1,
            "title": "Dota 2",
            "long_title": "Defense of the Ancients 2",
            "deleted_at": null,
            "images": {
              "square": "https://img.abiosgaming.com/games/dota-flat-game-icon.png",
              "circle": "https://img.abiosgaming.com/games/round-dota-logo.png",
              "rectangle": "https://img.abiosgaming.com/games/flat-rectangular-Dota-logo.jpg"
            }
          }
        },
        "teamA": {
          "name": "Signature.Trust",
          "country": {
            "name": "Thailand",
            "short_name": "TH",
            "images": {
              "default": "https://img.abiosgaming.com/flags/Thailand.png",
              "thumbnail": "https://img.abiosgaming.com/flags/thumbnails/Thailand.png"
            }
          },
          "short_name": "Trust",
          "images": {
            "default": "https://img.abiosgaming.com/competitors/Signature-Gaming-Logo.png",
            "thumbnail": "https://img.abiosgaming.com/competitors/thumbnails/Signature-Gaming-Logo.png",
            "fallback": false
          },
          "is_team": true
        },
        "teamB": {
          "name": "Warriors Gaming.Unity",
          "country": {
            "name": "Malaysia",
            "short_name": "MY",
            "images": {
              "default": "https://img.abiosgaming.com/flags/Malaysia.png",
              "thumbnail": "https://img.abiosgaming.com/flags/thumbnails/Malaysia.png"
            }
          },
          "short_name": "WG.U",
          "images": {
            "default": "https://img.abiosgaming.com/competitors/warriors-gaming-unity-wgu.png",
            "thumbnail": "https://img.abiosgaming.com/competitors/thumbnails/warriors-gaming-unity-wgu.png",
            "fallback": false
          },
          "is_team": true
        },
        "score": {
          "teamA": 0,
          "teamB": 0
        },
        "language": "RU",
        "live": true
      }
    }
  ]
}

GET /esport/events/:type
Returns eSports events.

Query String Description
fast Using this will remove all properties from the tournament object, except title.
limit Maximum number of objects to fetch. Default is 10 and maximum is 100.
liveonly Boolean; Show Only Live Streams.
Parameter Value Description
type all Returns live and future eSports events.
now Returns live eSports events.
future Returns future eSports events.

Videos

Get Video

Example Request

curl -X GET https://api.hitbox.tv/media/video/383014

Example Response

{
  "request": {
    "this": "/media/video/383014"
  },
  "media_type": "video",
  "video": [
    {
      "media_user_name": "masta",
      "media_id": "383014",
      "media_file": "f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02",
      "media_user_id": "1",
      "media_profiles": "[{\"url\":\"\\/masta\\/f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02\\/masta\\/index.m3u8\",\"height\":\"700\",\"bitrate\":0}]",
      "media_type_id": "2",
      "media_is_live": "1",
      "media_live_delay": "0",
      "media_date_added": "2015-01-15 09:42:41",
      "media_live_since": null,
      "media_transcoding": null,
      "media_chat_enabled": "1",
      "media_countries": null,
      "media_hosted_id": null,
      "media_mature": null,
      "media_hidden": null,
      "user_banned": null,
      "media_name": "f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02",
      "media_display_name": "masta",
      "media_status": "test",
      "media_title": "test",
      "media_description": "",
      "media_description_md": null,
      "media_tags": "",
      "media_duration": "1001.1193",
      "media_bg_image": null,
      "media_views": "80",
      "media_views_daily": "0",
      "media_views_weekly": "5",
      "media_views_monthly": "52",
      "category_id": "447",
      "category_name": "Quake Live",
      "category_name_short": null,
      "category_seo_key": "quake-live",
      "category_viewers": "0",
      "category_media_count": "1",
      "category_channels": null,
      "category_logo_small": null,
      "category_logo_large": "/static/img/games/293456-quakelive2.jpg",
      "category_updated": "2015-04-05 20:07:27",
      "team_name": null,
      "media_start_in_sec": "0",
      "media_duration_format": "00:16:41",
      "media_thumbnail": "/static/img/media/videos/f44/f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02_mid_000.jpg",
      "media_thumbnail_large": "/static/img/media/videos/f44/f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02_large_000.jpg",
      "channel": {
        "followers": "58",
        "videos": "2",
        "recordings": "5",
        "teams": "3",
        "user_id": "1",
        "user_name": "masta",
        "user_status": "1",
        "user_logo": "/static/img/channel/masta_54ddf4ed758e5_large.jpg",
        "user_cover": "/static/img/channel/cover_53ff9cfe4724f.jpg",
        "user_logo_small": "/static/img/channel/masta_54ddf4ed758e5_small.jpg",
        "user_partner": "1",
        "partner_type": null,
        "user_beta_profile": "1",
        "media_is_live": "0",
        "media_live_since": "2015-04-06 19:03:18",
        "user_media_id": "1",
        "twitter_account": "hitboxlive",
        "twitter_enabled": "0",
        "livestream_count": "1"
      }
    }
  ]
}

No Media Found

{
  "success": false,
  "error": true,
  "error_msg": "no_media_found"
}

GET /media/video/:media_id
Returns video media object.

Query String Description
authToken Returns Private Media Details.

When a video isn’t found or is private, this API returns an error response with no_media_found as an error_msg

List Videos

Example Request

curl -X GET https://api.hitbox.tv/media/video/masta/list

Example Response

{
  "request": {
    "this": "/media/video/masta/live"
  },
  "media_type": "video",
  "video": [
    {
      "media_user_name": "masta",
      "media_id": "383014",
      "media_file": "f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02",
      "media_user_id": "1",
      "media_profiles": "[{\"url\":\"\\/masta\\/f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02\\/masta\\/index.m3u8\",\"height\":\"700\",\"bitrate\":0}]",
      "media_type_id": "2",
      "media_is_live": "1",
      "media_live_delay": "0",
      "media_date_added": "2015-01-15 09:42:41",
      "media_live_since": null,
      "media_transcoding": null,
      "media_chat_enabled": "1",
      "media_countries": null,
      "media_hosted_id": null,
      "media_mature": null,
      "media_hidden": null,
      "user_banned": null,
      "media_name": "f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02",
      "media_display_name": "masta",
      "media_status": "test",
      "media_title": "test",
      "media_description": "",
      "media_description_md": null,
      "media_tags": "",
      "media_duration": "1001.1193",
      "media_bg_image": null,
      "media_views": "80",
      "media_views_daily": "0",
      "media_views_weekly": "5",
      "media_views_monthly": "52",
      "category_id": "447",
      "category_name": "Quake Live",
      "category_name_short": null,
      "category_seo_key": "quake-live",
      "category_viewers": "0",
      "category_media_count": "1",
      "category_channels": null,
      "category_logo_small": null,
      "category_logo_large": "/static/img/games/293456-quakelive2.jpg",
      "category_updated": "2015-04-05 20:07:27",
      "team_name": null,
      "media_start_in_sec": "0",
      "media_duration_format": "00:16:41",
      "media_thumbnail": "/static/img/media/videos/f44/f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02_mid_000.jpg",
      "media_thumbnail_large": "/static/img/media/videos/f44/f44adf90449ec494e16cf9f5398d4b30fa2a073c-54b6d50e3a53d_54b78b9e06b02_large_000.jpg",
      "channel": {
        "followers": "58",
        "videos": "2",
        "recordings": "5",
        "teams": "3",
        "user_id": "1",
        "user_name": "masta",
        "user_status": "1",
        "user_logo": "/static/img/channel/masta_54ddf4ed758e5_large.jpg",
        "user_cover": "/static/img/channel/cover_53ff9cfe4724f.jpg",
        "user_logo_small": "/static/img/channel/masta_54ddf4ed758e5_small.jpg",
        "user_partner": "1",
        "partner_type": "migrated",
        "user_beta_profile": "1",
        "media_is_live": "0",
        "media_live_since": "2015-04-06 19:03:18",
        "user_media_id": "1",
        "twitter_account": "hitboxlive",
        "twitter_enabled": "0",
        "livestream_count": "1"
      }
    },
    ...
  ]
}

GET /media/video/:channel/list
Returns lists of video media object.

Query String Description
authToken Returns Private Media Details.
filter Filters Media. Valid: recent, popular (Default)
hiddenOnly Boolean; Only Show Hidden Media.
limit Maximum number of objects to fetch. Default and maximum is 100.
publicOnly Boolean; Show Only Visible Media.
search Search keyword for media_status.
showHidden Boolean; Show Hidden Media.
yt Boolean; Only show media pushed to YouTube.

Create Video

Example POST Payload

URL: https://api.hitbox.tv/media/video/masta?authToken=SuperSecret
{
  "user_name": "masta",
  "authToken": "SuperSecret",
  "media_type": "video",
  "media_title": "Video Title!",
  "media_status": "Video Title!",
  "media_name": "masta",
  "media_hidden": "0",
  "media_category_id": "457",
  "clip_duration": 112,
  "clip_start": 0,
  "rec_session": "b3652dadeaee84dd420ce488cxzf543arew324d37-563d326f93676",
  "original": true
}

Example Responses
Successful

{
  "media_id": "487354"
}

Failed (Title too short, rec_session incorrect, …)

{
  "error": true,
  "error_msg": "media_error",
  "success": false
}

POST /media/video/:channel
Creates a video object from a recording object.

Query String Description
authToken Users Authentication Token

Update Video

Example PUT Payload

URL: https://api.hitbox.tv/media/video/481290
{
  "video": [
    {
      "media_user_name": "masta",
      "media_id": "481290",
      "media_category_id": "24146",
      "media_hidden": "0",
      "media_status": "This is a video title!",
      "media_description": ""
    }
  ]
}

Example Response

{
  "video": [
    {
      "media_user_name": "masta",
      "media_id": "481290",
      "media_category_id": "24146",
      "media_hidden": "0",
      "media_status": "This is a video title!",
      "media_description": ""
    }
  ],
  "livestream": [
    {
      "media_description_md": null
    }
  ]
}

PUT /media/video/:video_id
Updates video media object.

Query String Description
authToken Users Authentication Token

Recordings

Example Request

curl -X GET https://api.hitbox.tv/recordings/masta?authToken=SuperSecret

Example Response

[
  {
    "rec_id": "2589655",
    "rec_media_id": "15830",
    "rec_session": "65a2321e12b254a43e92174e8d3633b81826b9a9-55223b0ba49c2",
    "rec_title": "Test Recording - Apr 6th #1",
    "rec_category_id": "50055",
    "rec_path": "/static/videos/vods/masta/65a2321e12b254a43e92174e8d3633b81826b9a9-55223b0ba49c2/masta/index.m3u8",
    "rec_name": "masta",
    "rec_addr": "WAS-BCH1-BL07",
    "rec_info": {
      "index": 0,
      "codec_name": "h264",
      "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
      "profile": "High",
      "codec_type": "video",
      "codec_time_base": "1/60",
      "codec_tag_string": "[27][0][0][0]",
      "codec_tag": "0x001b",
      "width": 1280,
      "height": 720,
      "has_b_frames": 2,
      "sample_aspect_ratio": "0:1",
      "display_aspect_ratio": "0:1",
      "pix_fmt": "yuv420p",
      "level": 31,
      "r_frame_rate": "30/1",
      "avg_frame_rate": "15/1",
      "time_base": "1/90000",
      "start_pts": 119340,
      "start_time": "1.326000",
      "disposition": {
        "default": 0,
        "dub": 0,
        "original": 0,
        "comment": 0,
        "lyrics": 0,
        "karaoke": 0,
        "forced": 0,
        "hearing_impaired": 0,
        "visual_impaired": 0,
        "clean_effects": 0,
        "attached_pic": 0
      }
    },
    "rec_height": "720",
    "rec_bitrate": "81",
    "rec_duration": "00:00:13",
    "rec_date_added": "2015-04-06 07:48:17",
    "rec_saved_media_id": null,
    "rec_done": null,
    "rec_uploaded": "1",
    "thumbnail": "/static/img/media/videos/65a/65a2321e12b254a43e92174e8d3633b81826b9a9-55223b0ba49c2_mid_000.jpg",
    "thumbnail_large": "/static/img/media/videos/65a/65a2321e12b254a43e92174e8d3633b81826b9a9-55223b0ba49c2_large_000.jpg",
    "rec_duration_sec": "13.0000",
    "rec_download_link": "http://edge.bf.hitbox.tv/download/index.m3u8?h=GZppQLFmWSs1HNt5X3zjQA&e=1428486406"
  }
]

GET /recordings/:channel
Returns recordings for :channel.

Query String Description
authToken Users Authentication Token
limit Maximum number of objects to fetch. Default and maximum is 100.

User

Example Request

curl -X GET https://api.hitbox.tv/relateduser/masta?authToken=SuperSecret

Example Response

{
  "success": true,
  "livestream": [
    {
      "media_display_name": "masta",
      "media_status": "OK Let's do this!",
      "media_name": "masta",
      "category_name": "Counter-Strike: Global Offensive",
      "category_seo_key": "counter-strike-global-offensive",
      "media_views": "1",
      "media_countries": [
        "en"
      ],
      "media_live_since": "2016-06-06 16:21:40",
      "media_is_live": "1",
      "media_id": "1",
      "media_thumbnail": "/static/img/media/live/masta_mid_000.jpg",
      "media_thumbnail_large": "/static/img/media/live/masta_large_000.jpg",
      "channel": {
        "user_logo": "/static/img/channel/masta_57502aa70463d_large.jpg",
        "user_logo_small": "/static/img/channel/masta_57502aa70463d_small.jpg",
        "channel_link": "http://hitbox.tv/masta"
      },
      "following": false,
      "recommended": true,
      "subscribed": false
    },
    ...
  ]
}

GET /relateduser/:user
Returns related streams for :user

Query String Description
authToken Users Authentication Token
limit Maximum number of objects to fetch. Default is 10 and maximum is 100.
language Filter by ISO 639-1 language code.
withFollowers Whether to append channels you follow. This is a boolean.

Followers

Followers of a hitbox user and channel.

Get Followers

Example Request

curl -X GET https://api.hitbox.tv/followers/user/masta

Example Response

{
  "request": {
    "this": "/followers/user/masta"
  },
  "followers": [
    {
      "followers": "59",
      "user_name": "DrS",
      "user_id": "88",
      "user_logo": "/static/img/channel/DrS_54d0e988c714d_large.jpg",
      "user_logo_small": "/static/img/channel/DrS_54d0e988c714d_small.jpg",
      "follow_id": "1",
      "follower_user_id": "88",
      "follower_notify": "1",
      "date_added": "2015-01-05 13:12:03"
    },
    ...
  ],
  "max_results": "1"
}

GET /followers/user/:channel
Returns a list of users following :channel

Looking to provide notifications? Followers are also sent as a chatLog to chat admins! Read More

Query String Description
offset The offset for pagination. Default is 0.
limit Maximum number of objects to fetch. Default and maximum is 100.
reverse Reverse returned results by sort.
sort Sorts follower objects. Valid: date_added (Default), user_name, user_id, follower_notify.

The follower_notify property shows whether that user has email notification turned on 1 or not 0.

Get Followed Channels

Example Request

curl -X GET https://api.hitbox.tv/following/user?user_name=masta

Example Response

{
  "request": {
    "this": "/following/user"
  },
  "following": [
    {
      "followers": "4",
      "videos": "4",
      "recordings": "5",
      "teams": "3",
      "user_name": "markus",
      "user_id": "18",
      "user_logo": "/static/img/channel/markus_548abce656ecc_large.png",
      "user_logo_small": "/static/img/channel/markus_548abce656ecc_small.png",
      "follow_id": "18",
      "follower_user_id": "1",
      "follower_notify": "1",
      "date_added": "2013-08-17 08:09:56"
    },
    ...
  ],
  "max_results": "0"
}

GET /following/user
Returns a list of channels a user follows.

Query String Description
user_name hitbox Username
offset The offset for pagination. Default is 0.
limit Maximum number of objects to fetch. Default and maximum is 100.
reverse Reverse returned results by sort.
sort Sorts follower objects. Valid: date_added (Default), user_name, user_id, follower_notify.

The follower_notify property shows whether that user has email notification turned on 1 or not 0.

Check Following Status

Example Request

curl -X GET https://api.hitbox.tv/following/user/RenehtbX?user_name=masta

Example Response

{
  "following": {
    "follow_id": "74",
    "follower_user_id": "1",
    "follower_notify": "1"
  }
}

GET /following/user/:channel
Returns follower relationship from user_name to :channel

Query String Description
user_name hitbox Username

The follower_notify property shows whether that user has email notification turned on 1 or not 0.

Follower Statistics

GET /followerstats/:channel
Returns follower statistics for :channel

Query String Description
authToken Users Authentication Token

Example Request

curl -X GET https://api.hitbox.tv/followstats/masta?authToken=SuperSecret

Example Response

{
  "followers": [
    {
      "date": "2014-06-06",
      "followers": "2"
    },
    ...
  ]
}

Follow a Channel

Example POST Payload

URL: https://api.hitbox.tv/follow?authToken=SuperSecret
{
  "type": "user",
  "follow_id": "Masta"
}

Success Response

{
  "success": true,
  "error": false,
  "message": "following"
}

Already Following Response

{
  "success": true,
  "error": false,
  "message": "already_following"
}

POST /follow
Follows a channel.

Query String Description
authToken Users Authentication Token

follower_id can be either a username or user_id of a user you want to follow.

Unfollow a Channel

Example DELETE Request

URL: https://api.hitbox.tv/follow?authToken=SuperSecret&follow_id=1&type=user

Example Response

{
  "success": true,
  "error": false,
  "message": "un-followed"
}

DELETE /follow
Removes follower relationship for :channel

Query String Description
authToken Users Authentication Token
follow_id user_id of user.
type Must be user.

Subscription

Subscriptions

Example Request

curl -X GET https://api.hitbox.tv/subscriptionlist/masta?authToken=SuperSecret

Example Response

{
  "request": {
    "this": "/subscriptionlist/masta"
  },
  "subscriptions": [
    {
      "followers": "59",
      "sub_id": "1",
      "sub_date_added": "2015-02-19 09:59:57",
      "sub_date_valid": "2015-03-19 09:59:58",
      "sub_payment_method": "paypal",
      "canceled": "0",
      "plan_charge": "4.99",
      "plan_currency": "EUR",
      "plan_recurring": "1",
      "plan_id": "1",
      "user_name": "masta",
      "user_id": "1",
      "user_logo": "/static/img/channel/masta_54ddf4ed758e5_large.jpg",
      "user_logo_small": "/static/img/channel/masta_54ddf4ed758e5_small.jpg",
      "user_cover": "/static/img/channel/cover_53ff9cfe4724f.jpg",
      "benefits": [
        {
          "name": "emotes",
          "text": "Exclusive Emoticons",
          "type": "emote",
          "media": null
        }
      ]
    }
  ]
}

GET /subscriptionlist/:user
Returns a list of channels :user is subscribed to.

Query String Description
authToken Users Authentication Token

Subscribers

Example Request

curl -X GET https://api.hitbox.tv/subscriberlist/masta?authToken=SuperSecret

Example Response

{
  "request": {
    "this": "/subscriberlist/test-account"
  },
  "subscribers": [
    {
      "followers": "123",
      "user_name": "Masta",
      "user_id": "1",
      "user_logo": "/static/img/channel/masta_55270735d51ac_large.jpg",
      "user_logo_small": "/static/img/channel/masta_55270735d51ac_small.jpg",
      "sub_date_added": "2015-01-20 15:49:51",
      "sub_date_valid": "2015-07-20 04:35:31",
      "sub_payment_method": "paypal",
      "canceled": null
    }
  ]
}

GET /subscriberlist/:channel
Returns a list of subscribers for :channel.

Looking to provide notifications? Subscribers are also sent as a chatLog to chat admins! Read More

Query String Description
authToken Users Authentication Token

Subscriber Badge

Example Request

curl -X GET https://api.hitbox.tv/mediabadges/masta

Example Response

{
  "request": {
    "this": "/mediabadges/masta"
  },
  "badges": [
    {
      "badge_id": "113339",
      "badge_media_id": "1",
      "badge_name": "masta",
      "badge_image": "/static/img/chat/masta/badge.png",
      "badge_enabled": "1"
    }
  ]
}

GET /mediabadges/:channel
Returns the subscriber badge for :channel

Check Subscription Status

Example Request

curl -X GET https://api.hitbox.tv/user/subscription/masta/SuperSecret

Example Responses
Subscriber:

{
  "isSubscriber": true
}

Not Subscriber:

{
  "isSubscriber": false
}

GET /user/subscription/:channel/:auth
Returns subscription relationship between :channel and :auth

Check Subscription Info

Example Request

curl -X GET https://api.hitbox.tv/subscription/masta/tijl?authToken=SuperSecret

Example Response

{
  "sub_id": "1",
  "sub_date_added": "2015-01-20 15:49:51",
  "sub_date_valid": "2016-01-17 04:39:33",
  "sub_plan_id": "1",
  "sub_payment_method": "paypal",
  "plan_charge": "4.99",
  "plan_currency": "USD",
  "plan_recurring": "1",
  "user_name": "masta",
  "user_id": "1",
  "user_logo": "/static/img/channel/masta_53cda132384df_large.png",
  "user_logo_small": "/static/img/channel/masta_53cda132384df_small.png",
  "cancel": null,
  "benefits": [],
  "resub": false
}

GET /subscription/:channel/:user
Retruns subscription information between :channel and :user

Query String Description
authToken Users Authentication Token

Teams

Teams are an organization of channels.

List Teams

Example Request

curl -X GET https://api.hitbox.tv/teams?search=hitbox

Example Response

{
  "teams": [
    {
      "info": {
        "group_id": "44",
        "founder_name": "RenehtbX",
        "group_name": "hitbox",
        "group_display_name": "[HITBOX]",
        "group_text": "Hitbox staff members",
        "group_logo_small": "/static/img/teams/logo_5222ec8796486_small.jpg",
        "group_logo_large": "/static/img/teams/logo_5222ec8796486_large.jpg",
        "group_cover": "/static/img/teams/cover_5246d408cec79.jpg",
        "member_total": 2,
        "group_default": 0
      },
      "members": [
        {
          "followers": "58",
          "videos": "2",
          "recordings": "5",
          "teams": "6",
          "user_id": "1",
          "user_name": "masta",
          "user_status": "1",
          "user_logo": "/static/img/channel/Markus_51b9242fb1138_large.jpg",
          "user_cover": "/static/img/channel/cover_Markus_51b9242fb1138.png",
          "user_logo_small": "/static/img/channel/Markus_51b9242fb1138_small.jpg",
          "user_partner": "1",
          "admin": "1",
          "enabled": "1",
          "is_default": "1",
          "revenues_enabled": null,
          "group_role": "admin",
          "group_accepted": true
        },
        {
          "followers": "2",
          "user_id": "29",
          "user_name": "xtreemo",
          "user_status": "1",
          "user_logo": "/static/img/channel/xtreemo_522230b14fd5f_large.jpg",
          "user_cover": null,
          "user_logo_small": "/static/img/channel/xtreemo_522230b14fd5f_small.jpg",
          "user_partner": null,
          "admin": null,
          "enabled": "1",
          "is_default": "1",
          "revenues_enabled": null,
          "group_role": "member",
          "group_accepted": true
        },
        ...
      ]
    },
    ...
  ]
}

GET /teams
Returns a list of active teams.

Query String Description
search Search keyword for group_name.

Get Teams of User

Example Request

curl -X GET https://api.hitbox.tv/teams/masta

Example Response

{
  "teams": [
    {
      "info": {
        "group_id": "44",
        "founder_name": "RenehtbX",
        "group_name": "hitbox",
        "group_display_name": "[HITBOX]",
        "group_text": "Hitbox staff members",
        "group_logo_small": "/static/img/teams/logo_5222ec8796486_small.jpg",
        "group_logo_large": "/static/img/teams/logo_5222ec8796486_large.jpg",
        "group_cover": "/static/img/teams/cover_5246d408cec79.jpg",
        "members_total": 9,
        "group_role": "member",
        "group_accepted": true,
        "group_default": 0
      },
      "members": [
        {
          "followers": "58",
          "videos": "2",
          "recordings": "5",
          "teams": "6",
          "user_id": "1",
          "user_name": "masta",
          "user_status": "1",
          "user_logo": "/static/img/channel/Markus_51b9242fb1138_large.jpg",
          "user_cover": "/static/img/channel/cover_Markus_51b9242fb1138.png",
          "user_logo_small": "/static/img/channel/Markus_51b9242fb1138_small.jpg",
          "user_partner": "1",
          "admin": "1",
          "enabled": "1",
          "group_role": "admin",
          "group_accepted": true
        },
        {
          "followers": "2",
          "videos": "2",
          "recordings": "5",
          "teams": "6",
          "user_id": "29",
          "user_name": "xtreemo",
          "user_status": "1",
          "user_logo": "/static/img/channel/xtreemo_522230b14fd5f_large.jpg",
          "user_cover": null,
          "user_logo_small": "/static/img/channel/xtreemo_522230b14fd5f_small.jpg",
          "user_partner": null,
          "admin": null,
          "enabled": "1",
          "group_role": "member",
          "group_accepted": true
        },
        ...
      ]
    },
    ...
  ]
}

GET /teams/:user/
Returns a list of team objects, where :user is a member.

Query String Description
media Boolean; Whether to include media from team users.
media_type Media to populate from team users. Valid: Live or Video
liveonly Boolean; Show Only Live Streams.
partner Boolean; Whether to only include teams with partnership.

Get Team

Example Request

curl -X GET https://api.hitbox.tv/team/hitbox

Example Response

{
  "info": {
    "group_id": "44",
    "founder_name": "RenehtbX",
    "group_name": "hitbox",
    "group_display_name": "[HITBOX]",
    "group_text": "Hitbox staff members",
    "group_logo_small": "/static/img/teams/logo_545230d8bd5b0_small.png",
    "group_logo_large": "/static/img/teams/logo_545230d8bd5b0_large.png",
    "group_cover": "/static/img/teams/cover_5246d408cec79.jpg",
    "members_total": 1
  },
  "members": [
    {
      "followers": "58",
      "videos": "0",
      "recordings": "0",
      "teams": "0",
      "user_id": "1",
      "user_name": "masta",
      "user_status": "1",
      "user_logo": "/static/img/channel/masta_52613d2734a60_large.jpg",
      "user_cover": "/static/img/channel/cover_53ff9cfe4724f.jpg",
      "user_logo_small": "/static/img/channel/masta_52613d2734a60_small.jpg",
      "user_partner": "1",
      "admin": "1",
      "enabled": "1",
      "is_default": "1",
      "revenues_enabled": null,
      "group_role": "admin",
      "group_accepted": true
    },
    ...
  ]
}

GET /team/:team
Returns a team object for :team.

Query String Description
media Boolean; Whether to include media from team users.
media_type Media to populate from team users. Valid: Live or Video
liveonly Boolean; Show Only Live Streams.
partner Boolean; Whether to only include teams with partnership.

Revenue Statistics

Example Request

curl -X GET https://api.hitbox.tv/revenues/team/testteam?authToken=SuperSecret&endDate=2015-11-10&startDate=2015-10-10

Example Response

{
  "request": {
    "this": "/revenues/team/TestTeam",
    "type": "team",
    "user": "TestTeam"
  },
  "team": {
    "revenues": {
      "summary": {
        "currency": "USD"
      },
      "plans": [
        {
          "plan_id": "1",
          "plan_name": "TestTeam",
          "plan_group_id": "1",
          "plan_user_id": null,
          "plan_countries": "Australia,Belgium,Canada,Denmark,Finland,France,Luxembourg,Netherlands,Norway,Sweden,United Kingdom,United States",
          "plan_cpm": "0.00",
          "plan_currency": "USD",
          "plan_date_added": "2015-01-12 00:00:00"
        },
        {
          "plan_id": "2",
          "plan_name": "TestTeam",
          "plan_group_id": "1",
          "plan_user_id": null,
          "plan_countries": "*",
          "plan_cpm": "0.00",
          "plan_currency": "USD",
          "plan_date_added": "2015-01-12 00:00:00"
        },
        {
          "plan_id": "3",
          "plan_name": "TestTeam",
          "plan_group_id": "1",
          "plan_user_id": null,
          "plan_countries": "Austria,Germany,Switzerland",
          "plan_cpm": "0.00",
          "plan_currency": "USD",
          "plan_date_added": "2015-01-12 00:00:00"
        }
      ],
      "members": {
        "1": {
          "summary": {
            "last_updated": "2015-11-11 00:00:00",
            "total_earnings": 0,
            "max_earnings": null,
            "sub_earnings": 0,
            "live_earnings": 0,
            "video_earnings": 0
          },
          "timeline": [
            [
              1444435200000,
              0
            ]
          ],
          "daily": {
            "2015-10-10": {
              "earnings": 0
            }
          }
        },
        ...
      }
    },
    "info": {
      "group_id": "1",
      "founder_name": "TestAdmin",
      "group_name": "TestTeam",
      "group_display_name": "Test Team",
      "group_text": "The Best Team Description.",
      "group_logo_small": "/static/img/teams/logo_54c643249d_small.png",
      "group_logo_large": "/static/img/teams/logo_54c643249d_large.png",
      "group_cover": null,
      "members_total": 1
    },
    "members": [
      {
        "followers": "113",
        "user_id": "1",
        "user_name": "TestAdmin",
        "user_status": "1",
        "user_logo": "/static/img/channel/TestAdmin_53cda133184df_large.png",
        "user_cover": "/static/img/channel/cover_52f62514d614b.png",
        "user_logo_small": "/static/img/channel/TestAdmin_53cda133184df_small.png",
        "user_email": "example@example.com",
        "revenues": {
          "summary": {
            "last_updated": "2015-11-11 00:00:00",
            "total_earnings": 0,
            "max_earnings": 0,
            "sub_earnings": 0,
            "live_earnings": 0,
            "video_earnings": 0
          },
          "timeline": [
            [
              1444435200000,
              0
            ]
          ],
          "daily": {
            "2015-10-10": {
              "earnings": 0
            }
          }
        }
      },
      ...
    ],
    "summary": {
      "currency": "USD"
    }
  }
}

GET /revenues/team/:teamName
Returns revenue data of :teamName for a given time period.

Query String Description
authToken Team Admin Authentication Token
startDate Date Format YYYY-MM-DD
endDate Date Format YYYY-MM-DD

Create Team

Example POST Payload

URL: https://api.hitbox.tv/team?authToken=SuperSecret
{
  "authToken": "SuperSecret",
  "group_user_name": "Masta",
  "group_name": "hitbox",
  "group_text": "Hitbox staff members.",
  "group_display_name": "[HITBOX]"
}

Example Success Response

{
  "success": true,
  "success_msg": "team_created"
}

Group Name is taken

{
  "success": false,
  "error": true,
  "error_msg": "group_taken"
}

Display name differs from group name

{
  "error": true,
  "error_msg": "invalid_display_name"
}

Group Text is too short or invalid

{
  "error": true,
  "error_msg": "text_required"
}

Auth Token invalid

{
  "success": false,
  "error": true,
  "error_msg": "permission_denied"
}

POST /team
Creates a team object.

Query String Description
authToken Users Authentication Token

Update Team

Example PUT Payload

URL: https://api.hitbox.tv/team/hitbox/RenehtbX?authToken=SuperSecret
{
  "info": {
    "group_id": "44",
    "founder_name": "RenehtbX",
    "group_name": "hitbox",
    "group_display_name": "[HITBOX]",
    "group_text": "Hitbox staff members",
    "group_logo_small": "/static/img/teams/logo_545230d8bd5b0_small.png",
    "group_logo_large": "/static/img/teams/logo_545230d8bd5b0_large.png",
    "group_cover": "/static/img/teams/cover_5246d408cec79.jpg"
  },
  "invites": [
    "Masta"
  ]
}

Example Response

{
  "info": {
    "group_id": "44",
    "founder_name": "RenehtbX",
    "group_name": "hitbox",
    "group_display_name": "[HITBOX]",
    "group_text": "hitbox staff members",
    "group_logo_small": "/static/img/teams/logo_545230d8bd5b0_small.png",
    "group_logo_large": "/static/img/teams/logo_545230d8bd5b0_large.png",
    "group_cover": "/static/img/teams/cover_5246d408cec79.jpg"
  },
  "invites": [
    "Masta"
  ]
}

PUT /team/:team/:user
Updates, invites users or disbands a team.

Query String Description
authToken Team Admin Authentication Token
action Action to perform on team. Valid: delete_team, delete_logo, delete_cover

You should only include the invites array if you are inviting users to the team.

Accept Team Invite

Example UPDATE Request

URL: https://api.hitbox.tv/team/hitbox/masta?authToken=SuperSecret&group_id=44

Example Response

{
  "success": true,
  "success_msg": "accepted_masta"
}

UPDATE /team/:team/:user
Accept an invite from :team.

Query String Description
authToken User or Team Admin Authentication Token
group_id :team Group ID

Kick or Leave

Example DELETE Request

URL: https://api.hitbox.tv/team/hitbox/masta?authToken=SuperSecret&group_id=44

Example Responses
Success

{
  "success": true,
  "success_msg": "deleted_masta"
}

Auth Token invalid

{
  "success": false,
  "error": true,
  "error_msg": "permission_denied"
}

DELETE /team/:team/:user
Kick a member or leave the team.

Query String Description
authToken User or Team Admin Authentication Token
group_id :team Group ID

Kick: :team to kick :user from.

Leave: :user to leave :team

Games

Games are categories (e.g. League of Legends, Diablo 3) used by streams and channels. Games can be searched for by query.

List Games

Example Request

curl -X GET https://api.hitbox.tv/games

Example Response

{
  "request": {
    "this": "/games"
  },
  "categories": [
    {
      "category_id": "1",
      "category_name": "League of Legends",
      "category_name_short": null,
      "category_seo_key": "league-of-legends",
      "category_viewers": "337",
      "category_media_count": "19",
      "category_channels": null,
      "category_logo_small": null,
      "category_logo_large": "/static/img/games/league_of_legends.jpg",
      "category_updated": "2015-04-06 07:56:23"
    },
    ...
  ]
}

GET /games
Returns a list games sorted by the number of viewers.

Query String Description
q Search keyword for category_name
limit Maximum number of objects to fetch. Default and maximum is 100.
liveonly Return only games that have live channels.

Get Game

Example Request

curl -x GET https://api.hitbox.tv/game/dota-2

Example Response

{
  "request": {
    "this": "/game/1"
  },
  "category": {
    "category_id": "1",
    "category_name": "League of Legends",
    "category_name_short": null,
    "category_seo_key": "league-of-legends",
    "category_viewers": "1313",
    "category_media_count": "36",
    "category_channels": null,
    "category_logo_small": null,
    "category_logo_large": "/static/img/games/2115067-box_lol.png",
    "category_updated": "2015-04-07 02:14:28"
  }
}

GET /game/:game

Query String Description
seo If using a game name, this must be true.

:game takes a game name (eg. league-of-legends) or the games category_id (eg. 1)

Ingests

Request

curl -X GET https://api.hitbox.tv/ingests/default_list

Example Response

[
  {
    "ingest_location": "Default",
    "ingest_url": "rtmp://live.hitbox.tv/push"
  },
  {
    "ingest_location": "EU-West (Frankfurt)",
    "ingest_url": "rtmp://live.fra.hitbox.tv/push"
  },
  {
    "ingest_location": "EU-West (Paris)",
    "ingest_url": "rtmp://live.cdg.hitbox.tv/push"
  },
  ...
]

GET /ingests/default_list
Returns a list of servers for live stream ingesting.

Chat

Connection

Pre-Server Connection

Request

curl -X GET https://api.hitbox.tv/chat/servers

Example Response

[
  {
    "server_ip": "ec2-50-19-17-54.ch.hitbox.tv"
  },
  {
    "server_ip": "ec2-54-159-16-123.ch.hitbox.tv"
  },
  {
    "server_ip": "ec2-54-158-11-144.ch.hitbox.tv"
  },
  {
    "server_ip": "ec2-54-224-57-231.ch.hitbox.tv"
  },
  {
    "server_ip": "ec2-23-20-88-5.ch.hitbox.tv"
  }
]

To start connecting to hitbox chat servers, you should initiate a HTTP GET /chat/servers request. The result will be a Json Array with objects containing server addresses.

You should pick a server from the response, but you should never save the address. The servers are ever changing and getting the list from the API on every start is the safest method.

At this point you should also get a authentication token for the user unless you are planning to login as a guest.

WebSocket ID

Once you get the server address from above, you should append /socket.io/1/ to the address. After that you need to send a HTTP GET request to that address.

For example http://ec2-50-19-17-54.ch.hitbox.tv/socket.io/1/ will return:

jA-TY6bwWIA6iHprmbWQ:60:60:websocket

You will then need to get everything before the first colon ’:’ which will be your connection ID.
In this case: jA-TY6bwWIA6iHprmbWQ

Server Connection

Now you can get on to actually connecting with all the previous information. You should initiate a WebSocket connection to the finalized WebSocket URL
ws://ec2-50-19-17-54.ch.hitbox.tv/socket.io/1/websocket/jA-TY6bwWIA6iHprmbWQ

If you cannot connect after 8 seconds you should grab another server and connection ID.

Post-Server Connection

Once you are connected to the server you will recieve a 1::. Every 60 seconds you will recieve a 2:: which you should echo back as soon as possible.

There are also limits on how many connections can be made from one IP/One User within a time frame. The same limits apply to chat messages and all other functions.

Chat User

Login Command

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "joinChannel",
      "params": {
        "channel": "Channel",
        "name": "Username or UnknownSoldier",
        "token": "Users Auth Token or null",
        "hideBuffered": false
      }
    }
  ]
}

Example Response

5:::{
  "name": "message",
  "args": [
    {
      "method": "loginMsg",
      "params": {
        "channel": "CHANNEL",
        "name": "USERNAME or UnknownSoldier",
        "role": "guest, anon, user or admin"
      }
    }
  ]
}

If you don’t have a login to use, you can login as a guest role with UnknownSoldier and provide null (not a string) as a token. If you ever get back UnknownSoldier when you didn’t send it, that means you provided a incorrect login and should disconnect and try again.

Sending hideBuffered as true will not send back a backlog of chat messages.

The client must wait until it gets login confirmation before doing anything else.

If you don’t get a loginMsg response within 10 seconds the chat server is not responding, you should disconnect from the server and try another one.

Once you’ve joined a channel, you may be sent a backlog of chatLog and chatMsg, these will contain a buffer boolean property. The last message of each backlog will include a buffersent boolean property to indicate sending has finished.

Rules

Logout Command

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "partChannel",
      "params": {
        "name": "USERNAME or UnknownSoldier"
      }
    }
  ]
}

To logout you have to send the logout command, you won’t get a response but you will be logged out from the server. You can now close the connection.

You cannot reuse the same connection.

Permissions and Roles

Role
guest You are a unregistered user. You cannot write in chat and any messages you send will be dropped. User list is also disallowed.
anon You are a normal viewer. You can write and see the user list. Strict messages/second limits apply. Duplicate messages are disallowed.
user You are a moderator. You can kick/ban other users, set slow and sub mode but cannot IP ban a user.
admin You have full permission in chat. You can add/remove moderators and IP ban a user.*

* Any user that is admin but isn’t staff/ambassador and does not have the owner flag is an editor. Editors are not allowed to add or remove moderators.

chatMsg/infoMsg Role
isFollower If this user is following this channel.
isSubscriber If this user is subscribed to this channel.
isOwner If this is the channel owner, If so you can get the image of the owner in the “image” key.
isStaff If this user is a hitbox Staff member and has admin rights
isCommunity If this user is a hitbox Ambassador and has admin rights

User List

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "getChannelUserList",
      "params": {
        "channel": "CHANNEL"
      }
    }
  ]
}

Example Response

5:::{
  "name": "message",
  "args": [
    {
      "method": "userList",
      "params": {
        "channel": "CHANNEL",
        "data": {
          "Guests": null,
          "admin": [
            "Broadcaster", "Staff-Member", "Community-Member", "Editor"
          ],
          "user": [
            "Moderator"
          ],
          "anon": [
            "test-account"
          ],
          "isFollower": [
            "Moderator", "test-account", "Staff-Member"
          ],
          "isSubscriber": [
            "Staff-Member", "test-account"
          ],
          "isStaff": [
            "Staff-Member"
          ],
          "isCommunity": [
            "Community-Member"
          ]
        }
      }
    }
  ]
}

To request a user list for a channel you must be logged in as a user.

Staff members are always listed in admin, isStaff and isSubscriber.
Ambassadors are listed in admin and isCommunity.
Guests contain an integer of the number of unregistered chatters or null when there are zero guests.

User Info

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "getChannelUser",
      "params": {
        "channel": "CHANNEL",
        "name": "Username to query"
      }
    }
  ]
}

Example Response

5:::{
  "name": "message",
  "args": [
    {
      "method": "userInfo",
      "params": {
        "channel": "CHANNEL",
        "name": "Username",
        "timestamp": 1449986713,
        "role": "Role of user",
        "isFollower": true/false,
        "isSubscriber": true/false,
        "isOwner": true/false,
        "isStaff": true/false,
        "isCommunity": true/false
      }
    }

Get information about a user including it’s roles.
If you query a banned user role will be set to banned, the role flags are removed and "banned":true parameter added.

Chat Colors

Example Request

curl -X GET https://api.hitbox.tv/chat/colors

Example Response

{
  "colors": [
    "D44F38",
    "D45236",
    "D35635",
    "D35C33",
    "D36132",
    ...
  ]
}

GET /chat/colors
Get valid chat colors you can use.

Moderation

Unless otherwise noted, the following commands are limited to channel moderators and higher.

Timeout

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "kickUser",
      "params": {
        "channel": "CHANNEL",
        "name": "Name of user to timeout",
        "token": "Token of moderator",
        "timeout": "10"
      }
    }
  ]
}

Broadcasted infoMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "Username has been timed out.",
        "channel": "CHANNEL",
        "lang": "view.chat.text.has_been_timed_out",
        "variables": {
          "user": "Username"
        },
        "timestamp": 1449977952,
        "name": "Username",
        "action": "kicked"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelMod</user> kicked <user>Username</user> for 600 seconds",
        "timestamp": 1449977952,
        "channel": "CHANNEL"
      }
    }
  ]
}

Timeout (ban temporarily) a user from a channel for a specified amount of seconds.
If everything is correct the chat server will send a infoMsg to all users.

Ban

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "banUser",
      "params": {
        "channel": "CHANNEL",
        "name": "Name of user to ban"
      }
    }
  ]
}

Broadcasted infoMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "Username has been banned.",
        "lang": "view.chat.text.has_been_banned",
        "variables": {
          "user": "Username"
        },
        "channel": "CHANNEL",
        "timestamp": 1449979279,
        "name": "Username",
        "action": "ban"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelMod</user> banned <user>Username</user>",
        "timestamp": 1449979279,
        "channel": "CHANNEL"
      }
    }
  ]
}

Example Ban List Response

5:::{
  "name": "message",
  "args": [
    {
      "method": "banList",
      "params": {
        "channel": "CHANNEL",
        "data": [
          "test-account",
          "test-account-2"
        ]
      }
    }
  ]
}

Indefinately ban a user from a channel.
If successful the chat server will send a infoMsg, userList and banList to all users.

The Ban list contains all the banned users for a channel. When there are banned users, you will get this message anytime you request a userList.

IP Ban

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "banUser",
      "params": {
        "channel": "CHANNEL",
        "name": "Name of user to ban",
        "token": "Token of admin",
        "banIP": true
      }
    }
  ]
}

Broadcasted infoMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "Username has been banned.",
        "lang": "view.chat.text.has_been_banned",
        "variables": {
          "user": "Username"
        },
        "channel": "hitakashi",
        "timestamp": 1449981912,
        "name": "Username",
        "action": "banip"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> banned <user>Username</user>",
        "timestamp": 1449981912,
        "channel": "CHANNEL"
      }
    }
  ]
}

To IP Ban a user you must be a channel admin and send a banUser message with a special flag. If successful the chat server will send a infoMsg, userList and a banList.

Be careful with IP-Bans as a single IP can be dealt to pool of users. (e.g. Universities, Offices, …)

UnBan

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "unbanUser",
      "params": {
        "channel": "CHANNEL",
        "name": "Name of user to un-ban",
        "token": "Token of moderator"
      }
    }
  ]
}

Broadcasted infoMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "Username has been unbanned.",
        "lang": "view.chat.text.has_been_unbanned",
        "variables": {
          "user": "Username"
        },
        "channel": "CHANNEL",
        "timestamp": 1449979963,
        "name": "Username",
        "action": "unban"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelMod</user> ubanned <user>Username</user>",
        "timestamp": 1449979963,
        "channel": "Username"
      }
    }
  ]
}

If successful the chat server will send a infoMsg, userList and banList to all users.

Add Moderator

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "makeMod",
      "params": {
        "channel": "CHANNEL",
        "name": "Name of user to mod",
        "token": "Token of broadcaster"
      }
    }
  ]
}

infoMsg sent to user who added the moderator.

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "You have added Username as a moderator",
        "lang": "view.chat.text.you_have_added_moderator",
        "variables": {
          "user": "Username"
        },
        "channel": "CHANNEL",
        "timestamp": 1449980721,
        "action": "isAdmin"
      }
    }
  ]
}

infoMsg sent to user that was given moderator powers

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "You are now moderator in channel CHANNEL",
        "lang": "view.chat.text.you_are_now_moderator",
        "variables": {
          "channel": "CHANNEL"
        },
        "channel": "CHANNEL",
        "timestamp": 1449985771,
        "action": "isAdmin"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>Broadcaster</user> made <user>Username</user> moderator",
        "timestamp": 1449980721,
        "channel": "CHANNEL"
      }
    }
  ]
}

To grant a user moderator permission you must be the channel owner.
If successful the chat server will send a infoMsg to both the user adding the moderator and the user being granted moderator.
It will also broadcast a userList.

Remove Moderator

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "removeMod",
      "params": {
        "channel": "CHANNEL",
        "name": "Name of user to unmod",
        "token": "Token of broadcaster"
      }
    }
  ]
}

infoMsg sent to user who is removing moderator.

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "You have removed Username as a moderator",
        "lang": "view.chat.text.you_removed_moderator",
        "variables": {
          "user": "Username"
        },
        "channel": "CHANNEL",
        "timestamp": 1449983693,
        "action": "isAdmin"
      }
    }
  ]
}

infoMsg sent to user who lost moderator powers.

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "You are no longer moderator in channel CHANNEL",
        "lang": "view.chat.text.no_longer_moderator",
        "variables": {
          "user": "CHANNEL"
        },
        "channel": "CHANNEL",
        "timestamp": 1449986014,
        "action": "removeMod"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> removed <user>Username</user> as moderator",
        "timestamp": 1449983693,
        "channel": "CHANNEL"
      }
    }
  ]
}

To revoke a users moderator permission you must be the channel owner.
If successful the chat server will send a infoMsg to both the user removing the moderator and the user being revoked moderator.
It will also broadcast a userList.

Slow Mode

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "slowMode",
      "params": {
        "channel": "CHANNEL",
        "time": "10"
      }
    }
  ]
}

Broadcasted infoMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "slowMsg",
      "params": {
        "text": "Slow mode set to 10 seconds",
        "channel": "CHANNEL",
        "timestamp": 1449984314,
        "action": "isAdmin",
        "slowTime": 10
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelMod</user> set slow mode to 10 seconds",
        "timestamp": 1449984314,
        "channel": "CHANNEL"
      }
    }
  ]
}

You can set slow mode to restrict users to sending only one message every specified second.
Channel moderators and higher are exempt from slow mode.
If successful the chat server will send a slowMsg to all users.

To disable slow mode just send time as 0.

Subscriber Only Mode

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "slowMode",
      "params": {
        "channel": "CHANNEL",
        "subscriber": true,
        "rate": 0
      }
    }
  ]
}

Broadcasted slowMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "slowMsg",
      "params": {
        "text": "Subscriber only mode enabled",
        "channel": "CHANNEL",
        "timestamp": 1449984848,
        "action": "isAdmin",
        "slowTime": null
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> enabled subscriber only mode",
        "timestamp": 1449984848,
        "channel": "CHANNEL"
      }
    }
  ]
}

You can set subscriber only mode to restrict chatting to only channel subscribers. Channel moderators and higher are exempt from subscriber only mode.
If successful the chat server will send a slowMsg to all users.
rate should always be sent as 0. It doesn’t have a use currently.

To disable sub only mode just set subscriber to false.

Messages

Send Message

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatMsg",
      "params": {
        "channel": "CHANNEL",
        "name": "USERNAME",
        "nameColor": "Full hexcode for color without #",
        "text": "Text of your message"
      }
    }
  ]
}

Example Broadcast

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatMsg",
      "params": {
        "channel": "CHANNEL",
        "name": "USERNAME",
        "nameColor": "HEXCODE",
        "text": "Text of your message",
        "time": 1449986713,
        "role": "role in chat",
        "isFollower": true/false,
        "isSubscriber": true/false,
        "isOwner": true/false,
        "isStaff": true/false,
        "isCommunity": true/false,
        "media": true/false,
        "image": "Path to channel owner/subscriber image",
        "buffer": true/false,
        "buffersent": true/false
      }
    }
  ]
}

Send a message to the joined channel. The text value is limited to 300 characters.

If accepted the chat server will send it to all users in the channel, including yourself.
If rejected by the chat server due to slow or subscriber only mode, you will get back an infoMsg.

Direct Messages

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "directMsg",
      "params": {
        "channel": "CHANNEL",
        "from": "USERNAME",
        "to": "RECIPENT",
        "nameColor": "Full hexcode for color without #",
        "text": "This is a direct message."
      }
    }
  ]
}

Example Message to Recipient

5:::{
  "name": "message",
  "args": [
    {
      "method": "directMsg",
      "params": {
        "from": "SENDER",
        "nameColor": "HEXCOLOR",
        "text": "This is a direct message.",
        "time": 1426785188,
        "isStaff": false,
        "isCommunity": false,
        "channel": "CHANNEL SENT FROM",
        "type": "info"
      }
    }
  ]
}

Direct Messages was successfully sent

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "Direct message to Username sent.",
        "lang": "view.chat.text.direct_message_to",
        "variables": {
          "user": "Username"
        },
        "channel": "CHANNEL",
        "timestamp": 1449986822,
        "action": "directmsg"
      }
    }
  ]
}

User has direct messages disabled

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "User has disabled direct messages.",
        "lang": "view.chat.text.disabled_direct_messages",
        "channel": "CHANNEL",
        "timestamp": 1449986612,
        "action": ""
      }
    }
  ]
}

Send a direct message to another hitbox user.
Direct Messages are sent to a user no matter what channel they are in. Depending on the settings the user has for direct messages, you will get infoMsg that it was sent or rejected.

System Messages

Example Message

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "Text of your message",
        "channel": "CHANNEL",
        "timestamp": 1449986713,
        "name": "USER ACTED UPON",
        "action": "Optional, Example ban, kickUser, isAdmin"
      }
    }
  ]
}

Example ‘New Subscriber’ Message

5:::{
  "name": "message",
  "args": [
    {
      "method": "infoMsg",
      "params": {
        "text": "Test-Account just subscribed to this channel",
        "channel": "CHANNEL",
        "subscriber": "Test-Account",
        "type": "subChannel",
        "time": 1449986713
      }
    }
  ]
}

Example Stream Source Message
This is sent when streams details are updated

5:::{
  "name": "message",
  "args": [
    {
      "method": "serverMsg",
      "params": {
        "channel": "masta",
        "text": {
          "media": {
            "category_id": "457",
            "category_name": "Team Fortress 2",
            "category_name_short": null,
            "category_seo_key": "team-fortress-2",
            "category_viewers": "4",
            "category_media_count": "2",
            "category_channels": null,
            "category_logo_small": null,
            "category_logo_large": "/static/img/games/cover_team-fortress-2_56018a8742b12.png",
            "category_updated": "2015-11-10 03:25:45",
            "media_status": "Tales of Zestiria.",
            "media_category_id": "457"
          }
        },
        "type": "resourceUpdate",
        "time": 1449986713
      }
    }
  ]
}

Example Host Mode Update
media object contains a Media Live API call.

5:::{
  "name": "message",
  "args": [
    {
      "method": "serverMsg",
      "params": {
        "channel": "masta",
        "text": {
          "media": {}
        },
        "type": "hostModeUpdate",
        "mode": "on",
        "time": 1449986713
      }
    }
  ]
}

Reconnect Message
If you get these, You should reconnect.

5:::{
  "name": "message",
  "args": [
    {
      "method": "serverMsg",
      "params": {
        "text": "reconnect necessary",
        "type": "reconnect",
        "time": 1451773425
      }
    }
  ]
}

The chat server sends these system messages when it needs to inform a user, they range from a user being timed out to a new subscriber.

A infoMsg, unless specified, are sent to all users in a channel. Chat actions are documented with their infoMsgs, if they are sent and including who they are sent to.

A chatLog is only sent to chat admins, these typically include sensitive information that can help the broadcaster or chat bots. The chat server sends a backlog of the previous 100 chatLogs for the channel.

Media Log

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "mediaLog",
      "params": {
        "channel": "CHANNEL",
        "type": "image",
        "name": "USERNAME",
        "token": "SuperSecret"
      }
    }
  ]
}

Example Response

5:::{
  "name": "message",
  "args": [
    {
      "method": "mediaLog",
      "params": {
        "channel": "CHANNEL",
        "type": "image",
        "data": [
          {
            "channel": "CHANNEL",
            "name": "USERNAME",
            "nameColor": "HEXCOLOR",
            "time": 1444420588,
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/B_menziesii_gnangarra_19.jpg/1280px-B_menziesii_gnangarra_19.jpg",
            "size": {
              "x": 1280,
              "y": 960
            },
            "proxyUrl": "http://chatimages.hitbox.tv/beb3f3db9673ee63d8ce4256fb2ba36b"
          }
        ]
      }
    }
  ]
}

Get a list of images posted in a channel.

Sticky Messages

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "motdMsg",
      "params": {
        "channel": "CHANNEL",
        "name": "Username",
        "nameColor": "Full hexcode for color without #",
        "text": "This is the best sticky message!",
        "time": "2015-12-13T07:14:10.054Z"
      }
    }
  ]
}

Example Broadcast

5:::{
  "name": "message",
  "args": [
    {
      "method": "motdMsg",
      "params": {
        "channel": "CHANNEL",
        "name": "Username",
        "nameColor": "Hexcode",
        "text": "This is the best sticky message!",
        "time": 1449990276,
        "image": "/static/img/channel/masta_5643bd3d049d0_small.png"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> set sticky message",
        "timestamp": 1449990276,
        "channel": "CHANNEL",
        "popover": "This is the best sticky message!"
      }
    }
  ]
}

To set a sticky message you must be a chat admin.
Sticky messages are sent when a user joins a channel and when you set one.

To remove a sticky message just send the same motdMsg command with an empty text field. Users will also recieve another motdMsg with empty text.

Poll

Polls are used to allow users to vote for a choice.
All messages to manage a poll are restricted to channel admins.

Start Poll

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "createPoll",
      "params": {
        "channel": "CHANNEL",
        "question": "Question to poll",
        "choices": [
          {
            "text": "Choice One",
            "votes": 0
          },
          {
            "text": "Choice Two",
            "votes": 0
          }
        ],
        "subscriberOnly": true/false,
        "followerOnly": true/false,
        "start_time": "2015-12-13T07:18:45.533Z",
        "nameColor": "Full hexcode for color without #"
      }
    }
  ]
}

Broadcasted pollMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "pollMsg",
      "params": {
        "channel": "hitakashi",
        "question": "Question to poll",
        "choices": [
          {
            "text": "Choice One",
            "votes": "0"
          },
          {
            "text": "Choice Two",
            "votes": "0"
          }
        ],
        "start_time": "2015-12-13T07:18:45.533Z",
        "clientID": null,
        "status": "started",
        "nameColor": "D35635",
        "subscriberOnly": true/false,
        "followerOnly": true/false,
        "votes": 0,
        "voters": []
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> created poll",
        "timestamp": 1449991125,
        "channel": "CHANNEL"
      }
    }
  ]
}

You can decide if it’s open to followers or subscribers by toggling the booleans.
The subscriber flags overrides the followers flag.
The poll will now be started and the server will broadcast a pollMsg to all users.

Poll Info

Example Response

5:::{
  "name": "message",
  "args": [
    {
      "method": "pollMsg",
      "params": {
        "channel": "CHANNEL",
        "question": "Question for poll",
        "choices": [
          {
            "text": "Choice One",
            "votes": "1"
          },
          {
            "text": "Choice Two",
            "votes": "0"
          }
        ],
        "start_time": "2015-12-13T07:18:45.533Z",
        "clientID": null,
        "status": "started",
        "nameColor": "D35635",
        "subscriberOnly": true/false,
        "followerOnly": true/false,
        "votes": 1,
        "voters": [
          "Username"
        ]
      }
    }
  ]
}

Poll Info is broadcasted on any change to a poll including when users vote. The voters array is only send back to the same user. It never contains a list of users who voted.

Poll Vote

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "voteMsg",
      "params": {
        "name": "USERNAME",
        "channel": "CHANNEL",
        "choice": "Vote Choice Integer. Starts at 0 for choice 1",
        "token": "USERS_AUTH_TOKEN"
      }
    }
  ]
}

Any user (provided it isn’t restricted followers or subscribers) can send a voteMsg to vote on a choice. If everything is correct the chat server will send a pollMsg to all users.

Pause/Restart Poll

Example Pause Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "pausePoll",
      "params": {
        "channel": "CHANNEL",
        "token": "USERS_AUTH_TOKEN"
      }
    }
  ]
}

Pause Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> paused poll",
        "timestamp": 1449996644,
        "channel": "CHANNEL"
      }
    }
  ]
}

Example Restart Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "startPoll",
      "params": {
        "channel": "CHANNEL",
        "token": "USERS_AUTH_TOKEN"
      }
    }
  ]
}

Restart Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> started poll",
        "timestamp": 1449996645,
        "channel": "CHANNEL"
      }
    }
  ]
}

To pause a poll you should send the following message.

If the pause request is successful the chat server will send a pollMsg with status set to paused.
This is the last time to get poll results unless the poll is restarted.

If the restart request is successful the chat server will send a pollMsg with status set to started.

End Poll

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "endPoll",
      "params": {
        "channel": "CHANNEL",
        "token": "USERS_AUTH_TOKEN"
      }
    }
  ]
}

Example Broadcast

5:::{
  "name": "message",
  "args": [
    {
      "method": "pollMsg",
      "params": {
        "channel": "CHANNEL",
        "status": "ended"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> ended poll",
        "timestamp": 1449996646,
        "channel": "CHANNEL"
      }
    }
  ]
}

Once you end a poll, it cannot be restarted. You will need to create a new one.

Giveaway

Unless otherwise noted, the following commands are limited to channel admins.
A giveaway is similar to a poll but you are able to pick a winner.

Create Giveaway

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "createRaffle",
      "params": {
        "channel": "CHANNEL",
        "question": "Giveaway Question",
        "prize": "Prize to win",
        "choices": [
          {
            "text": "Choice One",
            "votes": 0
          },
          {
            "text": "Choice Two",
            "votes": 0
          }
        ],
        "subscriberOnly": true/false,
        "followerOnly": true/false,
        "start_time": "2015-12-13T08:26:59.430Z",
        "nameColor": "Full hexcode for color without #"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> created giveaway",
        "timestamp": 1449995219,
        "channel": "CHANNEL"
      }
    }
  ]
}

You can decide if it’s open to followers or subscribers by toggling the booleans. The subscriber flags overrides the followers flag.
If successful the chat server will send a raffleMsg to all users.

Giveaway Info

Admin raffleMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "raffleMsg",
      "params": {
        "channel": "hitakashi",
        "question": "Giveaway Question",
        "prize": "Prize to win",
        "choices": [
          {
            "text": "Choice One",
            "count": 0
          },
          {
            "text": "Choice Two",
            "count": 0
          }
        ],
        "start_time": "2015-12-13T08:26:59.430Z",
        "status": "started",
        "forAdmin": true,
        "nameColor": "D35635",
        "subscriberOnly": false,
        "followerOnly": false
      }
    }
  ]
}

Moderator and Lower raffleMsg

5:::{
  "name": "message",
  "args": [
    {
      "method": "raffleMsg",
      "params": {
        "channel": "hitakashi",
        "question": "Giveaway Question",
        "prize": "Prize to win",
        "choices": [
          {
            "text": "Choice One"
          },
          {
            "text": "Choice Two"
          }
        ],
        "start_time": "2015-12-13T08:26:59.430Z",
        "status": "started",
        "forAdmin": false,
        "nameColor": "D35635",
        "subscriberOnly": false,
        "followerOnly": false
      }
    }
  ]
}

Giveaway Info is sent on any change to a giveaway including when a user enters.
The count values are only send to channel admins.

Pause Giveaway

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "pauseRaffle",
      "params": {
        "channel": "CHANNEL"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> paused giveaway",
        "timestamp": 1449995424,
        "channel": "CHANNEL"
      }
    }
  ]
}

If successful the chat server will send a raffleMsg to all users with status set to paused.

End Giveaway

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "endRaffle",
      "params": {
        "channel": "CHANNEL"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> ended giveaway",
        "timestamp": 1449995898,
        "channel": "CHANNEL"
      }
    }
  ]
}

If successful the chat server will send a raffleMsg to all users with status set to ended.
The giveaway must be in this state to pick a winner.

Resume Giveaway

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "startRaffle",
      "params": {
        "channel": "CHANNEL"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> started giveaway",
        "timestamp": 1449995579,
        "channel": "CHANNEL"
      }
    }
  ]
}

You can also resume a giveaway if it’s still in a paused state. If successful the chat server will send a raffleMsg to all users with status set to started.

Vote Giveaway

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "voteRaffle",
      "params": {
        "name": "USERNAME",
        "channel": "CHANNEL",
        "choice": "Number of answer, starts at 0"
      }
    }
  ]
}

If successful the chat server will send a raffleMsg to all users.

Pick Winner

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "winnerRaffle",
      "params": {
        "channel": "CHANNEL",
        "answer": "Number of answer, starts at 0"
      }
    }
  ]
}

Example Broadcast

5:::{
  "name": "message",
  "args": [
    {
      "method": "winnerRaffle",
      "params": {
        "channel": "CHANNEL",
        "winner_name": "Test-Account",
        "winner_email": "example@example.com",
        "winner_picked": true,
        "forAdmin": true,
        "answer": "Number of answer, starts at 0"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> picked giveaway winner masta",
        "timestamp": 1449995898,
        "channel": "CHANNEL"
      }
    }
  ]
}

To pick a winner the poll must be in the ended state. If successful the chat server will send two winnerRaffle.
The first winnerRaffle is sent to all users without a winner_email value.
The second winnerRaffle is only sent to channel admins.

Hide Giveaway

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "hideRaffle",
      "params": {
        "channel": "CHANNEL"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> hid giveaway",
        "timestamp": 1449996118,
        "channel": "CHANNEL"
      }
    }
  ]
}

Hiding a giveaway only hides it in the UI. The server still sends raffleMsgs on join. If successful the chat server will send a raffleMsg to all users with status set to hidden.

Cleanup Giveaway

Example Request

5:::{
  "name": "message",
  "args": [
    {
      "method": "cleanupRaffle",
      "params": {
        "channel": "CHANNEL"
      }
    }
  ]
}

Example Broadcast

5:::{
  "name": "message",
  "args": [
    {
      "method": "raffleMsg",
      "params": {
        "status": "delete"
      }
    }
  ]
}

Chat Log

5:::{
  "name": "message",
  "args": [
    {
      "method": "chatLog",
      "params": {
        "text": "<user>ChannelAdmin</user> deleted giveaway",
        "timestamp": 1449996193,
        "channel": "CHANNEL"
      }
    }
  ]
}

This completely ends a giveaway.

Emoji

Get Emojis

Example Request

curl -X GET https://api.hitbox.tv/chat/emotes/masta

Example Response

[
  {
    "icon_id": "12",
    "icon_name": "straightface",
    "icon_short": ":|",
    "icon_short_alt": "straightface",
    "icon_path": "/static/img/chat/default/straight1.png",
    "category_id": "1",
    "category_name": "defaultfaces",
    "category_logo": "/static/img/chat/default/smile4.png",
    "channel": null
  },
  {
    "icon_id": "21745",
    "icon_name": "hitatestSuperSecret",
    "icon_short": "hitatestSuperSecret",
    "icon_short_alt": "hitatestSuperSecret",
    "icon_path": "/static/img/chat/hitakashi-test/emotes/emoji_568589a8ec9f6.png",
    "category_id": "500",
    "category_name": "Hitakashi-Test",
    "category_logo": "",
    "icon_premium_only": "1",
    "channel": "Hitakashi-Test"
  },
  ...
]

GET /chat/emotes/:user
Returns detailed emoji objects for :user

Query String Description
authToken Users Authentication Token
premiumOnly Boolean; Return all subscription emotes for the user.

Get Emojis Short

Example Request

curl -X GET https://api.hitbox.tv/chat/icons/masta

Example Response

{
"icons": {
    ":)": [
      "/static/img/chat/default/smile1.png",
      ":smile:",
      ":smile:"
    ],
    ...
  },
  "items": [
    {
      "icon_path": "/static/img/chat/default/smile1.png",
      "icon_short": ":)",
      "icon_short_alt": ":smile:"
    },
    ...
  ]
}

GET /chat/icons/:user
Returns short emoji objects for :user.
Only containing the name, path, shortcut and alternate shortcut.

Query String Description
premiumOnly Boolean; Return all subscription emotes for the :user channel.

Create Emoji

Example POST Payload

URL: https://api.hitbox.tv/chat/icons/masta
Create:
{
  "media_id": "masta",
  "icon_name": "testEmote",
  "icon_path": "/static/img/chat/test-account/emotes/emoji_55f126c635c22.png",
  "authToken": "SuperSecret",
  "icon_premium": 1
}
Delete:
{
  "media_id": "masta",
  "icon_id": "14068",
  "authToken": "SuperSecret",
  "action": "delete"
}

Example Response

{
  "success": true,
  "error": false,
  "message": "success"
}

POST /chat/icons/:channel
Add Emoji to channel.

You’ll need to upload your emoji to the Emoji Upload API, and use the response for icon_path.

Get Single Emoji

Example Request

curl -X GET https://api.hitbox.tv/chat/icon/:testemote:

Example Response

{
  "icon": {
    "icon_id": "2320",
    "icon_name": "testemote",
    "icon_short": "testemote",
    "icon_short_alt": "testemote",
    "icon_path": "/static/img/chat/masta/emotes/emoji_63845762927a927.png",
    "icon_date_added": "2015-03-08 01:13:07",
    "icon_premium_only": "1",
    "icon_enabled": "1",
    "icon_comment": ""
  }
}

GET /chat/icon/:icon_name

Moderators

Get Moderators

Example Request

curl -X GET https://api.hitbox.tv/chat/moderators/masta?authToken=SuperSecret

Example Response

{
  "request": {
    "this": "/chat/moderators/masta"
  },
  "moderators": [
    {
      "user_id": "301285",
      "user_name": "OneSavvySiren",
      "user_logo": "/static/img/channel/OneSavvySiren_547d4d85b111a_large.jpg"
    }
  ]
}

GET /chat/moderators/:channel
Returns a list of moderator objects for :channel

Query String Description
authToken Users Authentication Token

Add/Remove Moderators

Example POST Request

URL: https://api.hitbox.tv/chat/moderators/masta
{
  "user_name": "Masta",
  "authToken": "SuperSecret",
  "moderator": "Tijl",
  "remove": false
}

Example Response: Successful Add or Remove

{
  "success": true,
  "error": false,
  "message": "success"
}

Example Response: Invalid Username

{
  "success": false,
  "error": true,
  "error_msg": "moderator_not_found"
}

Example Response: Cannot Add User (Staff/Ambassadors cannot be added)

{
  "success": false,
  "error": true,
  "error_msg": "error_adding_moderator"
}

POST /chat/moderators/:channel
Add or Remove Moderators. If authToken is authorized for moderator you can self-remove yourself from user_name.

Query String Description
authToken Users Authentication Token

Get Moderations

Example Request

curl -X GET https://api.hitbox.tv/chat/moderations/masta?authToken=SuperSecret

Example Response

{
  "request": {
    "this": "/chat/moderations/masta"
  },
  "moderations": [
    {
      "user_id": "1",
      "user_name": "seriousownsya",
      "user_logo": "/static/img/channel/seriousownsya_5394934904055_large.jpg"
    }
  ]
}

GET /chat/moderations/:user
Returns a list of moderations objects for :user

Query String Description
authToken Users Authentication Token

Chat Settings

Get Settings

Example Request

curl -X GET https://api.hitbox.tv/chat/settings/masta?authToken=SuperSecret

Example Response

{
  "user_id": "1",
  "sub_images": true,
  "whisper": true,
  "ignore_list": []
}

GET /chat/settings/:channel
Returns chat settings for :channel

Query String Description
authToken Users Authentication Token

Update Settings

Example POST Payload

URL: https://api.hitbox.tv/chat/settings/masta?authToken=SuperSecret
{
  "user_id": "1",
  "sub_images": true,
  "whisper": true
}

Example Responses
Successful

{
  "success": true,
  "error": false,
  "message": "success"
}

Invalid Information

{
  "success": false,
  "error": true,
  "error_msg": "no_change"
}

Invalid Token

{
  "success": false,
  "error": true,
  "error_msg": "unauthorized"
}

POST /chat/settings/:channel
Update chat settings for :channel

Query String Description
authToken Users Authentication Token

Get Word Blacklist

Example Request

curl -X GET https://api.hitbox.tv/chat/blacklist/masta

Example Response

[
  "example.com", "bad words", "more bad words", ...
]

GET /chat/blacklist/:channel
Returns the word blacklist for :channel’s chat

Update Word Blacklist

Example POST Payload

URL: https://api.hitbox.tv/chat/blacklist/masta?authToken=SuperSecret
{
  "blacklist": [
    "example.com", "bad words", "more bad words"
  ]
}

Example Response

{
  "success": true,
  "error": false
}

POST /chat/blacklist/:channel
Updates the word blacklist for :channel’s chat

Query String Description
authToken Users Authentication Token

Update Whisper Setting

Example Request

curl -X GET https://api.hitbox.tv/chat/pm/1?authToken=SuperSecret

Example Response

{
  "success": true,
  "error": false,
  "message": "success"
}

GET /chat/pm/:value Update Whisper Setting :value: 1 = Allow PMs, 0 = Disallow PMs.

Query String Description
authToken Users Authentication Token

Upload

The following POST APIs are all multipart/form-data HTTP media types.

Update User Avatar

Example POST Payload

POST https://api.hitbox.tv/upload/account/masta/SuperSecret HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWzZ27YwM7k7vY2rK

----WebKitFormBoundaryWzZ27YwM7k7vY2rK
Content-Disposition: form-data; name="file"; filename="image.png"
Content-Type: image/png

PNG DATA
----WebKitFormBoundaryWzZ27YwM7k7vY2rK

Example Response

{
  "success": true,
  "error": false,
  "message": "file_uploaded"
}

POST /upload/account/:user/:auth
Uploads and Updates users avatar.

Update Channel Banner

Example POST Payload

POST https://api.hitbox.tv/upload/account/masta/SuperSecret HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWzZ27YwM7k7vY2rK

----WebKitFormBoundaryWzZ27YwM7k7vY2rK
Content-Disposition: form-data; name="cover"; filename="image.png"
Content-Type: image/png

PNG DATA
----WebKitFormBoundaryWzZ27YwM7k7vY2rK

Example Response

{
  "cover": "/static/img/channel/cover_56413ff0acd3d.png"
}

POST /upload/account/:channel/:auth
Uploads and Updates channel cover.

Get Description Images

Example Request

curl -X GET https://api.hitbox.tv/upload/description/masta/SuperSecret

Example Response

[
  {
    "image_id": "123",
    "image_path": "/static/img/channel/test-account-profile-image-054b2d1096530c0b-300x300-png_54b7309baa686.png",
    "image_date_added": "2015-01-14 23:49:45"
  },
  ...
]

GET /upload/description/:channel/:auth
Gets description images.

Upload Description Image

Example POST Payload

POST https://api.hitbox.tv/upload/description/masta/SuperSecret HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWzZ27YwM7k7vY2rK

----WebKitFormBoundaryWzZ27YwM7k7vY2rK
Content-Disposition: form-data; name="file"; filename="image.png"
Content-Type: image/png

PNG DATA
----WebKitFormBoundaryWzZ27YwM7k7vY2rK

POST /upload/description/:channel/:auth
Uploads Description Images.

Removes Description Image

Example DELETE Request

curl -X "DELETE" https://api.hitbox.tv/upload/description/masta/SuperSecret?image_id=1

Example Response

{
  "success": true,
  "error": false,
  "message": "success"
}

DELETE /upload/description/masta/SuperSecret
Removes uploaded description image.

Query String Description
image_id ID of image

Uploads Team Logo or Cover

Example POST Payload

Team Logo

POST https://api.hitbox.tv/upload/team/masta/SuperSecret HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWzZ27YwM7k7vY2rK

----WebKitFormBoundaryWzZ27YwM7k7vY2rK
Content-Disposition: form-data; name="file"; filename="image.png"
Content-Type: image/png

PNG DATA
----WebKitFormBoundaryWzZ27YwM7k7vY2rK

Team Cover

POST https://api.hitbox.tv/upload/team/masta/SuperSecret HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWzZ27YwM7k7vY2rK

----WebKitFormBoundaryWzZ27YwM7k7vY2rK
Content-Disposition: form-data; name="cover"; filename="image.png"
Content-Type: image/png

PNG DATA
----WebKitFormBoundaryWzZ27YwM7k7vY2rK

Example Response
Team Logo

{
  "logo": {
    "small": "/static/img/teams/logo_54dfce333ee3_small.png",
    "large": "/static/img/teams/logo_54dfce333ee3_large.png"
  },
  "cover": null
}

Team Cover

{
  "logo": null,
  "cover": {
    "cover": "/static/img/teams/cover_54dfd4873d3cc.png"
  }
}

POST /upload/team/masta/SuperSecret
Uploads team logo or cover

Upload Emoji Image

Example POST Payload

POST https://api.hitbox.tv/upload/emoji/masta/SuperSecret HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWzZ27YwM7k7vY2rK

----WebKitFormBoundaryWzZ27YwM7k7vY2rK
Content-Disposition: form-data; name="file"; filename="image.png"
Content-Type: image/png

PNG DATA
----WebKitFormBoundaryWzZ27YwM7k7vY2rK

Example Response

{
  "emoji": {
    "file": "/static/img/chat/masta/emotes/emoji_55f126c635c22.png"
  }
}

POST /upload/emoji/:user/:auth
Uploads Emoji for user.

Credits

Special thanks to Hitakashi htbx, gh, tw for creating and maintaining this documentation.