Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/RafaeltiMoreira/mais-habito-api/llms.txt

Use this file to discover all available pages before exploring further.

GET /api/user/profile Requires authentication.
Authorization
string
required
Bearer token obtained from /api/auth/login or /api/auth/signup. Format: Bearer <token>.

Example

curl --request GET \
  --url http://localhost:3000/api/user/profile \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'

Response

200 OK
id
string
required
Unique identifier for the user.
name
string
required
The user’s display name.
email
string
required
The user’s email address, sourced from the local auth provider.
profile_picture
string
URL of the user’s profile picture. null if not set.
points
number
required
Total habit points accumulated.
current_streak
number
required
Current consecutive days with at least one completed habit.
max_streak
number
required
All-time highest streak.
created_at
string
required
ISO 8601 timestamp of when the account was created.
updated_at
string
required
ISO 8601 timestamp of the last profile update.
Example response
{
  "id": "a3f2c1d0-89b4-4e7a-b6f5-1234567890ab",
  "name": "Maria Silva",
  "email": "maria@example.com",
  "profile_picture": "https://example.com/avatars/maria.jpg",
  "points": 120,
  "current_streak": 5,
  "max_streak": 14,
  "created_at": "2026-01-10T08:30:00.000Z",
  "updated_at": "2026-03-15T14:22:00.000Z"
}

Errors

StatusDescription
401Missing, invalid, or expired token.

Build docs developers (and LLMs) love