Authentication
User Sign In
POST: /{db}secured/login/authentification
Endpoint to authenticate user credentials.
Response Samples:
{
"username": "[email protected]", "password": "Password1!"
}
Parameter | Type | Example | Required |
---|---|---|---|
name | string | John Doe | Yes |
country | string | Bulgaria | Yes |
string | [email protected] | Yes | |
phone | string | +11111111 | No |
language | string | The language code for the email content (e.g., bg_BG, en). | Yes |
template | string | signup | Yes |
password | string | Password1! | Yes |
Note: The user gets status 2 (non-verified).
User Password Reset
POST: /{db}/reset/password/send-email
To initiate password reset.
Succes Response
HTTP Status Code: 201 Created { "email": "[email protected]",
"token": "recaptchaToken"
}
User Password Change
POST: /{db}/resetting/password/{confirmationToken}
To change user password.
{ "password": "password",
"token": "recaptchaToken" }
Send User Verification Email
POST: /{db}/api/post/account/attributes?verify=true
Access: Public (No authentication required)
This endpoint sends a verification email to the user. The email is used to confirm the user's identity.
Parameter | Type | Description | Required |
---|---|---|---|
token | string | Recaptcha response token provided by the client. | Yes |
string | The email address of the user to send the verification email. | Yes | |
language | string | The language code for the email content (e.g., bg_BG, en). | No |
template | string | The alias of the email template to use (e.g., welcome_email). | No |
Response sample:
Succes Response
HTTP Status Code: 201 Created { "message": "Email is sent" }
Error Response:
HTTP Status Code: 400 BAD REQUEST
{
"message": "Recaptcha token is missing."
}
HTTP Status Code: 401 UNAUTHORIZED
{
"message": "User with username [email] doesn't exist."
}
HTTP Status Code: 404 NOT FOUND
{ "message": "Invalid recaptcha token." }
HTTP Status Code: 404 NOT FOUND
{ "message": "Template is missing." }
Confirm User Email
POST: /confirm/user/{token}
Endpoint verifies a user’s email address using a confirmation token sent to the user.
It first validates a reCAPTCHA token. If the reCAPTCHA verification succeeds,
the user's status is updated to "verified".
Parameter | Type | Description | Required |
---|---|---|---|
token | string | The confirmation token sent to the user’s email. | Yes |
recaptchaToken | string | The reCAPTCHA response token from the client-side form. | Yes |
Response sample:
Succes Response
HTTP Status Code: 200 OK { "message": "User is verified" }
This response is returned when the reCAPTCHA verification is successful, and
the user's email has been confirmed.
The user's status has been updated to verified.
Error Response:
HTTP Status Code: 400 Bad Request
{ "message": "Invalid recaptcha token." }
This error occurs when the reCAPTCHA token is invalid or cannot be verified.
HTTP Status Code: 400 Bad Request
{ "message": "Invalid token." }
This error occurs when the provided user confirmation token is invalid or not found in the system.
HTTP Status Code: 200 OK
{ "message": "User is already verified." }
This message is returned if the user has already verified their email address.