Tests the mail server configuration (basic auth or OAuth2). Returns 200 if the connection is successful, or 400 if it fails.
Headers
-
API token (can be retrieved from account settings)
-
ID of organization, for which the operation must be performed
POST
/api-v1/mail-server/test-connection
curl \
--request POST 'https://wyzio.app/api-v1/mail-server/test-connection' \
--header "Content-Type: application/json" \
--data '{
"id": 42,
"host": "string",
"port": 42,
"secureConnectionType": "TLS",
"userName": "string",
"password": "string",
"useAuth": true,
"fromEmail": "string",
"authType": "BASIC",
"oauthProvider": "GOOGLE",
"clientId": "string",
"oauthScopes": "string",
"requiresReauth": true,
"basicAuth": true,
"oauth": true
}'
Request examples
# Headers
# Payload
{
"id": 42,
"host": "string",
"port": 42,
"secureConnectionType": "TLS",
"userName": "string",
"password": "string",
"useAuth": true,
"fromEmail": "string",
"authType": "BASIC",
"oauthProvider": "GOOGLE",
"clientId": "string",
"oauthScopes": "string",
"requiresReauth": true,
"basicAuth": true,
"oauth": true
}
Response examples (200)
{
"isSuccessful": true,
"errorType": "VALIDATION_ERROR",
"message": "string"
}