This endpoint completely zeroes out the authenticated user’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/viet2811/uk-travel-recommendation/llms.txt
Use this file to discover all available pages before exploring further.
UserProfile, reverting all three preference vectors to their registration-time defaults. It is useful when a user wants to restart their recommendation journey from scratch — for example, after a significant change in interests or when onboarding onto a shared device. Internally it calls Django’s update_or_create on UserProfile, so it is safe to call even if the profile record was somehow missing. The operation is idempotent: calling it multiple times produces the same result. No request body is needed, and the only required credential is a valid Bearer access token.
Endpoint
| Method | POST |
| Path | /api/user/reset/ |
| Auth required | Yes — Authorization: Bearer <access_token> |
| Content-Type | application/json (body not required) |
What is reset
Calling this endpoint sets the following fields on the authenticated user’sUserProfile to their zero-initialised defaults:
| Field | Type | Reset value |
|---|---|---|
labelMHE | 9-element float array | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] |
labelEmbed | 384-element float array | 384 × 0.0 |
summaryEmbed | 384-element float array | 384 × 0.0 |
Request Body
No request body is required. The endpoint identifies the user from the JWT access token in theAuthorization header.
Responses
200 OK
Returned when theUserProfile is successfully reset.
A confirmation string. Value is always
"user profile is reset.".200 OK
401 Unauthorized
Returned when theAuthorization header is absent, the access token is missing, or the token has expired.
401 Unauthorized
After receiving a
200 response, direct the user to the preferences onboarding flow — call Set Preferences with a fresh set of preferences and labels before fetching recommendations. Fetching recommendations immediately after a reset will work but will return generic, non-personalised results.Examples
Typical use cases
- User requests a fresh start — A settings screen “Reset my preferences” action calls this endpoint, then navigates the user back to the onboarding preference selector.
- Testing & development — Quickly wipe a test account’s preference vectors without deleting and re-registering the account.
- Profile corruption recovery — If a
UserProfilerecord is detected to be in an inconsistent state, this endpoint provides a guaranteed-clean reset viaupdate_or_create.