Sluby
REST APIAuth

Set up the first admin with the setup code, and sign in.

Works while `setup_required` is true: no admin who can sign in exists. The code is printed in the server log at startup. 10 attempts per client address in 10 minutes.

POST
/api/v1/auth/setup

Works while setup_required is true: no admin who can sign in exists. The code is printed in the server log at startup. 10 attempts per client address in 10 minutes.

Request Body

application/json
  1. body
code*string

The setup code from the server log, XXXXX-XXXXX; case and dashes do not matter.

name*string
Length1 <= length <= 100
email*string

Stored trimmed and lowercased.

Lengthlength <= 254
password*string
Length10 <= length <= 256

Response Body

The admin exists and is signed in.

application/json
  1. response
success*unknown
Example Request
curl -X POST 'https://sluby.example.com/api/v1/auth/setup' \  -H 'Content-Type: application/json' \  -d '{  "code": "string",  "name": "string",  "email": "string",  "password": "stringstri"}'
Example Response
{  "success": true}