Overview
Create a new user account, either as a parent organization account or a child account under an existing parent. Upon successful signup, users receive an immediate JWT token for authentication.
Credit System : Child account signup costs 5 credits from the parent account. Parent accounts start with 3,000 free credits and 1,000 free users.
API Details
Username (alphanumeric + underscore only, max 30 chars)
Password meeting security requirements
Required only for child account creation
Optional custom verification path for email verification
Parent Account
Child Account
With Custom Verification Path
{
"username" : "parentuser" ,
"email" : "[email protected] " ,
"password" : "SecurePass123!"
}
Try It Out
Test the API by filling in the values and clicking Send:
Parent public Key (for child accounts)
Code Examples
curl -X POST https://api.authiqa.com/auth/signup \
-H "Content-Type: application/json" \
-d '{
"username": "testuser",
"email": "[email protected] ",
"password": "SecurePass123!"
}'
Requirements
Username
Alphanumeric + underscore only
Max 30 characters
Must be unique (per parent for child accounts)
Password
Minimum 8 characters
One uppercase letter
One lowercase letter
One number
One special character
Email Verification
Email verification is conditionally sent based on organization settings:
Child accounts : Inherits parent’s emailVerificationRequired setting
Parent accounts : Default to no verification (can be enabled via organization update)
Custom verification path : Use verifyAuthPath to specify custom verification URL
Response Examples
{
"success" : true ,
"data" : {
"token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ,
"data" : {
"userID" : "USR_12345" ,
"username" : "testuser" ,
"email" : "[email protected] " ,
"createdAt" : 1729616234 ,
"publicKey" : "APK_abc123def456_1234567890" ,
"emailVerified" : false ,
"parentAccount" : null ,
"accountType" : "parent" ,
"emailVerificationSent" : false
}
}
}
200: Success with Email Verification
{
"success" : true ,
"data" : {
"token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ,
"data" : {
"userID" : "USR_12345" ,
"username" : "childuser" ,
"email" : "[email protected] " ,
"createdAt" : 1729616234 ,
"publicKey" : "APK_abc123def456_1234567890" ,
"emailVerified" : false ,
"parentAccount" : "APK_parent123_456" ,
"accountType" : "child" ,
"emailVerificationSent" : true
}
}
}
{
"success" : false ,
"error" : {
"code" : "INVALID_USERNAME_FORMAT" ,
"message" : "Username can only contain letters, numbers, and underscores"
}
}
Error Codes
MISSING_REQUEST_BODY - Request body required
INVALID_REQUEST_BODY - Invalid JSON format
MISSING_REQUIRED_FIELDS - Missing email/password
INVALID_USERNAME_FORMAT - Invalid username format
INVALID_EMAIL_FORMAT - Invalid email format
INVALID_PASSWORD_FORMAT - Password requirements not met
PARENT_NOT_FOUND - Invalid parent public key
PARENT_INSUFFICIENT_BALANCE - Parent account has insufficient balance
USERNAME_ALREADY_TAKEN - Username exists
EMAIL_ALREADY_REGISTERED - Email exists
ORGANIZATION_SCOPE_CONFLICT - Email/username exists under parent
500 Internal Server Error
INTERNAL_SERVER_ERROR - Server error occurred
EMAIL_SERVICE_ERROR - Failed to send verification email
Key Features
JWT token provided immediately upon successful signup
No need for separate sign-in request
Token includes user account type and permissions
Conditional Email Verification
Email verification only sent when required by organization settings
emailVerificationSent flag indicates if verification email was sent
Custom verification paths supported via verifyAuthPath
Parent-Child Account Hierarchy
Child accounts automatically inherit parent organization settings
Parent account validation ensures sufficient balance for child operations
Automatic organization assignment for child accounts