Register
Registers a new users in the users table.
Endpoint
-
URL:
POST http://<your-domain>/api/auth/register -
Headers:
Content-Type: application/json
-
Body:
{
"username": "random_username",
"password": "password_here"
} -
Rules:
username: required, 3 to 32 characterspassword(orcredential): required, 8 to 72 characters
Response Status
200 OK– User registered successfully400 Bad Request– A field breaks the rules above. The body lists each invalid field undererrors, e.g.{"errors": {"username": "size must be between 3 and 32"}}409 Conflict– Username already exists500 Internal Server Error– Database issue