Found a Town
Your first town is created directly through this endpoint — every player starts with exactly one. In realms that allow more than one town per player (max_towns_per_player greater than 1), every town after the first is founded by dispatching an army from an existing town instead; this endpoint always rejects a second call for the same player.
Founding a town requires a realm token — the acting player is identified by the token, there is no separate player header. Town names must be unique within the season.
Endpoint
POST /api/v1/towns/
import httpx
response = httpx.post( "http://localhost:8731/api/v1/towns/", headers={"Authorization": "Bearer your-token-here"}, json={"name": "My Town"},)print(response.json())curl -X POST http://localhost:8731/api/v1/towns/ \ -H "Authorization: Bearer your-token-here" \ -H "Content-Type: application/json" \ -d '{"name": "My Town"}'const response = await fetch("http://localhost:8731/api/v1/towns/", { method: "POST", headers: { Authorization: "Bearer your-token-here", "Content-Type": "application/json", }, body: JSON.stringify({ name: "My Town" }),});const data = await response.json();Response
Returns 201 Created with the new town:
{ "id": "uuid", "name": "My Town", "resources": { "wood": 500, "stone": 200, "food": 100 }, "units": {}}New towns start with a set of starter resources defined by the realm configuration. The units field shows the town’s garrison — units stationed here that will automatically defend against attacks.
After founding your town, place it on the season map to start interacting with other players.
Errors
- 400 — you already have a town (
One player can have only one town.). - 400 — a town with this name already exists in the season (
A town with this name already exists.). - 403 — the season is no longer active.
Requests sent at the same moment get the same answers. If you send several at once (two tabs, a client that retries), exactly one town is founded and every other request gets the first 400. If another player founds a town with the same name at the same moment, one of you gets the name and the other gets the second 400.
If you delete your town (DELETE /api/v1/towns/{town_id}), you can found a new one afterwards.
Founding Additional Towns
Realms that set max_towns_per_player above 1 let you found more towns after your first, by dispatching an expedition from a town you already own toward an empty map tile.
What founding a city requires
Four things, all published by the API so you never have to discover them from a rejected request:
| Requirement | Where the number lives | On the free realm |
|---|---|---|
| A free city slot from your title | max_towns on game state | the realm base, raised by your rank |
| Workers in the marching party | founding_required_workers + founding_worker_unit_type_id on game state | 250 Workers |
| Resources in the origin town | founding_cost on game state | 10,000 of every resource — food, wood, stone, iron and gold |
| An empty, settleable target tile | min_town_distance on the realm | any unoccupied tile far enough from every town |
The workers are the settlers, and they have to make the journey — a full barracks at home does not count. Any other unit may come along as an escort; no other type is privileged or required. Every unit in the party must be the town’s own: reinforcements an ally has standing in it are not yours to send. The resources are taken from the origin town the moment you dispatch, before the march exists, and refunded (capped by storage) if the expedition bounces.
Colonies are cheaper on both counts: colony_founding_cost and colony_founding_required_workers are the city figures scaled by colony.starter_resources_fraction and rounded down. Both are null in a realm with no colonies configured. See Colonies.
A realm may demand no settlers at all (founding_required_workers: 0, with founding_worker_unit_type_id then null), in which case any non-empty army founds a town.
Founding your second town also completes the expansion quest line’s one quest, “Satellite City” — 55,000 gold plus 5,000 of every other resource, claimed the ordinary way.
Permanent placement — there is no relocation
A town stays where you found it, for the whole season. Restfall has no teleporters, no random relocation, no “move my city next to a barbarian camp”, and no plan to add them. Choosing where to settle is a real decision with real consequences: your neighbours, your alliance’s shape and your marching distances are all part of the game, not an inconvenience to be bought out of.
This is a deliberate divergence from Evony, which sold three cash relocation items — a City Teleporter (a random spot in a chosen state), an Advanced City Teleporter (a specific coordinate, followed by a 24-hour lockout on all marches) and a War Teleporter (next to a barbarian city, on a 12-hour cooldown shared with the advanced one). All three were paid items, which is exactly why they are out: Restfall sells one flat subscription and nothing that changes the board.
If a town’s position has become untenable, the tools are the ones already in the game: found another town elsewhere and develop it, raze a colony you no longer want, or delete a town outright.
max_towns_per_player is the realm’s base cap. Your own cap can be higher:
each rank on the title ladder carries a city cap, and your
effective limit is the higher of the two. The number that actually applies to
you is max_towns on game state — check that, not the
realm’s base value.
In the browser client, click any empty tile on the map and choose Found a town here: name it, choose the settlement kind (City or Colony, each shown with its own live count against its own cap), pick the force to send, and dispatch. Your current counts against both caps are shown in max_towns and max_colonies on game state.
Two caps, counted separately
There are two settlement caps and they never touch each other:
- Cities count against your city cap — the realm’s
max_towns_per_player, raised by your title. Your starting town is one. - Colonies count against
colony.max_colonies_per_player, a flat realm setting no title changes.
A colony never consumes a city slot and a city never consumes a colony slot, so being at one cap says nothing about the other. See Colonies for what a colony is and how it differs.
Endpoint
POST /api/v1/foundings/
import httpx
response = httpx.post( "http://localhost:8731/api/v1/foundings/", headers={"Authorization": "Bearer your-token-here"}, json={ "origin_town_id": "your-town-uuid", "target_x": 22, "target_y": 17, "town_name": "New Haven", "units": {"swordsman": 20}, },)print(response.json())curl -X POST http://localhost:8731/api/v1/foundings/ \ -H "Authorization: Bearer your-token-here" \ -H "Content-Type: application/json" \ -d '{"origin_town_id": "your-town-uuid", "target_x": 22, "target_y": 17, "town_name": "New Haven", "units": {"swordsman": 20}}'const response = await fetch("http://localhost:8731/api/v1/foundings/", { method: "POST", headers: { Authorization: "Bearer your-token-here", "Content-Type": "application/json", }, body: JSON.stringify({ origin_town_id: "your-town-uuid", target_x: 22, target_y: 17, town_name: "New Haven", units: { swordsman: 20 }, }),});const data = await response.json();town_type is an optional field on the request body: "normal" (a city, the
default) or the realm’s colony type, "colony". See
Colonies for what founding one changes.
Returns 201 Created with the new march. The units leave the origin town’s garrison immediately — founding the town itself happens later, when the march arrives.
{ "id": "march-uuid", "origin_town_id": "your-town-uuid", "target_tile_id": "tile-uuid", "town_name": "New Haven", "units": {"swordsman": 20}, "resources_charged": {"wood": 1000, "stone": 1000, "food": 500}, "arrives_at": "2026-03-12T12:10:00Z", "returns_at": null, "resolved_at": null, "units_returned": false, "founded_town_id": null}resources_charged is exactly what the origin town paid to dispatch this expedition — and therefore exactly what it gets back if the march bounces. You never have to re-derive it from founding_cost and the march’s town_type.
Requirements
- The origin town must belong to you and already be placed on the map.
unitsmust name at least one unit, and the origin town’s garrison must have every unit requested.unitsmust include at leastfounding_required_workersoffounding_worker_unit_type_id(orcolony_founding_required_workersfor a colony) — the settlers. A party short of them gets a 400 naming the unit type and both counts, and nothing is dispatched or charged. Everything else in the party is an escort; no other unit type is privileged or required.- The origin town must be able to afford the founding cost (
founding_cost, orcolony_founding_costfor a colony, on game state) — it is charged against the town’s resources the moment you dispatch, before the march exists. A town that can’t afford it gets a 400 naming the resource it’s short on, and nothing is dispatched. - The target tile must exist, be unoccupied, and respect the realm’s
min_town_distancefrom every other town. (This is also what the realm’s “requires a flat” rule currently amounts to — see the note above.)target_xandtarget_yrun from 0 to 2,147,483,647, the largest coordinate a map can store (422outside that); one in that range but off the realm’s map is a404(Target tile not found.). town_namemust not already be used by another town in the season.- Your settlements of the requested kind, plus the expeditions of that kind already in flight from your towns, must be below that kind’s cap. Cities count against your city cap; colonies against
colony.max_colonies_per_player. Expeditions already travelling count too, so you cannot dispatch several at once and overshoot when they all land — including one a captured town’s previous owner sent, which will found its town for you. The400names the cap and nothing counted (Founding another town would exceed your town cap of 3, counting the founding expeditions already on their way.).
Arrival
Travel time follows the standard march formula — Euclidean distance divided by the slowest unit’s speed, with each unit’s speed first adjusted by the origin town’s researched march technologies (Compass, Horseback Riding — see Travel Time). Founding marches never get a Relief Station bonus: the multiplier only applies toward your own or an allied town, and a founding march targets an empty tile.
Arrival is resolved automatically by the background resolver, the same way as attacks and support — never poll for it. When the march arrives, its tile, distance, name, and cap are re-checked against the realm’s current state (another player may have taken the tile or the name, or you may have reached the cap another way since dispatch):
- If every check still passes, the town is founded on the target tile and garrisoned with the whole march — no unit is consumed founding it, the settler workers included. They stay as the new town’s garrison and its starting population is seeded from that garrison (each unit’s population cost, summed), so the workers become the new town’s first workforce. They are yours to march home again whenever you like.
founded_town_idis set. - If any check now fails, nothing is founded — every unit in the march marches back to the origin town and is credited back to its garrison on arrival, the same as a bounced attack, and the resources charged at dispatch (
founding_cost/colony_founding_cost) are refunded to the origin town, capped by its storage.founded_town_idstaysnull.
A town founded this way gets no beginner protection — only your very first town does. It is attackable the moment it exists.
The cap is re-checked on arrival against the current state, because the world moves while a founding expedition travels. A colony expedition additionally re-checks that the realm still has colonies configured. Either way, a blocked expedition turns around and walks its units home — nothing is destroyed.
A colony arrives with a configured fraction of the normal starter pack
(colony.starter_resources_fraction), rounded down. Like every town founded
this way, it gets no beginner protection.
Tracking Your Expeditions
GET /api/v1/foundings/
Lists every founding march you dispatched, newest departure first, paginated like the other listings (limit/offset, with count and results). It is a history rather than a live view: marches still travelling, marches that founded a town, and marches that bounced and walked home all appear. An expedition is stamped with its sender when it leaves, so it stays on your list even if the town it left from is captured meanwhile, and never appears on the captor’s (one sent before this rule existed carries no sender and is listed to whoever owns its origin town now). What the march does follows the town, by the spoils of war rule: one that arrives founds its town for whoever owns the origin town at that moment, and one that bounces walks home to the origin town, refund and all, for its owner then.
{ "count": 1, "limit": 20, "offset": 0, "results": [ { "id": "march-uuid", "origin_town_id": "your-town-uuid", "target_tile_id": "tile-uuid", "town_name": "New Haven", "units": {"swordsman": 20}, "resources_charged": {"wood": 1000, "stone": 1000, "food": 500}, "arrives_at": "2026-03-12T12:10:00Z", "returns_at": null, "resolved_at": null, "units_returned": false, "founded_town_id": null, "departed_at": "2026-03-12T12:00:00Z", "origin": {"x": 14, "y": 22}, "target": {"x": 22, "y": 17} } ]}Read the outcome from three fields: founded_town_id set means the town was founded and points at it; returns_at set with founded_town_id null means the march bounced and the units are walking home; units_returned: true means they have arrived and are back in the origin garrison.
Founding marches in flight also appear in the unified marches list of GET /api/v1/state/ with kind: "founding". Their target_town_id is null — there is no town at the destination yet, which is the whole point — but target still carries the destination coordinates, as it does for every other march kind. A march that has founded its town drops off that list; it has arrived and there is nothing left travelling.