> ## Documentation Index
> Fetch the complete documentation index at: https://docs.medisync.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Profile

> Retrieve the authenticated user's profile

## Overview

Returns the profile of the authenticated user. The user is identified entirely from the JWT — there is no user-id parameter, and you can only retrieve your own profile.

## Authentication

<ParamField header="Authorization" type="string" required>
  `Bearer <JWT>` obtained from [login](/api-reference/auth/login).
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` on success.
</ResponseField>

<ResponseField name="data" type="object">
  The user's profile.

  <Expandable title="data">
    <ResponseField name="name" type="string">Full display name (title + first + last).</ResponseField>
    <ResponseField name="email" type="string">Email address.</ResponseField>
    <ResponseField name="firstName" type="string">First name.</ResponseField>
    <ResponseField name="lastName" type="string">Last name.</ResponseField>
    <ResponseField name="title" type="string">Medical title.</ResponseField>
    <ResponseField name="specialty" type="string">Medical specialty.</ResponseField>
    <ResponseField name="subscriptionType" type="string">Subscription type (e.g. `individual`, `team`).</ResponseField>
    <ResponseField name="subscriptionActive" type="boolean">Whether the subscription/trial is currently active.</ResponseField>
    <ResponseField name="subscriptionExpiry" type="string">Subscription/trial expiry (ISO 8601).</ResponseField>
    <ResponseField name="teamId" type="string | null">Team id, or `null` for individual accounts.</ResponseField>
    <ResponseField name="teamRole" type="string | null">Role within the team, or `null`.</ResponseField>
    <ResponseField name="hasTeamSubscription" type="boolean">Whether the account is covered by a team subscription.</ResponseField>
  </Expandable>
</ResponseField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://app.medisync.me/api/user/profile \
    -H "Authorization: Bearer YOUR_JWT_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.medisync.me/api/user/profile', {
    headers: { 'Authorization': `Bearer ${token}` }
  });
  const data = await response.json();
  ```
</CodeGroup>

## Example Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "data": {
      "name": "Dr. John Doe",
      "email": "doctor@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "title": "Dr.",
      "specialty": "Cardiology",
      "subscriptionType": "individual",
      "subscriptionActive": true,
      "subscriptionExpiry": "2026-12-31T23:59:59.000Z",
      "teamId": null,
      "teamRole": null,
      "hasTeamSubscription": false
    }
  }
  ```
</ResponseExample>

## Error Responses

<CodeGroup>
  ```json 401 Missing or invalid token theme={null}
  {
    "success": false,
    "message": "Unauthorized"
  }
  ```

  ```json 401 Session revoked (signed in elsewhere) theme={null}
  {
    "success": false,
    "message": "Session ended on this device because you signed in elsewhere.",
    "code": "SESSION_REVOKED"
  }
  ```

  ```json 404 User not found theme={null}
  {
    "success": false,
    "error": "Benutzer nicht gefunden"
  }
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    How tokens and authorization work.
  </Card>

  <Card title="Appointments" icon="calendar-days" href="/api-reference/appointments/list-by-doctor">
    List the authenticated doctor's appointments.
  </Card>
</CardGroup>
