Info
- The app's Terms of Service and Privacy policy for its players, and their answers, under
/api/v2/legal
- Works for every app, it isn't an optional service. Not rate limited
- Legal Managers publish the texts as numbered versions on the app's Legal page
- Unity side: Legal in Unity Core
What's pending
GET /legal with a player's token and every POST /legal/answers answer pending: terms_version (the terms to accept) and privacy_version (the privacy policy to show), each null when nothing is asked
- The pending version is the newest published one
- Version 1 is always asked or shown. Later versions only when published with Ask everyone to accept it again or Show it to everyone; until then an answer to an earlier version still counts
- Terms are asked only with Ask to accept on in the app's Legal setup (
ask_to_accept). The privacy policy is shown, not accepted
- Nothing blocks sign-in, the app decides what to do
Calls
GET /api/v2/legal - the current texts and what the player still has to answer
- Before sign-in
X-App-Key alone gets the texts and ask_to_accept, with pending: null. So do server tokens
- With a player's token also
pending. A token the hub turns down answers 401 with what to do in code (e.g. token_expired), not the texts alone
terms and privacy: version, published_at, url (the public page /apps/<key>/terms or /privacy, or the other site's address) and markdown (null when the text lives on another site). null for a text never published
Accept-Language picks a translation when there is one, else English
- Sends an
ETag; with If-None-Match an unchanged answer is a bodiless 304. pending is part of it
POST /api/v2/legal/answers - terms_version (accepted), privacy_version (shown), optional language, e.g. en. Player token only: a server token gets 403 player_token_required, no token 401. Answers what's still pending
language left out: the first language of Accept-Language, else en
- Neither version:
400 invalid_request with errors on both fields. A version that doesn't exist: 404 legal_not_found, and nothing is recorded
- Accepting the app's terms also records the hub's Terms of Service and Privacy Policy versions the person hasn't answered yet, since the app's terms bring them in
- Answers are kept as proof with the time, the language and the device name of the session. They are only added, never changed
Example
GET /api/v2/legal
Authorization: Bearer …
Accept-Language: cs-CZ,en;q=0.8
→ 200, ETag: "c687ca03f21ff441"
{ "terms": { "version": 2, "published_at": "2026-11-18T08:02:10Z",
"url": "https://polis.lics.cz/apps/deep-dive-vr/terms", "markdown": "# Terms of Service …" },
"privacy": { "version": 1, "published_at": "2026-11-18T08:02:03Z",
"url": "https://example.org/privacy", "markdown": null },
"ask_to_accept": true,
"pending": { "terms_version": 2, "privacy_version": null } }
POST /api/v2/legal/answers
Authorization: Bearer …
{ "terms_version": 2, "language": "en" }
→ 200
{ "terms_version": null, "privacy_version": null }
Gotchas
- Send the versions the player saw, the hub records exactly those
- Sign-in answers and
GET /me carry nothing legal: ask GET /api/v2/legal after sign-in, see Auth API
- Accounts made on the website have the hub's terms recorded at sign-up. Accounts made in apps or as guests get them with the first app terms they accept