:::endpoint GET /v1/me

One call rather than five, because a cold start on a phone pays for every round
trip. Who you are, what you may do, which scopes this device holds, and which
mailboxes you can open.

## Request

```bash
curl https://api.proppertrading.com/v1/me \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f"
```

## Response

```json
{
    "data": {
        "object": "me",
        "id": 4182,
        "name": "Jamie Rivera",
        "email": "jamie@acmefunded.com",
        "locale": "en",
        "type": "trader",
        "role": "Support",
        "two_factor": true,
        "workspace": {
            "id": "acme",
            "name": "Acme Funded",
            "platform": false
        },
        "permissions": ["view_mailbox", "manage_tickets"],
        "scopes": ["me:read", "mail:write"],
        "mailboxes": [
            {
                "id": 32,
                "email": "support@mail.acmefunded.com",
                "name": "Acme Support"
            }
        ],
        "unread": 7
    },
    "meta": { "request_id": "req_01kz4bkr1aj1gv63d8fv3133ey" }
}
```

| Field         | Description                                                                                                                                        |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`        | `trader`, `propfirm` or `superadmin`. Staff are traders carrying a role                                                                            |
| `role`        | The name of their role, or null for an account that owns the environment                                                                           |
| `permissions` | Slugs this account holds. `["*"]` means a role that holds everything. Empty for accounts that own the environment, which may do everything by type |
| `scopes`      | What this device holds, which may be narrower than what it asked for                                                                               |
| `mailboxes`   | The mailboxes this person may read. Empty without `view_mailbox`                                                                                   |
| `unread`      | Unread messages across those mailboxes, for a badge                                                                                                |

## Permissions and scopes are both ceilings

An action needs the scope on the device and the permission on the account. Draw
your interface from `permissions`, and expect a `403` anyway if a role changes
between the call and the tap.

`["*"]` rather than the full list is deliberate: a list would be yesterday's set
the moment a permission is added, and the client would disagree with the server
about a screen nobody had touched.

## Errors

| Status | Code                 | Meaning                                         |
| ------ | -------------------- | ----------------------------------------------- |
| 401    | `invalid_token`      | Not a token, or the secret does not match       |
| 401    | `revoked_token`      | Signed out here or from another device          |
| 401    | `expired_token`      | Ninety days without use, or a set expiry passed |
| 403    | `insufficient_scope` | This device does not hold `me:read`             |