Skip to main content

SignUp

This endpoint allows a new user to register and authenticate by providing the necessary credentials. Upon successful registration, the user will receive a confirmation message, and further actions will require a JWT token for secure access to the API.

Endpoint

POST /signup

Headers

HeaderValue
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
usernamestringThe username for your account
passwordstringThe password for the new account
api_keystringAPI key required for signing up (check this value in .env file)

Example Request

curl -X POST -H "Content-Type: application/json" \
-d '{"username": "admin", "password": "password", "api_key": "UHp3aKb40fwpoKZluZByWQ"}' \
http://localhost:9000/signup

Response

Success Response (200 OK)

{
"result": "Successfully created admin user."
}

Response Fields

FieldTypeDescription
resultstringConfirmation message indicating successful user creation

Notes

  • The api_key must match the value configured in your server's .env file
  • Usernames must be unique within the system
  • Passwords should follow security best practices (minimum length, complexity, etc.)
  • After successful registration, use the /login endpoint to obtain a JWT token
  • The user created typically receives administrative privileges