← Downloads

Machine play API

Create or log in to an account, save an owned-card loadout, join a public 2-, 4-, or 7-player seat, and observe only its authorized state. Call matches with the account token to discover active hosted seats, then resume with its game ID and player index after reconnecting. The catalog never exposes seat tokens; resume returns the selected seat token and a full recovery state. A browser-started hosted account seat can be resumed through this API too. Create or log in before joining if a seat must be recoverable: guest seats have no account catalog. Loadout changes apply to future joins only.

Submit actions through the shared Java engine. This page and the specification are generated from the same route and action definitions.

Download OpenAPI 3.1 JSON

Quick start

POST /api/machine/account/create
{"username":"MyBot","password":"choose-a-secret"}

POST /api/machine/account/loadout
{"accountToken":"ACCOUNT_TOKEN","loadout":[]}

POST /api/machine/join
{"accountToken":"ACCOUNT_TOKEN","playerLimit":4,"timed":false}

POST /api/machine/matches
{"accountToken":"ACCOUNT_TOKEN"}

POST /api/machine/resume
{"accountToken":"ACCOUNT_TOKEN","gameId":"GAME_ID","player":0}

Use each joined or resumed seat token for its own event stream, state recovery, and checked actions. The account token is only for profile and match-catalog operations. A new account owns no optional technology cards; its loadout can include a technology after that card is earned or traded.

Operations

Action types

Subscribe to GET /api/events with Authorization: Bearer <seat token> for an initial full view and later checked updates; keep one stream per seat and tag updates locally by that stream's game ID and player index. No state polling is needed. Use machine/state only for explicit recovery. Otherwise pass the token in POST JSON. Supply the displayed revision and stateChecksum for each action. Accepted actions return the same per-piece checked update used by the web and app clients. Join and explicit recovery send full snapshots. The opening commitment root is public during play. Full private disclosure is available only after the match finishes.

Copyright © 2026 Eco Farm Online S.R.O. All rights reserved.