Skip to main content
POST
/
api
/
v1
/
school
/
teachers
Create teacher
curl --request POST \
  --url https://test-api.afrainity.com/api/v1/school/teachers/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "first_name": "<string>",
  "last_name": "<string>",
  "id_number": "<string>",
  "phone": "<string>",
  "gender": "Male",
  "ec_number": "<string>",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "jsmith@example.com",
  "is_active": true,
  "is_deleted": true,
  "subjects": "<unknown>"
}
'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

Auto-populate created_by from request.user when available.

first_name
string
required
Required string length: 1 - 255
last_name
string
required
Required string length: 1 - 255
id_number
string
required
Required string length: 1 - 255
phone
string
required
Required string length: 1 - 255
gender
enum<string>
required
  • Male - Male
  • Female - Female
Available options:
Male,
Female
ec_number
string
required
Required string length: 1 - 255
user_id
string<uuid> | null
email
string<email> | null
Maximum string length: 254
is_active
boolean
is_deleted
boolean
subjects
any

Response

{key}
any