The registration endpoint creates a new DjangoDocumentation 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.
User record and simultaneously provisions a companion UserProfile for that user. The UserProfile is zero-initialised on creation: the 9-dimensional labelMHE preference vector, the 384-dimensional labelEmbed semantic vector, and the 384-dimensional summaryEmbed vector are all set to floating-point zero. This means the account is immediately ready to accept a subsequent call to Set Preferences during onboarding, without requiring any additional setup step. No authentication is required to call this endpoint — it is publicly accessible via AllowAny permission.
Endpoint
| Method | POST |
| Path | /api/user/register/ |
| Auth required | No |
| Content-Type | application/json |
Request Body
The desired username for the new account. Must be unique across all registered users. If the username is already taken, the server responds with
400 Bad Request.The account password. Stored as a hashed value — never returned in any response. Django’s default password validators apply (minimum length, common-password check, etc.).
Responses
201 Created
Returned when the user and their associatedUserProfile are created successfully.
A human-readable confirmation string. Value is always
"User registered successfully".201 Created
400 Bad Request
Returned when the username is already taken or the request body fails serializer validation.An error message describing the conflict. Value is always
"Username already exists" when the username is not unique.400 Bad Request
After a successful registration the user’s preference profile is entirely zeroed out. Recommendations will not be meaningful until Set Preferences is called during onboarding to populate the
labelMHE, labelEmbed, and summaryEmbed vectors.Examples
What gets created
When this endpoint returns201, two database records exist for the new user:
| Record | Field | Initial value |
|---|---|---|
User | username | Value from request body |
User | password | Hashed value of the supplied password |
UserProfile | labelMHE | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] (9 zeros) |
UserProfile | labelEmbed | 384-dimensional zero vector |
UserProfile | summaryEmbed | 384-dimensional zero vector |