How to Make an API - Validate Email Demo

Here is an example of how you can create your own API. This is the semo for the tutorial, but it is also a fully functioning API - albeit extremely simplistic.

API Usage Information

The validateemail query provides email address validation.

Input Parameters:

NameData TypeRequired/OptionalDescription
emailstringrequiredThe email address to be validated
formatstringoptionalThe format the response will be returned in

Format Options:

Sample Request:

http://www.cagintranet.com/code/validateemail/?email=[email-address]&format=[format]

Sample VALID XML Response:
Status = 1

<validated>
   <status>0</status>
   <address>admin@cagintranet.com</address>
   <username>admin</username>
   <domain>cagintranet.com</domain>
</validated>

Sample NONVALID XML Response:
Status = 0

<validated>
   <status>0</status>
   <address>bad@cagintranet.com</address>
   <username>bad</username>
   <domain>cagintranet.com</domain>
</validated>
`