UKK Kereta API 2025
  1. User
UKK Kereta API 2025
  • Getting Started
  • Version
    • Version
      GET
  • Auth
    • Sign Up
      POST
    • Sign In
      POST
    • Sign Out
      POST
  • User
    • Create User
      POST
    • Find User
      GET
    • Find Many User
      GET
    • Update User
      PATCH
    • Delete User
      DELETE
  • Kereta
    • Create Kereta
      POST
    • Find Kereta
      GET
    • Find Many Kereta
      GET
    • Find Many Kereta Filter
      GET
    • Update Kereta
      PATCH
    • Delete Kereta
      DELETE
  • Pelanggan
    • Create Pelanggan
      POST
    • Find Pelanggan
      GET
    • Find Many Pelanggan
      GET
    • Update Pelanggan
      PATCH
    • Delete Pelanggan
      DELETE
  • Gerbong
    • Create Gerbong
      POST
    • Find Gerbong
      GET
    • Find Many Gerbong
      GET
    • Update Gerbong
      PATCH
    • Untitled Endpoint
      DELETE
  • Kursi
    • Create Kursi
    • Find Kursi
    • Find Many Kursi
    • Update Kursi
    • Delete Kursi
  • Jadwal
    • Create Jadwal
    • Find Jadwal
    • Find Many Jadwal
    • Update Jadwal
    • Delete Jadwal
  • Pembelian Tiket
    • Create Pembelian Tiket
    • Find Many Pembelian Tiket History
    • Find Many Pemasukan Pembelian Tiket
    • Find Pembelian Tiket Nota
  1. User

Create User

Developing
POST
/user
Maintainer:Muhammad Fadhil Kholaf

Request

Cookie Params
token
string 
required
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/user' \
--header 'Cookie: token=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "string",
    "password": "string",
    "role": "pelanggan"
}'

Responses

🟢201Created
application/json
Body
message
string 
required
data
object 
required
Example
{
    "message": "string",
    "data": {}
}
🟠400Bad Request
🟠401Unauthorized
🟠409Conflict
🔴500Server Error
Previous
Sign Out
Next
Find User
Built with