API Documentation

 

Postman Integration

Email on Acid has a Postman Collection available for quick and easy exercise of our REST-based Analytics API. Variables for API credentials and other data elements can be found at the collection level. Use the button below for easy import into Postman. Don’t have Postman? Click here.

 

Authentication

All calls in this version are JSON, and must be authenticated with HTTP Basic Authentication. You will be provided with an API key, and your password is configurable through the web portal. The header should be the string <api_key>:<account_password> encoded in base-64. An example of this header is below.

Authorization: Basic WW91ck93bkFjY291bnRzRW1haWxPbkFjaWRBUElLZXkwMTIzNDU2Nzg5OllvdXJTZWN1cmVQYXNzd29yZA==

Testing Your Settings

URL:

GET https://api.emailonacid.com/v5/analytics/analytics_auth

Example Response:

{
    "success": true
}

This URL will respond with error information if your request was set incorrectly.

RESTful

The API seeks to follow broad tenets of RESTful application within each resource type, but is not strictly constrained by those standards. Each method will describe an endpoint and HTTP method to use to access it.

Headers:

We expect each request with a body to be provided as JSON, and if an Accept header is provided, it must accept application/json

Accept: application/json
Content-Type: application/json

If the header does not match, an error will be generated and sent as the response. Details on errors can be found further down this page.

Validation

As you go through these docs, each call will explain which fields are required. If we cannot understand your request, an error will be returned explaining how to fix your request.

API Error Codes

Our API will return an error if something goes wrong in the processing, or your request contains incomplete/invalid data.

Note: All error responses will also have a Status Code of 400 or greater, depending on the error.

Example Error Response:

{
    "error": {   
        "name":"ErrorActivatingCampaign",
        "message":"Something went wrong while trying to activate your campaign. Please try again."
    }
}
Error Types and Messages:

Type Message
AccessDenied Invalid API key or password.
NoAccept The server is unable to provide a response in the requested format.
ErrorCreateCampaign Something went wrong while trying to create your campaign. Please try again.
NoContent You have not submitted content with a POST or PUT request.
ErrorUpdateCampaign Something went wrong while trying to update that campaign. Please try again.
ErrorGetCampaign Something went wrong while trying to get that campaign. Please try again.
InvalidData The name field is required.
InvalidData The total_subscribers field is required.
InvalidURL Could not validate provided URL.
InvalidData The guid is missing or malformed. Please submit a valid guid.
NoCampaigns There are no Campaigns for the supplied GUID.
InvalidData Total subscribers must be an integer.
CampaignAlreadyActive This campaign is already activated.
CannotClearData This campaign has already been activated. You cannot clear data from an active campaign.
ErrorActivatingCampaign Something went wrong while trying to activate your campaign. Please try again.
InvalidData The date field is required.
InvalidData Invalid expiration date submitted. The date must be in the following format - 'YYYY-MM-DD'.
InvalidData The date must be in the following format - 'YYYY-MM-DD'.
CampaignNotActive Campaign is not active. This action can only be applied to an active campaign.
ExpirationLessThanMinimum A campaign must 'run' a minimum of 30 days. Please adjust the expiration date.
ExpirationMaximumExceeded Campaign expiration date cannot be more than 3 years from campaign start date. Please adjust the expiration date.