## Authentication (`auth`)

Password reset. Login, token and one-time-code endpoints are for the console only and are not open to the public.

Authentication: No auth · Docs: https://www-sa2.kuxitong.com/en/docs/api/auth

### POST `/api/v2/auth/password-reset`

Reset password · Authentication: No auth

Request body:

| Field | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Recover by email or by phone number Values: ["email","sms"] |
| `code` | string | Yes | Verification code sent to target (POST /verify-codes, purpose=reset_password) |
| `new_password` | string | Yes | New password, 8 to 128 characters |
| `target` | string | Yes | Email or phone number bound to the account |

```sh
curl -X POST "https://panel.example.com/api/v2/auth/password-reset" \
  -H "Content-Type: application/json" \
  -d '{"channel":"email","code":"123456","new_password":"${NEW_PASSWORD}","target":"user@example.com"}'
```

Authentication object:

| Field | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Recover by email or by phone number Values: ["email","sms"] |
| `code` | string | Yes | Verification code sent to target (POST /verify-codes, purpose=reset_password) |
| `new_password` | string | Yes | New password, 8 to 128 characters |
| `target` | string | Yes | Email or phone number bound to the account |
