Skip to main content

User Profiles

User profiles are the foundation of your personalized MayTravel experience. Your profile stores your account information, travel interests, and preferences that power AI-generated recommendations.

Profile Components

Each user profile consists of:

Account Information

Username, email, and secure authentication credentials for accessing the platform.

Travel Interests

Your selected interests that guide AI recommendations and trip planning.

Trip History

All trips you’ve created, providing context for future recommendations.

Role & Permissions

Account type and access levels within the platform.

Creating Your Profile

Get started by registering a new account:
POST /api/auth/register

{
  "username": "traveler123",
  "email": "traveler@example.com",
  "password": "securepassword"
}

Response:
{
  "message": "User registered successfully"
}
Your account is created with a default user role, giving you access to all travel planning features.

Authentication

Log in to access your profile and trips:
POST /api/auth/login

{
  "identifier": "traveler123",  // Username or email
  "password": "securepassword"
}

Response:
{
  "message": "Login exitoso",
  "token": "JWT_GENERADO_AQUI",
  "user": {
    "user": "traveler123",
    "email": "traveler@example.com",
    "role": "user"
  }
}
You can log in using either your username or email address as the identifier.

Managing Profile Information

Viewing Your Profile

Retrieve your profile details:
GET /api/users/:id

Response:
[
  {
    "id": 1,
    "username": "traveler123",
    "email": "traveler@example.com",
    "role": "user"
  }
]

Updating Profile Information

Modify your username, email, or password:
PUT /api/users/:id

{
  "username": "newtraveler",
  "email": "newemail@example.com",
  "password": "newpassword"
}

Response:
{
  "mssg": "User ID 1 updated successfully"
}
All fields (username, password, email) must be provided when updating your profile, even if only changing one field.

Interest Management

Viewing Your Interests

See all interests associated with your profile:
GET /api/users/:id/interests

Response:
{
  "user_id": 1,
  "username": "traveler123",
  "email": "traveler@example.com",
  "interests": [
    {
      "interest_id": 3,
      "interest_name": "Architecture"
    },
    {
      "interest_id": 7,
      "interest_name": "Local Cuisine"
    },
    {
      "interest_id": 12,
      "interest_name": "Photography"
    }
  ]
}

Adding Interests to Your Profile

Attach multiple interests at once to enhance your recommendations:
POST /api/users/:id/interests

{
  "interests_id": [3, 7, 12, 15]
}

Response:
{
  "message": "interests attached to the user correctly"
}
The AI uses these interests to personalize every trip itinerary it generates for you.
Add 5-10 diverse interests for the best recommendations. Mix general categories (“Culture”, “Nature”) with specific ones (“Street Art”, “Coastal Hiking”).

Profile and AI Recommendations

Your profile directly influences how the AI plans your trips:
1

Interest Analysis

The AI reviews all interests in your profile to understand your travel style.
2

Priority Weighting

More specific interests receive higher priority in recommendation algorithms.
3

Context Building

Past trips and interest combinations help the AI understand preferences it should maintain.
4

Personalized Output

Each itinerary reflects your unique combination of interests and travel patterns.

Account Security

Password Storage

Passwords are stored securely in the database. Always use strong, unique passwords.

Email Verification

Your email serves as both a recovery method and login identifier.

Role-Based Access

Different roles (user, admin) control access to platform features.

Session Management

JWT tokens manage your authenticated sessions securely.

Viewing All Trips

Access your complete trip history from your profile:
GET /api/users/:id/trips

Response:
{
  "user_id": 1,
  "username": "traveler123",
  "trips": [
    {
      "id": 1,
      "title": "Summer in Barcelona",
      "shelter": { "type": "Point", "coordinates": [2.1686, 41.3874] },
      "arrd": "2026-07-15",
      "levd": "2026-07-22"
    },
    {
      "id": 2,
      "title": "Weekend in Paris",
      "shelter": { "type": "Point", "coordinates": [2.3522, 48.8566] },
      "arrd": "2026-08-10",
      "levd": "2026-08-13"
    }
  ]
}

Deleting Your Account

If you need to remove your account:
DELETE /api/users/:id

Response:
{
  "mssg": "User number 1 deleted successfully"
}
Deleting your account is permanent and will remove all associated trips and data.

Profile Best Practices

As your travel preferences evolve, update your interests to ensure recommendations stay relevant. Add new interests as you discover new passions.
Ensure your email is accurate and accessible for account recovery and future notifications.
Your username appears in trip sharing and collaboration features. Pick something you’ll remember.
Periodically review your profile and remove interests that no longer align with your travel style.

Next Steps

Add Interests

Explore available interests and add them to your profile

Create a Trip

Start planning your first AI-powered trip

API Reference

View detailed API documentation for user operations

Authentication

Learn more about authentication and security

Build docs developers (and LLMs) love