- Accounts
- Authentication
- Exams
- Levels
Create
POST
/api/accounts/admins/
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
username
string
required
email
string
required
password
string
required
first_name
string
required
second_name
string
required
third_name
string
required
fourth_name
string
required
last_name
string
required
gender
string
required
birth_date
string
required
user_type
integer
required
city
string
required
address
string
required
phone
string
required
is_active
boolean
required
is_staff
boolean
required
is_superuser
boolean
required
Example
{
// Required Fileds
"username": "admin2",
"email": "admin2@gmail.com",
"password": "admin2",
"first_name": "admin2",
"second_name": "admin2",
"third_name": "admin2",
"fourth_name": "admin2",
"last_name": "admin2",
"gender": "m",
"birth_date": "2002-02-02",
"user_type": 1, // 1 => Admin, 2 => Instructor, 3 => Student
// Optional Fileds
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": true,
"is_superuser": true
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1:80/api/accounts/admins/' \
--header 'Content-Type: application/json' \
--data-raw '{
// Required Fileds
"username": "admin2",
"email": "admin2@gmail.com",
"password": "admin2",
"first_name": "admin2",
"second_name": "admin2",
"third_name": "admin2",
"fourth_name": "admin2",
"last_name": "admin2",
"gender": "m",
"birth_date": "2002-02-02",
"user_type": 1, // 1 => Admin, 2 => Instructor, 3 => Student
// Optional Fileds
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": true,
"is_superuser": true
}'
Responses
🟢201Create_Ex01
application/json
Body
url
string
required
id
integer
required
username
string
required
email
string
required
first_name
string
required
second_name
string
required
third_name
string
required
fourth_name
string
required
last_name
string
required
gender
string
required
birth_date
string
required
city
string
required
address
string
required
phone
string
required
is_active
boolean
required
is_staff
boolean
required
is_superuser
boolean
required
date_joined
string
required
user_type
integer
required
Example
{
"url": "http://127.0.0.1:80/api/accounts/admins/8/",
"id": 8,
"username": "admin2",
"email": "admin2@gmail.com",
"first_name": "admin2",
"second_name": "admin2",
"third_name": "admin2",
"fourth_name": "admin2",
"last_name": "admin2",
"gender": "m",
"birth_date": "2002-02-02",
"city": "Cairo",
"address": "Address",
"phone": "+201111111111",
"is_active": true,
"is_staff": true,
"is_superuser": true,
"date_joined": "2024-03-16T21:02:52.972125Z",
"user_type": 1
}
Modified at 2024-03-16 21:19:13