Skip to main content

Endpoint

POST /api/auth/setup

Authentication

No authentication required. This endpoint can only be called once, before any password is configured.

Request Body

password
string
required
The master password to configure. Must be at least 8 characters.
confirm
string
required
Password confirmation. Must match the password field.

Response

success
boolean
required
Indicates whether the setup was successful
message
string
required
Human-readable status message

Error Responses

error
string
Error message when the request fails
retry_after_seconds
number
Number of seconds to wait before retrying (for rate limiting)

Status Codes

  • 200 OK - Password configured successfully
  • 400 Bad Request - Invalid input (passwords don’t match, too short, etc.)
  • 409 Conflict - Password already configured
  • 500 Internal Server Error - Server error during setup

Examples

curl -X POST http://localhost:3742/api/auth/setup \
  -H "Content-Type: application/json" \
  -d '{
    "password": "my-secure-password",
    "confirm": "my-secure-password"
  }'

Validation Rules

  • Password must be at least 8 characters long
  • Password and confirm fields must match exactly
  • Can only be called once - returns 409 Conflict if already initialized

Build docs developers (and LLMs) love