- Getting Started
- Version
- Auth
- User
- Kereta
- Pelanggan
- Gerbong
- Kursi
- Jadwal
- Pembelian Tiket
Sign Up
Developing
POST
/auth/signup
Maintainer:Muhammad Fadhil Kholaf
Request
Body Params application/json
username
string
required
password
string
required
role
enum<string>
optional
Allowed values:
pelangganpetugas
Example
{
"username": "string",
"password": "string",
"role": "pelanggan"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://kereta.api.fadhilkholaf.my.id/auth/signup' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200Success
application/json
Body
message
string
required
data
object
required
user
object (User)
required
token
string
required
Example
{
"message": "string",
"data": {
"user": {
"id": "string",
"username": "string",
"password": "string",
"role": "pelanggan",
"createdAt": "string",
"updatedAt": "string"
},
"token": "string"
}
}
🟠400Bad Request
🟠409Conflict
🔴500Server Error
Modified at 2025-03-16 18:06:47