POST /api/v1/email
The endpoint adds a new email to the database and sends a confirmation email to the user.
type RequestBody = {
email: string;
};
type Response =
| { success: true } // status: 201
| {
success: false;
error: string;
};
GET /api/v1/email/confirm
The endpoint marks the user email as confirmed using the confirmation token generated when the user added his email.
Param | Description |
---|---|
token |
The token generated when the user added his email (it will be in the email sent to the user inbox) |
Example: /api/v1/email/confirm?token=mytoken
type Response =
| { success: true } // status: 200
| {
success: false;
error: string;
};