Endpoint
POST /api/v1/auth/register
Creates a new user account with email verification. The user will need to verify their email before accessing all features.
Request Body
Valid email address for the user account. Must be unique in the system.Format: Valid email format (validated by EmailStr)Example: user@example.com
Unique username for the account.Requirements:
- 3-50 characters
- Only letters, numbers, and underscores allowed
- Must be unique
Pattern: ^[a-zA-Z0-9_]+$Example: john_doe
Strong password for account security.Requirements:
- Minimum 8 characters
- At least one uppercase letter (A-Z)
- At least one lowercase letter (a-z)
- At least one number (0-9)
- At least one special character (!@#$%^&*)
Example: MyP@ssw0rd
Password confirmation. Must exactly match the password field.Example: MyP@ssw0rd
Response
Unique identifier for the newly created user.
Email address of the registered user.
Username of the registered user.
Email verification status. Initially false until user verifies their email.
ISO 8601 timestamp of account creation.Format: YYYY-MM-DDTHH:MM:SS.mmmmmm
Success message confirming registration.Default: "User registered successfully"
Example Request
curl -X POST https://api.softbee.com/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "john.doe@example.com",
"username": "john_doe",
"password": "MySecure@Pass123",
"confirm_password": "MySecure@Pass123"
}'
import requests
url = "https://api.softbee.com/api/v1/auth/register"
payload = {
"email": "john.doe@example.com",
"username": "john_doe",
"password": "MySecure@Pass123",
"confirm_password": "MySecure@Pass123"
}
response = requests.post(url, json=payload)
print(response.json())
fetch('https://api.softbee.com/api/v1/auth/register', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'john.doe@example.com',
username: 'john_doe',
password: 'MySecure@Pass123',
confirm_password: 'MySecure@Pass123'
})
})
.then(response => response.json())
.then(data => console.log(data));
Example Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "john.doe@example.com",
"username": "john_doe",
"is_verified": false,
"created_at": "2026-03-06T10:30:45.123456",
"message": "User registered successfully"
}
Error Responses
{
"error": "Must contain uppercase letter"
}
Validation Rules
Email Validation
- Must be valid email format
- Must be unique (not already registered)
- Case-insensitive uniqueness check
Password Validation
The password validator checks for:
- Length: Minimum 8 characters
- Uppercase: At least one uppercase letter (A-Z)
- Lowercase: At least one lowercase letter (a-z)
- Number: At least one digit (0-9)
- Special Character: At least one special character (!@#$%^&*()_+-=[]|;:’,.?/)
- Match: Must exactly match
confirm_password
Username Validation
- Minimum 3 characters
- Maximum 50 characters
- Only alphanumeric characters and underscores
- Must be unique (not already registered)
Next Steps
After successful registration:
- Verify Email: User should check their email for verification link
- Login: Use the Login endpoint to authenticate
- Access API: Use the access token to make authenticated requests
Login
Learn how to authenticate after registration