Every API request will require an API Key and Password. The API credentials need to be sent using HTTP Basic Authentication. As an added form of security, our system will also check the requesting IP address to make sure it matches the IP Address(es) set in your API account settings. The IP Address(es) can either be a single IP or an IP address range. We highly recommend using an SSL connection to prevent others from potentially confiscating your credentials.
There is a sandbox zone setup so you can test every request in our API without being charged. However, the sandbox will always return the same
result for each individual API request. The sandbox can be accessed by using the following URL (not available via SSL):
Our Analytic API uses the RESTful XML architecture. The system will only accept POST requests and must contain the following HTTP headers:
If those headers are not present, an error will be generated and sent as the response. Details on errors are described here.
Every API request will be validated against our .XSD file. If the request does not validate, an error will be generated and sent as the response. The .XSD file can be downloaded here.
API Error Codes
Our API will return an error (or exception) if something goes wrong in the processing or your request contains incomplete/invalid data.Error Response:
<?xml version="1.0" encoding="utf-8"?> <xml> <error> <error_type>EOAExcpetion:InvalidTestID</error_type> <message>The test ID you have requested could not be found. It may be that the test does
exist but the account you're authenticating with does not have access to it.</message> </error> </xml>
Error Types and Messages:
||Invalid Header Content-Type and Content-Accept values. These must both be present and set to application/xml.|
||Your POSTed XML failed to parse. Please check its validity.|
||The XML supplied did not validate against our XSD. Please review our XSD and update your XML accordingly.|
||You are attempting to request a resource that doesn't exist, or requesting an existing resource with an unsupported request method.|
||An error has occurred while loading your email content. It appears that all of your email content was removed after we ran it through our content filters. Please check your email content and try the test again.|
||There are no campaigns for the supplied GUID.|
||Click tracking is not enabled for this campaign.|
||Campaign is already active.|
||Action cannot be applied to an inactive campaign.|
||A campaign cannot expire within 30 days of its start date.|
||Campaign cannot last more than 3 years from its start date. Please adjust the expiration date.|