Skip to main content

Account Registration -Internal

Endpoint
Endpoint Method
Authentication
/internal/register
POST Yes
Authentication
Type
Token source
Server
Basic Internal USAPI
Header
Parameter
Value
authorization Basic <auth key>
Body request
{
    "username": "test regis 3",
    "password": "test regis 3",
    "first_name": "second",
    "last_name": "test account",
    "phone_number": "621234567891",
    "email": "test@abc.com"
}
Properties
Properties of Data type Required Description
username
string yes Username must be unique
password
string yes

 

first_name
string yes


last_name
string yes


phone_number
string yes
  1. Phone number must be unique
  2. Phone number format starts from 62 (62xxxx)
  3. Without 62: Minimum length is 7 and maximum length is 15
  4. With 62: Minimum length is 9 and maximum length is 17
email
string yes

Email must be unique

Result example

200 Ok

{
  "status": true,
  "message": "Account has been created"
}
Error example

400 Bad request
Phone number is invalid

{
    "message": "Invalid phone number format"
}

400 Bad request
Duplicate phone number

{
    "message": "Phone number already exist"
}

400 Bad request
Duplicate username

{
    "message": "Username already exist"
}

400 Bad request
Duplicate email

{
    "message": "Email already exist"
}

500 Internal server error

{
    "message": "Internal error"
}