Projekty
APIProfile

Get own profile

Returns the profile of the authenticated user and their cars.

GET
/api/profile/me

Returns the profile of the authenticated user and their cars.

Authorization

sessionAuth
cookiebetter-auth.session_token<token>

Better Auth session cookie (on HTTPS: __Secure-better-auth.session_token), forwarded to the login server's /api/auth/get-session

Response Body

OK

application/json
  1. response
user?|null
cars*array<>
Example Request
curl -X GET 'https://example.com/api/profile/me'
Example Response
{  "user": {    "userId": "string",    "displayName": "string",    "phone": "string",    "avatarUrl": "string",    "bio": "string",    "totalRidesAsDriver": 0,    "totalRidesAsPassenger": 0,    "averageRating": 0,    "reviewCount": 0,    "isPhoneVerified": true,    "createdAt": "string",    "updatedAt": "string"  },  "cars": [    {      "id": "string",      "userId": "string",      "brand": "string",      "model": "string",      "year": 0,      "color": "string",      "photoUrl": "string",      "doors": 0,      "seats": 0,      "bodyType": "string",      "trunkCapacityLiters": 0,      "isDeleted": true,      "createdAt": "string"    }  ]}