User account activation
GET/company/activate/:token
Endpoint for activating user accounts via verification token.
Performs the following operations:
- Validates the provided token
- Searches for the user associated with the token
- Marks the account as active and verifies the email
- Deletes the activation token
- Sends a confirmation email
Detailed flow:
- User clicks on the activation link received by email
- Server receives the token via URL
- Searches for a user with a matching token (404 if not found)
- Updates the account status (active=true, emailVerified=true)
- Deletes the activation token to prevent reuse
- Sends an activation confirmation email
- Redirects to a success/failure page
Security:
- Tokens are single-use
- Limited validity (72h by default)
- Requires HTTPS
Example activation URL:
https://api.demo.cargoffer.com/company/auth/activate/abc123def456
Responses:
- 200: Redirects to an HTML page for successful activation
- 404: Invalid or expired token (redirects to an error page)
Request
Responses
- 200
- 404
Account successfully activated
Not found