This endpoint validates an email address in real-time to check whether it's capable of receiving email. It performs checks on the syntax of the email address, the associated MX record and the individual mailbox. It identifies disposable email addresses (DEAs) and provides alternative suggestions if typos are detected.
Request URL
https://ws.postcoder.com/pcw/{apikey}/email/{email}
Path parameters
Parameter | Description | Example |
---|---|---|
apikey | Your API key | PCW45-12345-12345-1234X |
email | The URL-encoded email address you wish to validate | jo@gmail.com |
Querystring parameters
Parameter | Description | Example |
---|---|---|
format | Sets the format of the response, xml or json (default unless "application/xml" header is detected) | format=json |
identifier | Specifies your own meaningful identifier for the request such as "websiteA" or "client123"; you can view usage for each identifier on the Identifier Usage page, which may be helpful when using your API key across multiple websites, apps or clients | identifier=websiteA |
timeout | Sets the maximum time in milliseconds to wait for the request to complete; the timeout should be an integer between 1000 and 120000, the default is 10000 | timeout=2000 |
Example request and response
https://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/email/sales%40alliescomputing.com?format=json
{
"warning": "This is a test key do NOT use it live (always returns true)",
"state": "Test Key",
"valid": true,
"score": "100",
"processtime": "0"
}
Response fields
Field | Description | Example |
---|---|---|
warning | An advisory message about the validation process | Only reduced validation is available for this domain |
state | One of the following states, which may change from time to time:
| Test Key |
valid | A true or false indicating whether the email address is valid | true |
score | A validation score between 0 to 100 where higher is better | 100 |
processtime | The time spent processing the validation, measured in ms | 321 |
alternative | A did-you-mean-style alternative spelling where possible | jo@gmail.com |
Integration advice
- URL encode all special characters (including /) in your request parameters with %xx encoding
- Verify your request was successful by checking for an HTTP status code of 200; see all HTTP status codes with descriptions
- When using your API key across multiple websites, apps or clients, set the
identifier
querystring parameter to a meaningful value such as "websiteA" or "client123"; you'll then be able to view these identifiers and the number of requests made by each one on the Identifier Usage page - Requests will usually return within a second but may take longer depending on the email address provider; use the
timeout
querystring parameter to set a maximum time to wait - Treat all response fields as optional
Credit cost
Each request costs 1.2 credits.
Buy a credit pack or set up a monthly plan to use with all Postcoder endpoints.