Skip to main content

Endpoint

GET /profile
Retrieves the complete profile information for the currently authenticated user, including personal details, preferences, diet settings, and usage statistics.

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.

Request

No request body or parameters required.

Headers

Authorization
string
required
Bearer token for authenticationExample: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Response

success
boolean
required
Indicates if the request was successful
data
object
required
User profile object
id
string
required
Unique user identifier
email
string
required
User’s email address
name
string
required
User’s display name
avatar
string
URL to user’s profile picture
role
string
required
User role: user or admin
status
string
required
Account status: active, inactive, or banned
preferences
object
required
User preferences and settings
theme
string
UI theme: light, dark, or system
notifications
boolean
Whether notifications are enabled
soundEnabled
boolean
Whether sound effects are enabled
language
string
Interface language: pt-BR or en
fodmapPhase
string
Current FODMAP diet phase: elimination, reintroduction, or personalization
dietSettings
object
required
Diet tracking configuration
enabled
boolean
Whether diet tracking is enabled
preset
string
Diet preset: custom, maintenance, cutting, bulking, lowcarb, or balanced
limits
object
Daily nutritional limits
calories
number
Daily calorie limit
carbs
number
Daily carbohydrates limit (grams)
protein
number
Daily protein limit (grams)
fat
number
Daily fat limit (grams)
sugar
number
Daily sugar limit (grams)
fiber
number
Daily fiber limit (grams)
sodium
number
Daily sodium limit (mg)
showRemaining
boolean
Show remaining nutrients instead of consumed
showProgressBars
boolean
Display progress bars in diary
warningThreshold
number
Percentage threshold for warnings (0-100)
diaryMode
string
Diary display mode: quick or detailed
stats
object
required
User activity statistics
daysUsingApp
number
Total days using the app
totalMealsLogged
number
Total number of meals logged
totalSymptomsLogged
number
Total number of symptoms logged
currentStreak
number
Current consecutive days streak
longestStreak
number
Longest consecutive days streak
achievementsUnlocked
number
Number of achievements unlocked
foodsTested
number
Number of foods tested
triggersIdentified
number
Number of trigger foods identified
lastActive
string
ISO 8601 timestamp of last activity
createdAt
string
required
ISO 8601 timestamp of account creation
updatedAt
string
required
ISO 8601 timestamp of last profile update

Example

curl -X GET https://api.ceboelha.com/profile \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

{
  "success": true,
  "data": {
    "id": "507f1f77bcf86cd799439011",
    "email": "[email protected]",
    "name": "João Silva",
    "avatar": "https://example.com/avatar.jpg",
    "role": "user",
    "status": "active",
    "preferences": {
      "theme": "dark",
      "notifications": true,
      "soundEnabled": true,
      "language": "pt-BR",
      "fodmapPhase": "elimination"
    },
    "dietSettings": {
      "enabled": true,
      "preset": "balanced",
      "limits": {
        "calories": 2000,
        "carbs": 225,
        "protein": 75,
        "fat": 65,
        "sugar": 40,
        "fiber": 28,
        "sodium": 2300
      },
      "showRemaining": true,
      "showProgressBars": true,
      "warningThreshold": 80,
      "diaryMode": "quick"
    },
    "stats": {
      "daysUsingApp": 45,
      "totalMealsLogged": 120,
      "totalSymptomsLogged": 30,
      "currentStreak": 7,
      "longestStreak": 14,
      "achievementsUnlocked": 5,
      "foodsTested": 25,
      "triggersIdentified": 3,
      "lastActive": "2026-03-03T14:30:00.000Z"
    },
    "createdAt": "2026-01-15T10:00:00.000Z",
    "updatedAt": "2026-03-03T14:30:00.000Z"
  }
}

Error Responses

401 Unauthorized

{
  "success": false,
  "error": "Token inválido ou expirado"
}

404 Not Found

{
  "success": false,
  "error": "Usuário não encontrado"
}

Build docs developers (and LLMs) love