1. users [admin]
LeksiGo v2
  • auth
    • login
      POST
    • register
      POST
    • logout
      POST
    • refresh token
      POST
  • child
    • get [parent]
      GET
    • post [parent]
      POST
    • get [insitution]
      GET
    • put [parent]
      PUT
    • delete [parent]
      DELETE
  • users [admin]
    • get
      GET
    • post
      POST
    • show
      GET
    • put
      PUT
    • delete
      DELETE
  • institution
    • get
      GET
    • post [admin]
      POST
    • show
      GET
    • updateStatus
      PATCH
    • get applicants [institution]
      GET
    • apply applicants [institution]
      POST
  • teacher [institution]
    • get
      GET
    • post
      POST
    • put
      PUT
    • updateStatus
      PATCH
  • playground
    • teacher
      • course
        • store
        • get
        • show
        • put
        • active status
      • modul
        • post
        • put
        • active status
        • show
    • student
      • submit answer
  • generate
    • question sugesstion
  1. users [admin]

post

Developing
POST
/users

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.leksigo.com/api/v2/users' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Institusi TelYu",
    "username": "telyau",
    "email": "telayu@gmail.com",
    "password": "123456",
    "role": 2
}'
Response Response Example
Success
{
    "success": true,
    "message": "Berhasil menambahkan pengguna baru",
    "data": {
        "name": "Stevan Andreas",
        "username": "stevanandreas",
        "email": "stevanandreas7889@gmail.com",
        "password": "$2b$10$MZlEOxVANVbSjTsMgPQ.y.l.CyaDYVGwKROAMrFe8gsjbR8y3XJJm",
        "role": 1,
        "_id": "69f870e7dcd28345b86c77ef",
        "deleted": false,
        "createdAt": "2026-05-04T10:11:51.579Z",
        "updatedAt": "2026-05-04T10:11:51.579Z",
        "__v": 0
    }
}
Modified at 2026-07-28 12:45:40
Previous
get
Next
show
Built with