Validate IMAP
POST
/web/v1/notification/email/validate/imap WEBValidates an IMAP email server configuration by attempting to connect and authenticate.
Required Headers
| Header | Example Value | Description |
|---|---|---|
| Content-Type | application/json | Request content type |
| Accept | application/json | Expected response type |
| X-Client-Hash | Client device fingerprint | |
| Accept-Language | en, zh, zh-Hant, ja, vi | Response language (default: en) |
| Authorization | Bearer | JWT access token |
Request Parameters
Query Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
requestId | string | Required | query | Unique request ID for idempotency/tracking |
Request Body
EmailValidationRequest:
| Name | Type | Required | In | Description |
|---|---|---|---|---|
channelHost | string | Required | body | Notification channel host/access endpoint |
config | object | Required | body | Email channel configuration to validate |
config.username | string | Required | body | IMAP authentication username |
config.password | string | Required | body | IMAP authentication password |
config.imapHost | string | Required | body | IMAP server hostname |
config.imapPort | integer | Required | body | IMAP server port (1-65535) |
config.useSsl | boolean | Optional | body | Use SSL (default: true) |
config.connectionTimeout | integer | Optional | body | Connection timeout in ms (default: 10000) |
config.readTimeout | integer | Optional | body | Read timeout in ms (default: 30000) |
Success Response
Success 200
{
"code": "2000",
"message": "SUCCESS",
"data": {
"valid": true,
"results": {
"IMAP": {
"success": true,
"serverHost": "imap.example.com",
"serverPort": 993,
"connectionTimeMs": 312,
"errorCode": null,
"errorMessage": null
}
}
}
}Error Responses
| Code | Description |
|---|---|
4000 | Validation error (missing required config fields) |
4010 | Unauthorized (invalid or missing JWT token) |
4030 | Turnstile verification failed |
Notes
- This endpoint tests the IMAP connection only. Use the SMTP validation endpoint to test SMTP connectivity.
- The
requestIdquery parameter can be used for idempotency and request tracking. - A successful validation does not create or modify any channel.