Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
Body Params application/json
{
"username": "instructor3",
"email": "instructor3@gmail.com",
"password": "instructor3",
"first_name": "instructor3",
"second_name": "instructor3",
"gender": "m",
"birth_date": "2002-02-02",
"user_type": 2,
"specialized_in": "Software Development",
"third_name": "instructor3",
"fourth_name": "instructor3",
"last_name": "instructor3",
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": false,
"is_superuser": false
}
Request Code Samples
curl --location --request POST 'http://127.0.0.1:80/api/accounts/instructors/' \
--header 'Content-Type: application/json' \
--data-raw '{
// Required Fields
"username": "instructor3", // Must be Unique
"email": "instructor3@gmail.com", // Must be Unique
"password": "instructor3",
"first_name": "instructor3",
"second_name": "instructor3",
"gender": "m",
"birth_date": "2002-02-02",
"user_type": 2, // 1 => Admin, 2 => Instructor, 3 => Student
"specialized_in": "Software Development",
// Optional Fields
"third_name": "instructor3",
"fourth_name": "instructor3",
"last_name": "instructor3",
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": false,
"is_superuser": false
}'
Responses
application/json {
"url": "http://127.0.0.1:80/api/accounts/instructors/5/",
"id": 5,
"username": "instructor3",
"email": "instructor3@gmail.com",
"first_name": "instructor3",
"second_name": "instructor3",
"third_name": "instructor3",
"fourth_name": "instructor3",
"last_name": "instructor3",
"gender": "m",
"birth_date": "2002-02-02",
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": false,
"is_superuser": false,
"date_joined": "2024-03-16T20:50:09.162840Z",
"user_type": 2,
"specialized_in": "Software Development"
}
Modified at 2024-03-16 21:19:13