Skip to main content

Documentation 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.

The registration endpoint creates a new Django 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

MethodPOST
Path/api/user/register/
Auth requiredNo
Content-Typeapplication/json

Request Body

username
string
required
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.
password
string
required
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 associated UserProfile are created successfully.
message
string
A human-readable confirmation string. Value is always "User registered successfully".
201 Created
{
  "message": "User registered successfully"
}

400 Bad Request

Returned when the username is already taken or the request body fails serializer validation.
username
string
An error message describing the conflict. Value is always "Username already exists" when the username is not unique.
400 Bad Request
{
  "username": "Username already exists"
}
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

curl --request POST \
  --url http://localhost:8000/api/user/register/ \
  --header 'Content-Type: application/json' \
  --data '{
    "username": "jane_doe",
    "password": "secureP@ssw0rd"
  }'

What gets created

When this endpoint returns 201, two database records exist for the new user:
RecordFieldInitial value
UserusernameValue from request body
UserpasswordHashed value of the supplied password
UserProfilelabelMHE[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] (9 zeros)
UserProfilelabelEmbed384-dimensional zero vector
UserProfilesummaryEmbed384-dimensional zero vector

Build docs developers (and LLMs) love