- Get Started
- API
- Clients
- Livres
- Emprunts
- Categories
Register a new client
POST
https://gestion-bibliotique-pfe.netlify.app/api/clients/register
authauthentificationregistersign up
Maintainer:Nassim MZILI
@access Public
#
Request
Body Params application/json
nom
string
required
email
string
required
password
string
required
confirmPassword
string
required
adresse
string
optional
Example
{
"nom": "Arnold Schimmel",
"email": "Lula_Kertzmann54@hotmail.com",
"password": "JvRHcIBYuaCpqBO34",
"confirmPassword": "JvRHcIBYuaCpqBO34"
}
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 'https://gestion-bibliotique-pfe.netlify.app/api/clients/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"nom": "Arnold Schimmel",
"email": "Lula_Kertzmann54@hotmail.com",
"password": "JvRHcIBYuaCpqBO34",
"confirmPassword": "JvRHcIBYuaCpqBO34"
}'
Responses
🟢201Created
application/json
Body
success
boolean
required
message
string
required
data
object
required
client
object
required
token
string
required
Example
{
"success": true,
"message": "registration successful!",
"data": {
"client": {
"_id": "KSZxuuuhp78NvwzByCfoH",
"nom": "Jimmy Pagac",
"email": "Noah28@gmail.com",
"adresse": "971 Tiara Junctions",
"role": "admin"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjFjZmY2MWUzNTYzOGJlMTUyZGY1NyIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTczOTcwNzg4MywiZXhwIjoxNzM5Nzk0MjgzfQ.c7NCQvGtFr57H3g_8MR7qLYTQq3prgStzO4jh6kDE20"
}
}
🟠400Bad Request
🔴500Server Error