About the APIs
Arbitas has two public HTTP APIs. Their references are generated from the platform’s OpenAPI contracts on every build of this site, so they always match what the APIs serve, and they list only the operations your code may call.
| API | Base URL | Who calls it |
|---|---|---|
| Builder API | https://build.arbitas.dev |
Your own servers, scripts and CI: games, drafts, publishing and promoting, AI imports, playtests, credits, usage |
| Player API | https://play.arbitas.dev |
Players’ clients: sign-in, lobbies and matches, profiles and ratings, notifications, reports |
During a match, clients also use the play WebSocket on the Player API’s host. Each reference’s OpenAPI document can be downloaded for your own tools and code generators: builder.yaml and player.yaml.
Authentication
Section titled “Authentication”Calls carry a bearer token in the Authorization header; a few, such as the public plans or signing in, need none.
- Builder API. Exchange one of your organization’s secret API keys for a token at
POST /v1/auth/key-token. The token lasts 15 minutes; exchange the key again when it runs out. A key’s scope, read or build, decides what its token may call, and each operation in the reference says which it needs. See API keys to make one. - Player API. Sign the player in at
POST /v1/auth/token, as a guest or with an emailed code. The access token lasts 15 minutes and comes with a refresh token. See build your own client.
Errors
Section titled “Errors”Errors are RFC 9457 problem details (application/problem+json). Each has a code, such as validationFailed or
notFound, whose meaning never changes: branch on it, not on the message. Each operation’s responses list the codes it
can return. With validationFailed, errors says which fields were wrong and why.
Slow work, lists and changes
Section titled “Slow work, lists and changes”- Slow work. Publishing answers
202 Acceptedwith an operation; pollGET /v1/operations/{operationId}until itsstatusissucceededorfailed. AI imports and drafts are resources of their own, polled the same way. - Lists. Lists come a page at a time. Pass a page’s
nextCursorascursorto get the next one, within 24 hours;limitsets the page size. - Changes. Some resources, such as a game’s draft, answer with an
ETag. Send it back asIf-Matchwhen you change them: the change is refused with412if someone else changed it first, and with428if the header is missing. - Limits. Too many requests answer
429withRetry-After, the seconds to wait before trying again.
Trying requests
Section titled “Trying requests”The references show each operation’s request in curl, JavaScript, Python, C#, Go and Java, and remember the one you pick. Sending requests from these pages (“Try it”) is off for now; copy a sample and run it with your token instead.