API Reference


Version Status Description Documentation
v1a Alpha current development version v1a API Reference

General Information


BattlePlace.io API is REST API. Following is a list of base URLs:

API base URL Description
https://api.battleplace.io/ Secure API endpoint, recommended for all uses
http://api.battleplace.io/ Unsecure API endpoint, not recommended, kept for compatibility, may be removed in future


BattlePlace.io APIs are versioned - every API endpoint’s URI path is prefixed with API version, for example /v1a/client/auth. Even-numbered versions (e.g. v2) are stable, which means they are not going to change in a backward-incompatible way and are safe to use in client software. Odd-numbered API versions (e.g. v1a) are not stable, and should be used only during development, as they can change at any moment. They suffixed with an a suffix meaning “alpha” for more clarity.

Data formats

All requests and responses are in JSON format.

The API maintains strict type safety for all arguments. Every value in request must be of the right type, and every value returned in response is always of the right type. The API doesn’t do any type conversions. Some fields are optional and may be either omitted or explicitly set to null in order to indicate missing value.

Note that “string integers”, i.e. decimal integer numbers in a string format, are used in a few places, so there’s no risk of losing precision of 64-bit integers.

Test authentication

Test authentication allows to test your authentication code without using real users on platforms like Steam and itch.io. In order to authenticate as a test user, add “Test” auth method in project settings, and set API key for it to any value. When authenticating, set testKey to this value, and testId to any user number (so you can imitate multiple users).