Skip to main content

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

 

email
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
  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
platform
string no

Possible values:

  • ONMART
  • ONMARKET
  • OSAS

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"
}