Skip to content

Set up a new Controller

POST
/setup
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.

Media typeapplication/json
object
setupCode
required
string
>= 1 characters <= 128 characters
username
required
string
>= 1 characters <= 64 characters
email
required
string format: email
<= 254 characters
displayName
string
<= 128 characters
password
required
string
>= 15 characters <= 256 characters
network
required
object
name
required
string
>= 1 characters <= 64 characters
description
string
<= 500 characters
address

The host name or IP address players connect to, without a port.

string
<= 253 characters
port
integer
default: 25565 >= 1 <= 65535

Set up and signed in.

Media typeapplication/json
object
id
required
string format: uuid
username
required
string
email
required
string
displayName
required
string
globalAdmin
required
boolean
passwordChangeRequired
required

While true, only GET /me, POST /me/password and POST /auth/logout work.

boolean
createdAt
required
string format: date-time
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"username": "example",
"email": "example",
"displayName": "example",
"globalAdmin": true,
"passwordChangeRequired": true,
"createdAt": "2026-04-15T12:00:00Z"
}
Set-Cookie
string

The session cookie.

The request is invalid.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Signed in, but not allowed.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Clashes with existing data or state.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Too many attempts; retry later.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}
Retry-After
integer

Seconds to wait.