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

# GET /me — Inspect the Authenticated User's Identity

> Returns the authenticated user's username, permissions, and role. Useful for verifying which operations your current token is authorized to perform.

Use this endpoint to inspect the identity associated with your current access token or Basic Auth credentials. It returns your username, assigned role, and the full list of permissions your account holds. This is especially useful immediately after login to confirm what your token is authorized to do, or during debugging to rule out permission-related issues.

```http theme={null}
GET https://api.avalex.com/me
```

<Note>
  This endpoint requires authentication. Include your JWT token in the `Authorization: Bearer` header, or provide your credentials as HTTP Basic Auth.
</Note>

## Authentication

This endpoint accepts either of the following authentication schemes:

* **JWT Bearer Token** — `Authorization: Bearer <token>`
* **HTTP Basic Auth** — `Authorization: Basic <base64(username:password)>`

## Request Parameters

This endpoint takes no query parameters, path parameters, or request body.

### Request Example

```bash theme={null}
curl https://api.avalex.com/me \
  -H "Authorization: Bearer <your-token>"
```

## Response — 200 OK

Returns a single object describing the authenticated user.

<ResponseField name="username" type="string">
  The username of the currently authenticated staff account.
</ResponseField>

<ResponseField name="isMasterAdmin" type="boolean">
  `true` if this account is the Master Admin; `false` for all other accounts. The Master Admin account has unrestricted access across all resources regardless of role or permission assignments.
</ResponseField>

<ResponseField name="permissions" type="string[]">
  An array of permission strings the caller currently holds, for example `customers:read`, `licenses:write`, or `actions:read`. Cross-reference this list against the required permissions documented on each endpoint to determine whether your token is authorized to make a given request.
</ResponseField>

<ResponseField name="role" type="string">
  The name of the role assigned to this account, for example `Support` or `Admin`.
</ResponseField>

### Response Example

```json theme={null}
{
  "username": "ada",
  "isMasterAdmin": false,
  "permissions": ["customers:read", "customers:write"],
  "role": "Support"
}
```

<Tip>
  Call `GET /me` immediately after login to confirm the permissions your token carries. This is the fastest way to verify that the correct role has been assigned before making downstream requests.
</Tip>
