Create a Player
A player represents your character inside a specific realm. One account can have at most one player per season.
The season field is the id of the realm’s active season — you can find it under active_season in the realms listing (GET /api/v1/realms/).
Creating, listing and deleting players are account-level actions: they need your account token from password login. A realm token or an agent’s OAuth token gets 403 Forbidden and changes nothing, so an agent cannot join, list or abandon realms for you. To let an agent play another realm, authorize it for that realm; that creates the player for you.
Endpoint
POST /api/v1/players/
import httpx
response = httpx.post( "http://localhost:8731/api/v1/players/", headers={"Authorization": "Bearer your-account-token"}, json={"season": "season-uuid"},)print(response.json())curl -X POST http://localhost:8731/api/v1/players/ \ -H "Authorization: Bearer your-account-token" \ -H "Content-Type: application/json" \ -d '{"season": "season-uuid"}'const response = await fetch("http://localhost:8731/api/v1/players/", { method: "POST", headers: { Authorization: "Bearer your-account-token", "Content-Type": "application/json", }, body: JSON.stringify({ season: "season-uuid" }),});const data = await response.json();Response
{ "id": "uuid", "season": "season-uuid", "username": "brave-wandering-otter"}The player username is auto-generated and is independent of your account username.
Creating a player returns 201 Created. You can have at most one player per season — a second attempt returns 400 Bad Request. Only a realm’s active season can be joined: a season that has ended, or that does not exist, returns 403 Forbidden with This season is no longer active., and one that has run its realm’s length (on the realm’s own clock) returns 403 Forbidden with Season has ended, the answer every gameplay request gets there. Neither creates anything. Once you have a player, log in to the realm to get a realm token for gameplay.
List Your Players
GET /api/v1/players/
Lists your player profiles in currently active seasons. Each profile ties your account to one realm season — use the matching realm with POST /api/v1/realms/login/ to get a gameplay token. The response uses the standard pagination envelope (count, limit, offset, results); limit defaults to 50 (max 200) and offset defaults to 0.
import httpx
response = httpx.get( "http://localhost:8731/api/v1/players/", headers={"Authorization": "Bearer your-account-token"},)players = response.json()curl http://localhost:8731/api/v1/players/ \ -H "Authorization: Bearer your-account-token"const response = await fetch("http://localhost:8731/api/v1/players/", { headers: { Authorization: "Bearer your-account-token" },});const players = await response.json();Response
{ "count": 1, "limit": 50, "offset": 0, "results": [ { "id": "uuid", "season": "season-uuid", "username": "brave-wandering-otter" } ]}Players from seasons that have ended are not included.
Your own record in one call
With a realm token, GET /api/v1/players/me/ returns just the profile
that token belongs to — the same shape as one entry above, including the
alliance_* fields — without paging through the account list. It is the
call the web client uses to keep your alliance membership current (see
Your own membership), and it still
answers after the season has ended.
Abandon a Season
DELETE /api/v1/players/{player_id}
Permanently deletes one of your player profiles, abandoning that season. This removes your presence in the realm and cannot be undone.
import httpx
httpx.delete( "http://localhost:8731/api/v1/players/player-uuid", headers={"Authorization": "Bearer your-account-token"},)curl -X DELETE http://localhost:8731/api/v1/players/player-uuid \ -H "Authorization: Bearer your-account-token"await fetch("http://localhost:8731/api/v1/players/player-uuid", { method: "DELETE", headers: { Authorization: "Bearer your-account-token" },});Returns 204 No Content on success, or 404 Not Found if the player doesn’t exist or doesn’t belong to your account. The whole operation is atomic — if anything fails, nothing is deleted.
Returns 409 Conflict if your realm changed in the very instant the deletion ran — a founding expedition of yours landed, one of your cities won a town or a valley, a battle at one of your towns took a hero captive, someone sent you a trade offer, an alliance accepted your application or you founded one from another tab, the town a trade offer to you came from was busy at that moment, the world was resolving a battle your hero was fighting, or a reinforcing party standing in one of your towns was being brought home at that moment. Nothing was deleted; send the same request again and it goes through.
What deletion does
Deleting a player removes your season presence completely, following one policy across every piece of data your player touched:
- Deleted with you (no recovery): heroes, inventory items, quest and achievement progress, your event log, your realm session tokens, and any chat lines you authored (world chat and alliance chat).
- Towns are released, not erased. Every city and colony you own is cleared exactly like a colony that falls to a military attack: ownership is cleared, the garrison/wallet/hospital are emptied, all buildings and their queues are removed, and the map tile is freed for someone else to settle. The town record itself is kept (empty and ownerless) rather than deleted outright, because other players’ battle, scouting, and support history against it must still be able to resolve.
- Direct messages survive for the other participant. If you sent or received a private message and the other player hasn’t deleted their own copy, the message stays in their inbox or sent list — only your side of it is cleared, showing as sent or received from a deleted player.
- Trade offers you made are withdrawn — but a counterparty’s stake never is. Any still-pending offer you created is cancelled and removed. A trade of yours that someone else already accepted (including one still in transit — they paid your asking price the moment they accepted) is kept: the delivery still resolves for them and the trade stays in their history, with your side shown as a deleted player (
offering_player_idbecomesnull). A trade you accepted from someone else is left intact for them — only your side of it is cleared, so their delivery still completes normally. An offer someone else sent to you and you never answered is cancelled for them, exactly as if they had cancelled it: its escrow comes back to their offering town minus the realm’s trade fee, and itsstatusbecomescancelled(it never turns into an open offer anyone could take). - Your ledger history is kept, anonymized. Past resource/upgrade transaction records are retained for accounting purposes with the player reference cleared.
- Battle history survives; in-flight marches resolve for nobody. Battle reports involving you (including ones your heroes led) remain replayable for the other side. An attack you dispatched that is still travelling when you delete still arrives and fights, but since there is no longer anyone to win a town for, a
captureintent falls back to plunder (intent_fallback_reason: "owner_gone"), and any survivors return to your released, ownerless town. The same goes for every other march on the road — none of them can be recalled: scouts still report and come home to the released town; reinforcements you sent standing in another lord’s town are sent home within a few seconds (no host admits a party whose sender is gone — see When the relationship ends) and march back into the released town, where they vanish with it; a founding expedition that arrives after you are gone turns back rather than found a town for nobody; and attacks and scouts other players sent against your towns still arrive and resolve against the empty husk. - Allies’ reinforcements in your towns go home alive. Before a town is released, every party standing in it — an ally’s, or one of yours from another town — leaves with its survivors and marches home one normal journey later, exactly as when you delete a town. Reinforcements still on their way to you find no host to admit them and turn back with everything they brought. Reinforcements standing in a valley you hold are sent home with their troops, as when you abandon the valley. If a party is being brought home by the server at that very instant, the deletion answers
409(retry). - Heroes you held captive go home. Every other player’s hero imprisoned in one of your towns is freed the moment the town is released — it returns idle to its owner’s oldest town, exactly as when a prison town is razed in battle.
Alliance leadership
- If you’re an ordinary member of an alliance, your membership is simply removed.
- If you’re the Host of an alliance with other members still in it, deletion is blocked with
400 Bad Requestuntil you transfer the Host seat or disband the alliance — the same restriction that already applies to leaving your own alliance. - If your Host hands you the Host seat at the same moment you delete, whichever the server handles first goes through. If the transfer goes first, you are the Host now, and the deletion is refused with that
400. If your deletion goes first, the transfer gets a404and the Host keeps the seat. - If you’re the Host and the only member, the alliance is disbanded automatically as part of deleting your player, exactly as leaving it would: its pacts, proposals and wars end with it, and the other alliance’s Host is told of each war that was in effect.