Core
  1. Teachers
Core
  • Introduction
    • What is Core
    • HTTP Statuses
    • Request
    • Responses
    • Meta
    • Limit & Pagination
    • Query Parameters
  • Quick Start
    • Letters
  • Auth
    • Sign In with Email and Password
      POST
    • Get the Current Session
      GET
    • Sign Out the Current User
      POST
  • Users
    • Get All Users
      GET
    • Create a User
      POST
    • Retrieve an Existing User
      GET
    • Delete an Existing User
      DELETE
    • Update an Existing User
      PATCH
    • Get Current User
      GET
    • Update Current User
      PATCH
    • Get Current User Devices
      GET
    • Retrieve User Devices by User ID
      GET
    • Update Own Profile Image
      POST
    • Update User Image
      POST
    • Reset User Password
      PATCH
    • Get User Login History
      GET
  • Staff
    • Get All Staff
    • Retrieve an Existing Staff
    • Create a Staff
    • Delete an Existing Staff
    • Update an Existing Staff
  • Teachers
    • Get All Teachers
      GET
    • Retrieve an Existing Teacher
      GET
    • Create a Teacher
      POST
    • Delete an Existing Teacher
      DELETE
    • Update an Existing Teacher
      PATCH
  • Students
    • Get All Students
    • Retrieve an Existing Student
    • Create a Student
    • Delete an Existing Student
    • Update an Existing Student
    • Import Bulk Students
  • Roles
    • Get All Roles
    • Create a Role
    • Retrieve an Existing Role
    • Update an Existing Role
    • Delete an Existing Role
    • Get All Eligible Users for Role
    • Get All Members of Role
    • Add Bulk Member to Role
    • Remove Bulk Members from Role
  • Classes
    • Get All Classes
    • Create a Class
    • Delete an Existing Student Copy
    • Create a Class Copy
  • Statistics
    • Teachers
      • Get Teacher Gender Stats
      • Get Teacher Religion Distribution
      • Get Teacher Employment Stats
      • Get Teacher Age Stats
    • Students
      • Get Student Gender Stats
      • Get Student Religion Distribution
      • Get Student Weight Stats
      • Get Student Height Stats
      • Get Student Age Stats
      • Get Student Transportation Stats
      • Get Student Class Stats
    • Staffs
      • Get Staffs Gender Stats
      • Get Staffs Religion Distribution
      • Get Staffs Age Stats
      • Get Staffs Employment Stats
    • Users
      • Retrieve User Summary
    • Get All Stats
  • Letters
    • Get All Letters
    • Retrieve an Existing Letter
    • Create a Letter
    • List User Letter
    • List Current User Letter
    • List Recipients
  • Letter Actions
    • Initiate a Letter Action
  • Files
    • Create a Presigned URL
  • Schemas
    • Schemas
      • Letter
        • LetterHistory
        • LetterStatus
        • LetterType
      • User
        • UserProfile
      • Address
      • Meta
      • Base
      • bloodType
      • Religion
      • Gender
      • ParentInfo
      • Error
      • GenderStats
      • ReligionDistribution
      • WeightStats
      • HeightStats
      • AgeStats
      • TransportationStats
      • ClassStats
      • EducationHistoryObject
      • EmploymentStats
      • Location
      • EconomyStats
      • Actor
    • Model
      • User
      • Teacher
      • Staff
      • Student
      • Letter
      • Class
      • Roles
    • LoginHistory
  1. Teachers

Create a Teacher

Designing
POST
/teachers
To create a new Teacher, send a POST request to teachers setting the required attributes.
A Teacher will be created using the provided information. The response body will contain a JSON object with a key called result. The value will be an object containing the standard attributes for your new Teacher. The response code will be 201 if the Teacher was successfully created.

Request

Body Params application/json

Example
{
    "id": "488151fee5b697c36a6799e1",
    "userId": "9a732f51318d0b8082e94ad5",
    "address": {
        "street": "Psr. Nasyidah no 17",
        "rt": "do cupidatat veniam dolor",
        "rw": null,
        "subDistrict": "Herefordshire",
        "district": "Wiltshire",
        "city": "Polewali",
        "province": "Kepulauan Riau",
        "country": "Portugal",
        "postalCode": "54902",
        "location": null
    },
    "assignmentDate": "2024-03-29",
    "birthDate": "2024-09-03",
    "bloodType": "A",
    "familyCardNumber": "Passenger Van",
    "gender": "male",
    "landline": null,
    "nik": null,
    "npwp": "fugiat enim",
    "nuptk": null,
    "phoneNumber": "(0296) 228447",
    "ptkPosition": null,
    "ptkStatus": null,
    "ptkType": null,
    "religion": "CHRISTIAN"
}

Request Code 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://sims.sman1samarinda.sch.id/api/teachers' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "488151fee5b697c36a6799e1",
    "userId": "9a732f51318d0b8082e94ad5",
    "address": {
        "street": "Psr. Nasyidah no 17",
        "rt": "do cupidatat veniam dolor",
        "rw": null,
        "subDistrict": "Herefordshire",
        "district": "Wiltshire",
        "city": "Polewali",
        "province": "Kepulauan Riau",
        "country": "Portugal",
        "postalCode": "54902",
        "location": null
    },
    "assignmentDate": "2024-03-29",
    "birthDate": "2024-09-03",
    "bloodType": "A",
    "familyCardNumber": "Passenger Van",
    "gender": "male",
    "landline": null,
    "nik": null,
    "npwp": "fugiat enim",
    "nuptk": null,
    "phoneNumber": "(0296) 228447",
    "ptkPosition": null,
    "ptkStatus": null,
    "ptkType": null,
    "religion": "CHRISTIAN"
}'

Responses

🟢201Created
application/json
Body

Example
{
    "success": true,
    "message": "Success create a new teacher.",
    "meta": {},
    "errors": [],
    "result": {
        "id": "b3c08ec6aeefbfcac9beccb1",
        "userId": "ab7c6f7f1981d2c0ae8a8c5f",
        "address": {
            "street": "Jl. Beruang",
            "rt": "093",
            "rw": "077",
            "subDistrict": "Sempaja Utara",
            "district": "Samarinda Utara",
            "city": "Samarinda",
            "province": "Kalimantan Timur",
            "country": "ID",
            "postalCode": "75124",
            "location": [
                "0.9426",
                "126.7358"
            ]
        },
        "assignmentDate": "2025-03-20T07:53:35.241Z",
        "birthDate": "2025-03-20T07:53:35.241Z",
        "bloodType": "O",
        "familyCardNumber": "7053140440592368",
        "gender": "FEMALE",
        "landline": "0541123456",
        "nik": "7260973314817525",
        "npwp": "3780264988305966",
        "nuptk": "7305017638208550",
        "phoneNumber": "6281234567890",
        "ptkPosition": "Guru Matematika",
        "ptkStatus": "PPPK",
        "ptkType": "Guru",
        "religion": "ISLAM"
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🔴500Server Error
Modified at 2026-01-06 13:25:01
Previous
Retrieve an Existing Teacher
Next
Delete an Existing Teacher
Built with