To create a new user via the API, follow these steps:

  1. Send a POST request to /api/user/create with the required parameters:

    • username (string, required)
    • email (string, required)
    • password (string, required)
    • role (string, optional, default: "user")

    Example request body:

    {
      "username": "john_doe",
      "email": "john@example.com",
      "password": "secure_password_123",
      "role": "admin"
    }
    
  2. Handle the response:

    • Success: Returns 201 Created with the user ID
    • Error: Returns 400 Bad Request or 500 Internal Server Error

    📝 For detailed error codes, see API Reference.

api_user_creation

⚠️ Always validate user input and use HTTPS for secure communication.

For additional documentation on user management, visit User Management Overview.