Endpoint: /auth/register/email/
Method: POST
Request Body:
{
"email": "user@example.com"
}
Response:
{
"email": "user@example.com"
}
Description: This endpoint is used to register a user with their email address. The user will receive an email with a verification link to activate their account.
Endpoint: /auth/verify-email/
Method: GET
Query Parameters:
- token: The verification token received in the email
Response:
{
"detail": "Email successfully activated"
}
Description: This endpoint is used to verify the user's email address. The user should click on the verification link received in the email.
Endpoint: /auth/register/personal-info/
Method: PUT
Request Body:
{
"first_name": "John",
"last_name": "Doe",
"birth_date": "1990-01-01",
"email": "user@example.com"
}
Response:
HTTP 200 OK
Description: This endpoint is used to register the user's personal information after email verification. The user should provide their first name, last name, birth date, and email.
Endpoint: /auth/register/password/
Method: PUT
Request Body:
{
"password": "newpassword",
"password_repeat": "newpassword"
}
Query Parameters:
- email: The email address of the user
Response:
{
"message": "Password updated successfully"
}
Description: This endpoint is used to set the user's password after providing their personal information. The user should provide the new password and repeat it for confirmation.
Endpoint: /auth/login/
Method: POST
Request Body:
{
"email": "user@example.com",
"password": "password"
}
Response:
{
"email": "user@example.com",
"tokens": {
"refresh": "refresh_token",
"access": "access_token"
}
}
Description: This endpoint is used to authenticate the user and obtain access and refresh tokens for subsequent API requests.
Endpoint: /auth/request-password-reset/
Method: POST
Request Body:
{
"email": "user@example.com"
}
Response:
{
"success": "We have sent you a link to reset your password"
}
Description: This endpoint is used to request a password reset email for the user. The user will receive an email with a link to reset their password.
Endpoint: /auth/reset-password/check/{uidb64}/{token}/
Method: GET
Path Parameters:
- uidb64: The user ID encoded as base64
- token: The password reset token
Response:
{
"success": true,
"message": "Credentials Valid",
"uidb64": "{uidb64}",
"token": "{token}"
}
Description: This endpoint is used to check the validity of a password reset token before setting a new password.
Endpoint: /auth/reset-password/confirm/
Method: POST
Request Body:
{
"password": "newpassword",
"token": "{token}",
"uidb64": "{uidb64}"
}
Response:
HTTP 200 OK
Description: This endpoint is used to set a new password for the user after successfully verifying the password reset token.
Note: Replace {uidb64} and {token} with the values received in the password reset email.