Skip to content

Create a new teacher

POST
/teachers

Creates a new teacher record in the system

object
teacher_name
required

Name of the teacher

string
email
required

Email address of the teacher

string format: email

Teacher created successfully

object
success
boolean
true
data
object
teacher_id
required

Unique identifier for the teacher

integer
teacher_name
required

Name of the teacher

string
email
required

Email address of the teacher

string format: email
used_resources

Number of resources currently used by the teacher

integer
total_resources

Total number of resources allocated to the teacher

integer

Bad request - invalid input

object
success
required

Indicates if the request was successful

boolean
message
required

Response message

string
success
boolean
message
string
Allowed values: BAD_REQUEST

Unauthorized - authentication required

object
success
required

Indicates if the request was successful

boolean
message
required

Response message

string
success
boolean
message
string
Allowed values: UNAUTHORIZED

Forbidden - insufficient permissions

object
success
required

Indicates if the request was successful

boolean
message
required

Response message

string
success
boolean
message
string
Allowed values: FORBIDDEN

Conflict - resource already exists

object
success
required

Indicates if the request was successful

boolean
message
required

Response message

string
success
boolean
message
string
Allowed values: CONFLICT

Internal server error

object
success
required

Indicates if the request was successful

boolean
message
required

Response message

string
success
boolean
message
string
Allowed values: INTERNAL_SERVER_ERROR