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
Header | Value |
---|---|
Content-Type | application/json |
Request Body
Field | Type | Required | Description |
---|---|---|---|
username | string | ✅ | The username for your account |
password | string | ✅ | The password for the new account |
api_key | string | ✅ | API 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
Field | Type | Description |
---|---|---|
result | string | Confirmation 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