Email Validation
Verify email addresses in real-time. Detect disposable, invalid, and mistyped addresses.
GET
/v1/email/validateValidate an email address by checking its format, domain MX records, and whether it belongs to a disposable email provider. Optionally suggests corrections for common typos (e.g., gmial.com to gmail.com).
Authentication
Requires x-api-key header. See Authentication.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | The email address to validate. | |
| check_mx | boolean | No | true | Whether to check MX records for the domain. |
| suggest | boolean | No | true | Whether to suggest corrections for typos. |
Example Request
-blue-400 font-semibold">curl -X GET -emerald--amber-400">400">"https://api.aicores.io/v1/email/validate?email=john@gmial.com" \
-H -emerald--amber-400">400">"x-api-key: sk_live_your_key_here"Example Response
{
400">"email": 400">"john@gmial.com",
400">"valid": false,
400">"disposable": false,
400">"mx_found": false,
400">"format_valid": true,
400">"did_you_mean": 400">"john@gmail.com",
400">"domain": 400">"gmial.com",
400">"free_provider": false
}Response Fields
| Field | Type | Description |
|---|---|---|
| string | The email address that was validated | |
| valid | boolean | Whether the email is considered valid |
| disposable | boolean | Whether the email uses a disposable provider |
| mx_found | boolean | Whether MX records exist for the domain |
| format_valid | boolean | Whether the email format is syntactically correct |
| did_you_mean | string | null | Suggested correction if a typo was detected |
| domain | string | The domain portion of the email |
| free_provider | boolean | Whether the domain is a free email provider (Gmail, Yahoo, etc.) |
Error Codes
| Status | Error | Description |
|---|---|---|
| 400 | invalid_email | The email parameter is missing or empty. |
| 401 | unauthorized | Missing or invalid API key. |
| 429 | rate_limit_exceeded | Too many requests. Retry after the specified delay. |