Account Registration (signup)
Endpoint
| Endpoint | Method |
Authentication |
|
/signup
|
POST | Yes |
Authentication
| Type |
Token source |
Server |
| Basic | Internal | USAPI |
Header
| Parameter |
Value |
| authorization | Basic <auth key> |
Body request
{
"username": "test20250219000",
"password": "test20250219000",
"email": "hendy.juliyanto@ondelivery.id",
"first_name": "test mail",
"last_name": "without phone",
"mode": "OTP",
"phone_number": "62123456789",
"platform": "ONAPPS"
}
| Properties |
Properties of | Data type | Required | Description |
| username | string | yes | Username must be unique | |
| password | string | yes |
|
|
| string | yes |
email must be unique |
||
| first_name | string | yes |
|
|
| last_name | string | yes |
|
|
| mode | string | no |
Possible values: "LINK" or "OTP" "LINK": Verification via email "OTP": Verification via SMS |
|
| phone_number | string | no |
|
|
| platform | string | no |
Possible values:
|
Result example
200 OK (LINK mode)
{
"status": true,
"message": "Please check your email to complete registration",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoidGVzdGFjY291bnQyMDI1MDIyNDAwMCIsInVzZXJuYW1lIjoidGVzdGFjY291bnQyMDI1MDIyNDAwMCIsInB3ZCI6IiQyYiQwOCRUT2djQS5oV1VhSUVlQ05ySnIxRVIuRERpaW8vbVFDSTNWVWZvWnFKcTQyVXBaZkFWNUpMdSIsImVtYWlsIjoiaGVuZHkuanVsaXlhbnRvQG9uZGVsaXZlcnkuaWQiLCJmaXJzdF9uYW1lIjoidGVzdCBhY2NvdW50IiwibGFzdF9uYW1lIjoid2l0aCBlbWFpbCIsInBob25lX251bWJlciI6bnVsbCwibW9kZSI6IkxJTksiLCJleHAiOjE3NDAzNjg5NjQsIm90cCI6IjgzNDkzMSIsImlhdCI6MTc0MDM2NzE2NH0.V0l-YGLJ08FvmmH3HF4phrEKBUzJmelAJnXZOkIHu4E",
"exp": 1740368964,
"exp_otp": 18000
}
Error example
400 Bad request
Phone number is invalid
{
"message": "The phone number format is invalid. Please use the format: 628XXXXXXXXX"
}
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"
}
No Comments