API Versioning and Hub Titles formatting

We currently only provide the basic v0 API versioning, which doesn't allow for much flexibility when we want or need to break existing response formats.

As part of an upcoming feature, we have to modify the hub_title_unlockedresponse format from a String array to an array of objects, so we can provide additional meta data.

To support this without breaking existing implementations, we'll be using a GitHub-style API versioning header: X-Hive-Api-Version. If you don't send this header (or use an unsupported value), you'll only see new fields, but not fields that we've modified since. For the changes to hub_title_unlocked, either set this header to 2024-03-29 or latest. We don't recommend latest for production use cases, as you'll opt in to future changes as well.

We'll start maintaining a list of API versions, and associated changes, on this website in the future.

Starting on March 29th, if you're opted in you'll see hub titles with the special_type set to stat_track, which are dynamic hub titles that change depending on a users statistics. A simple stat_track looks like this:

{
    "display": "(Number) SkyWars Wins",
    "special_type": "stat_track",
    "stat_track": [
        {
            "game": "sky",
            "key": "victories",
            "placeholder": "(Number)"
        }
    ]
}

A complex one looks like:

{
    "display": "(Number) SkyWars Winrate",
    "special_type": "stat_track",
    "stat_track": [
        {
            "game": "sky",
            "keys": [
                "victories",
                "played"
            ],
            "operation": "divide",
            "placeholder": "(Number)"
        }
    ]
}

Operation is: divide, add, or subtract.

These are examples and not real hub titles.

By default, display will show the placeholder where the real number goes. You can opt-in to have the API show the actual hub title by setting the X-Hive-Resolve-Stat-Track header to true. This works both with and without the Version header.


Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to PlayHive API Updates.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.