Set up a new Controller
const url = 'https://example.com/api/v1/setup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"setupCode":"example","username":"example","email":"hello@example.com","displayName":"example","password":"example","network":{"name":"example","description":"example","address":"example","port":25565}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/setup \ --header 'Content-Type: application/json' \ --data '{ "setupCode": "example", "username": "example", "email": "hello@example.com", "displayName": "example", "password": "example", "network": { "name": "example", "description": "example", "address": "example", "port": 25565 } }'Creates the first global administrator and the network, and signs in. Only possible while no user exists, and
only with the one-time setup code the Controller wrote to <data-dir>/setup-code (invalid_setup_code). Once
done it answers setup_done. Failed attempts are rate limited.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The host name or IP address players connect to, without a port.
Responses
Section titled “Responses”Set up and signed in.
object
While true, only GET /me, POST /me/password and POST /auth/logout work.
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "username": "example", "email": "example", "displayName": "example", "globalAdmin": true, "passwordChangeRequired": true, "createdAt": "2026-04-15T12:00:00Z"}Headers
Section titled “Headers”The session cookie.
The request is invalid.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Signed in, but not allowed.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Clashes with existing data or state.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Too many attempts; retry later.
An RFC 9457 problem with a machine-readable code.
object
Stable machine-readable error code.
Example
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "conflict"}Headers
Section titled “Headers”Seconds to wait.
Shardkeep is free software under the AGPL-3.0. Minecraft is a trademark of Mojang AB; Shardkeep is not affiliated with or endorsed by Mojang or Microsoft.