ValidateHtml

Evaluate a Test to check for errors and warnings that could hinder the email's deliverability. Any deliverability errors will be return details on the problem as well as the accompanying line number.

URLs:

Sandbox:

https://sandbox.emailonacid.com/v4/validateHtml - Default (XML) Request
https://sandbox.emailonacid.com/v4/validateHtml/xml - XML Request
https://sandbox.emailonacid.com/v4/validateHtml/json - JSON Request

Production:

https://api.emailonacid.com/v4/validateHtml - Default (XML) Request
https://api.emailonacid.com/v4/validateHtml/xml - XML Request
https://api.emailonacid.com/v4/validateHtml/json - JSON Request

Request:

XML

<?xml version="1.0" encoding="utf-8"?>
<validate_html>
    <eoa_test_id>UNIQUE EMAIL TEST ID</eoa_test_id>
</validate_html>

JSON

{
    "eoa_test_id" : UNIQUE EMAIL TEST ID
}

Request Details

Element Description Data Type Required
eoa_test_id The reference id for the test to retrieve Integer Y

Response:

XML

<?xml version="1.0" encoding="utf-8"?>
<xml>
    <html_validation>
        <validation_message>
            <severity>Warning</severity>
            <line>11</line>
            <column>1</column>
            <message><![CDATA[<meta> element not empty or not closed]]></message>
        </validation_message>
      .....
    </html_validation>
</xml>

JSON

{
    "html_validation":
    [
        {
            "validation_message":
            {
                "severity"  : "Warning",
                "line"      : "11",
                "column"    : "1",
                "message"   : "<meta> element not empty or not closed"
            }
        },
        ....
    ]
}

Response Details

Element Description Data Type
html_validation Object containing validation_messages. Object / Has Children
validation_messages Set of messages notifying of possible issues with submitted code. Array / Has Children
validation_message A single message notifying of possible issues with submitted code. Object / Has Children
severity An indicator of the severity of the found error. Alpha-numeric String
line The line number in the submitted file. Alpha-numeric String
column Your HTML after undergoing the optimization process. Alpha-numeric String
message Why the code was an issue. Alpha-numeric String