Resend Activation Email (Admin)
POST/company/auth/activate
Endpoint for a manager to resend the activation email to a user.
Allow managers/administrators to resend the activation email to registered users who have not received it or whose token has expired.
Use Cases
- User did not receive the activation email after registration
- The activation email went to spam or promotions folder
- The previous token expired and a new one is needed
- Administrator resends activation to a specific user
Process Flow
- Client requests email resend via user ID or email
- Middleware m.isGestor verifies the user has a manager/admin/dev role (401 if not)
- Server searches for the user by the provided ID or email
- If the user exists and is not active, a new token is generated
- If the user is already active, a notification can be sent but no reactivation occurs
- An activation email with the new token is sent
- Confirmation of sending is returned to the client
- For security, it is not revealed whether the email exists when not found
Security
- A new token is generated for security
- Requires management permissions (manager, admin, or dev role)
- Does not reveal if the user exists (for security)
- Requires ID or email parameter (at least one)
- The previous token is invalidated upon the new send
Request
Responses
- 200
- 401
- 404
Activation email resent
Unauthorized - manager role required
User not found