## Verification codes (`verify-codes`)

No authentication needed. Sends email or SMS codes for binding at registration, password reset and second-factor login; SMS needs a captcha.

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

### POST `/api/v2/verify-codes`

Send verification code · Authentication: No auth

Request body:

| Field | Type | Required | Description |
|---|---|---|---|
| `account` | string |  | Login name (required for login) |
| `captcha_code` | string |  | Characters shown in the captcha image (required when sending SMS) |
| `captcha_id` | string |  | Captcha id (required when sending SMS) |
| `channel` | string | Yes | Delivery channel: email or sms Values: ["email","sms"] |
| `purpose` | string | Yes | Purpose: bind (registration or rebinding), reset_password, or login (second factor) Values: ["bind","reset_password","login"] |
| `target` | string |  | Email or phone number (required for bind and reset_password) |

```sh
curl -X POST "https://panel.example.com/api/v2/verify-codes" \
  -H "Content-Type: application/json" \
  -d '{"channel":"email","purpose":"bind","target":"alice@example.com"}'
```

Verification codes object:

| Field | Type | Required | Description |
|---|---|---|---|
| `account` | string |  | Login name (required for login) |
| `captcha_code` | string |  | Characters shown in the captcha image (required when sending SMS) |
| `captcha_id` | string |  | Captcha id (required when sending SMS) |
| `channel` | string | Yes | Delivery channel: email or sms Values: ["email","sms"] |
| `expires_in` | integer |  | Validity in seconds |
| `purpose` | string | Yes | Purpose: bind (registration or rebinding), reset_password, or login (second factor) Values: ["bind","reset_password","login"] |
| `resend_in` | integer |  | Seconds before the code can be resent |
| `target` | string |  | Email or phone number (required for bind and reset_password) |
| `to` | string |  | Masked recipient address |
