Register a new lecturer with institutional information and optional department leadership assignment. Creates lecturer account with teaching permissions and institutional affiliations.
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
Regular Lecturer Registration
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
}