> ## Documentation Index
> Fetch the complete documentation index at: https://acm-aa28ebf6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Profile

> Read, update, or delete the authenticated user account

## Get Profile

### Endpoint

```
GET /api/v1/auth/me
```

### Headers

<ParamField header="Authorization" type="string" required>
  `Authorization: Bearer <id_token>`
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.superbox.ai/api/v1/auth/me \
    -H "Authorization: Bearer $ID_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.superbox.ai/api/v1/auth/me", {
    headers: { Authorization: `Bearer ${idToken}` },
  });

  const profile = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.superbox.ai/api/v1/auth/me",
      headers={"Authorization": f"Bearer {id_token}"},
  )

  profile = response.json()
  ```
</CodeGroup>

### Response (200)

<ResponseField name="local_id" type="string">
  Firebase user ID
</ResponseField>

<ResponseField name="email" type="string">
  Account email address
</ResponseField>

<ResponseField name="display_name" type="string">
  Display name (if set)
</ResponseField>

<ResponseField name="email_verified" type="boolean">
  Whether the email has been verified
</ResponseField>

<ResponseField name="disabled" type="boolean">
  Whether the account is disabled
</ResponseField>

```json theme={null}
{
  "local_id": "abc123def456",
  "email": "user@example.com",
  "display_name": "Your Name",
  "email_verified": true,
  "disabled": false
}
```

## Update Profile

### Endpoint

```
PATCH /api/v1/auth/me
```

### Request Body

<ParamField body="display_name" type="string">
  New display name
</ParamField>

<ParamField body="password" type="string">
  New password (minimum 8 characters)
</ParamField>

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.superbox.ai/api/v1/auth/me \
    -H "Authorization: Bearer $ID_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"display_name": "New Name"}'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.superbox.ai/api/v1/auth/me", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${idToken}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ display_name: "New Name" }),
  });
  ```

  ```python Python theme={null}
  response = requests.patch(
      "https://api.superbox.ai/api/v1/auth/me",
      headers={"Authorization": f"Bearer {id_token}"},
      json={"display_name": "New Name"},
  )
  ```
</CodeGroup>

## Delete Account

### Endpoint

```
DELETE /api/v1/auth/me
```

### Example Request

```bash theme={null}
curl -X DELETE https://api.superbox.ai/api/v1/auth/me \
  -H "Authorization: Bearer $ID_TOKEN"
```

<Warning>
  Account deletion is permanent. All servers owned by the account must be deleted first.
</Warning>

### Success Response (200)

```json theme={null}
{
  "status": "success",
  "message": "Account deleted"
}
```
