POST /api/v1/register/lecturer

Register a new lecturer with institutional information and optional department leadership assignment. Creates lecturer account with teaching permissions and institutional affiliations.

application/json

Body Required

Lecturer registration information with institutional details

  • firstname string Required
  • lastname string Required
  • email string Required
  • role string Required
  • phone string Required
  • password string Required
  • instituteid string Required
  • departmentInchargeId string

Responses

  • 201 application/json

    Lecturer registered successfully with institutional profile

    Hide response attributes Show response attributes object
    • message string Required
    • user object Required
      Hide user attribute Show user attribute object
      • id string Required
  • 400 application/json

    Invalid lecturer registration data or institutional information

  • 500 application/json

    Error during lecturer registration or institutional profile creation

POST /api/v1/register/lecturer
curl \
 --request POST 'http://localhost:3500/api/v1/register/lecturer' \
 --header "Content-Type: application/json" \
 --data '{"role":"LECTURER","email":"robert.wilson@university.edu","phone":"+254712345682","lastname":"Wilson","password":"LecturerPass456!","firstname":"Dr. Robert","instituteid":"institute-uuid-here"}'
Request examples
Register lecturer without department leadership
{
  "role": "LECTURER",
  "email": "robert.wilson@university.edu",
  "phone": "+254712345682",
  "lastname": "Wilson",
  "password": "LecturerPass456!",
  "firstname": "Dr. Robert",
  "instituteid": "institute-uuid-here"
}
Register lecturer as department head
{
  "role": "LECTURER",
  "email": "mary.davis@university.edu",
  "phone": "+254712345683",
  "lastname": "Davis",
  "password": "DeptHeadPass789!",
  "firstname": "Prof. Mary",
  "instituteid": "institute-uuid-here",
  "departmentInchargeId": "department-uuid-here"
}
Response examples (201)
{
  "user": {
    "id": "lecturer-uuid-here"
  },
  "message": "Lecturer registered successfully"
}
Response examples (400)
{
  "error": "Bad Request",
  "message": [
    "instituteid should not be empty",
    "email must be an email",
    "phone must be a valid phone number"
  ],
  "statusCode": 400
}
Response examples (500)
{
  "error": "Internal Server Error",
  "message": "Failed to create lecturer profile",
  "statusCode": 500
}