Skip to main content

User account activation

GET 

/company/activate/:token

Endpoint for activating user accounts via verification token.
Performs the following operations:

  1. Validates the provided token
  2. Searches for the user associated with the token
  3. Marks the account as active and verifies the email
  4. Deletes the activation token
  5. Sends a confirmation email

Detailed flow:

  1. User clicks on the activation link received by email
  2. Server receives the token via URL
  3. Searches for a user with a matching token (404 if not found)
  4. Updates the account status (active=true, emailVerified=true)
  5. Deletes the activation token to prevent reuse
  6. Sends an activation confirmation email
  7. 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

Account successfully activated