## Current user (`me`)

The signed-in user views or edits their own profile and real-name verification.

Authentication: User · Docs: https://www-sa2.kuxitong.com/en/docs/api/me

### GET `/api/v2/me`

Get current user · Authentication: User

```sh
curl "https://panel.example.com/api/v2/me" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

### PUT `/api/v2/me`

Update profile · Authentication: User

Request body:

| Field | Type | Required | Description |
|---|---|---|---|
| `email` | string |  | Email |
| `email_code` | string |  | Code sent to the new email (POST /verify-codes, purpose=bind); required when changing the email |
| `login_ip_allow` | string[] |  | Login IP allowlist (IPs or CIDRs); empty means no restriction |
| `login_verify` | LoginVerify |  | Second-factor login: none means not required; email / sms also require an email/SMS code at login (the platform must allow it and the address must be bound) Values: ["none","email","sms"] |
| `nickname` | string |  | Nickname; empty when not set (the UI shows the username) |
| `password` | string |  | Current login password; changing the email, phone, login IP allowlist or second-factor login needs this or totp_code. |
| `phone` | string |  | Phone number |
| `phone_code` | string |  | Code sent to the new phone number (POST /verify-codes, purpose=bind); required when changing the phone number |
| `totp_code` | string |  | Current 6-digit TOTP code; the account must have TOTP enabled. |

```sh
curl -X PUT "https://panel.example.com/api/v2/me" \
  -H "X-API-Key: $GOCDN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login_ip_allow":["192.0.2.0/24"],"password":"${CURRENT_PASSWORD}"}'
```

### GET `/api/v2/me/certification`

Get real-name verification status · Authentication: User

```sh
curl "https://panel.example.com/api/v2/me/certification" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

### POST `/api/v2/me/certification`

Submit real-name verification · Authentication: User

Request body:

| Field | Type | Required | Description |
|---|---|---|---|
| `id_number` | string | Yes | Masked ID number |
| `real_name` | string | Yes | Masked real name |

```sh
curl -X POST "https://panel.example.com/api/v2/me/certification" \
  -H "X-API-Key: $GOCDN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id_number":"11010519491231002X","real_name":"张三"}'
```

Current user object:

| Field | Type | Required | Description |
|---|---|---|---|
| `avatar_ver` | integer |  | Avatar version, increases on every upload; empty when there is no avatar |
| `balance_cents` | integer |  | Account balance in cents, same as balance_cents of GET /users/{user_id}/account (0 when there is no account). Only present in the GET /users list, not in single-user responses (read-only) |
| `certified` | boolean |  | Whether real-name verification has passed |
| `client_ip` | string |  | Source IP of this request, derived the same way as the login IP allowlist check (what the allowlist compares is what is shown). Only present in GET /me and PUT /me (read-only) |
| `created_at` | string |  | Created at (read-only) |
| `currency` | CurrencyBrief |  | Account currency (ISO 4217) and symbol; balance, recharges and orders use it, and the panel formats amounts with it; the new-user default when there is no account yet (read-only) |
| `delegated_session` | boolean |  | Whether the current session was issued by superadmin sign-in or switch-to-user (if so, password, email, phone, login allowlist, login verification and real-name are read-only). Only present in GET /me and PUT /me (read-only) |
| `email` | string |  | Email |
| `email_code` | string |  | Code sent to the new email (POST /verify-codes, purpose=bind); required when changing the email |
| `enabled` | boolean |  | Whether enabled |
| `id` | integer |  | Record ID (read-only) |
| `id_number` | string |  | Masked ID number |
| `ip_site_new` | boolean |  | The user has an in-use (not expired) package that opens IP sites, so they can create IP sites, pick new IPs, issue paid ZeroSSL (zerossl_api) certificates and set API keys on ZeroSSL accounts. Only present in GET /me; always true for admins (read-only) |
| `ip_site_on` | boolean |  | ip_site_new is true, or the user already owns an IP site, an IP certificate (all SANs are IPs) or a ZeroSSL account with an API key (free ZeroSSL accounts do not count), so IP site menus and tabs are shown and existing data can be viewed, edited and deleted. Only present in GET /me; always true for admins (read-only) |
| `login_ip_allow` | string[] |  | Login IP allowlist (IPs or CIDRs); empty means no restriction |
| `login_verify` | LoginVerify |  | Second-factor login: none means not required; email / sms also require an email/SMS code at login (the platform must allow it and the address must be bound) Values: ["none","email","sms"] |
| `nickname` | string |  | Nickname; empty when not set (the UI shows the username) |
| `password` | string |  | Current login password; changing the email, phone, login IP allowlist or second-factor login needs this or totp_code. |
| `phone` | string |  | Phone number |
| `phone_code` | string |  | Code sent to the new phone number (POST /verify-codes, purpose=bind); required when changing the phone number |
| `provider` | string |  | Real-name verification provider |
| `real_name` | string |  | Masked real name |
| `reason` | string |  | Reason for failure |
| `role` | string |  | Account role: admin or tenant Values: ["admin","tenant"] |
| `status` | string |  | Verification status: none, pending, verified or failed Values: ["none","pending","verified","failed"] |
| `totp_code` | string |  | Current 6-digit TOTP code; the account must have TOTP enabled. |
| `totp_enabled` | boolean |  | Whether TOTP is enabled |
| `totp_recovery_left` | integer |  | Number of unused TOTP recovery codes. Only present in GET /me and PUT /me when TOTP is enabled (read-only) |
| `updated_at` | string |  | Updated at (read-only) |
| `url` | string |  | Verification URL the user must visit while pending (returned only on submission) |
| `username` | string |  | Username |
