CreateStandaloneSpamTest

Create a spam test without the accompanying Acid Test.

Note: In V4, the API expects the Subject and HTML (if present) fields to be Base64 encoded prior to submission.

URLs:

Sandbox:

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

Production:

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

Request for EOA/SMTP tests:

XML

<?xml version="1.0" encoding="utf-8"?>
<spam_analysis>
    <content>
        <html><![CDATA[Base64 encoded HTML content]]></html>
        <url></url>
        <charset></charset>
        <encoding></encoding>
    </content>
    <subject>Base64 encoded subject</subject>
    <from_address></from_address>
    <user_guid></user_guid>
    <test_id></test_id>
    <spam_type>smtp</spam_type>
    <spam_clients>
        <spam_client>
            <spam_code>1</spam_code>
            <spam_name>Test Client Name</spam_name>
        </spam_client>
        ....
    </spam_clients>
    <smtp_info>
        <smtp_host>mail.example.com</smtp_host>
        <smtp_port>25</smtp_port>
        <smtp_secure></smtp_secure>
        <smtp_acct>test</smtp_acct>
        <smtp_pass>examplepass</smtp_pass>
        <smtp_from>test@example.com</smtp_from>
     </smtp_info>
</spam_analysis>

JSON

{
    "content": {
        "html": "Base64 encoded HTML content",
        "url": "",
        "charset": "...",
        "encoding": "..."
    },
    "subject": "Base64 encoded subject",
    "from_address": "test@example.com",
    "user_guid": "example_user_guid",
    "test_id": "12345",
    "spam_type": "smtp",
    "spam_clients": [
        {
            "spam_code": 1,
            "spam_name": "Test Client Name"
        },
        {
            "spam_code": 2,
            "spam_name": "Another Client Name"
        },
        ...
    ],
    "smtp_info": {
        "smtp_host": "mail.example.com",
        "smtp_port": 25,
        "smtp_secure": "",
        "smtp_acct": "test",
        "smtp_pass": "examplepass",
        "smtp_from": "test@example.com"
    }
}

JSON Validation Schema:

Click here to download.

Request Details

Element Description Data Type Required
content   Array / Has Children Y, if spam_type eoa or smtp
subject Subject line of the email, encoded in Base64. String Y, if spam_type eoa or smtp
from_address Address used to send the emails. String Y, if spam_type is set to eoa
user_guid A custom guid to identify the user String N
test_id Your internal test id Integer N
spam_type Type of SPAM test to run String, must be either "seed", "smtp" or "eoa" Y
smtp_info   Array / Has Children Y, if spam_type value is smtp
smtp_host SMTP/MTA Server URL or IP address String Y, if spam_type value is smtp
smtp_port SMTP/MTA Server Port Integer Y, if spam_type value is smtp
smtp_secure Type of connection to use when connecting to the SMTP/MTA server. String, must be either "", "ssl" or "tls" Y, if spam_type value is smtp
smtp_acct Username to use when connecting to SMTP/MTA Server. String Y, if spam_type value is smtp
smtp_pass Password to use when connecting to SMTP/MTA Server. String Y, if spam_type value is smtp
smtp_from Email address to use as the "From" when we send the SPAM emails to our Seed List. String Y, if spam_type value is smtp

Request for SEED tests:

XML

<?xml version="1.0" encoding="utf-8"?>
<spam_analysis>
    <subject>Base64 encoded subject</subject>
    <from_address>from@example.com</from_address>
    <user_guid>example_user_guid</user_guid>
    <test_id>12345</test_id>
    <spam_type>seed</spam_type>
</spam_analysis>

JSON

{
    "subject": "Base64 encoded subject",
    "from_address": "from@example.com",
    "user_guid": "example_user_guid",
    "test_id": "12345",
    "spam_type": "seed"
}

JSON Validation Schema:

Click here to download.

Request Details

Element Description Data Type Required
subject Subject line of the email, encoded in Base64. String Y, if spam_type eoa or smtp
from_address Address used to send the emails. String Y, if spam_type is set to eoa
user_guid A custom guid to identify the user String N
test_id Your internal test id Integer N
spam_type Type of SPAM test to run String, must be either "seed", "smtp" or "eoa" Y

Response for EOA/SMTP tests:

Note: Reference GetStandaloneSpamResults for information on retrieving the spam results.

XML

<?xml version="1.0" encoding="utf-8"?>
<xml>
    <eoa_test_id>1</eoa_test_id>
</xml>

JSON

{
  "eoa_test_id": 1
}

Response Details

Element Description Data Type
eoa_test_id A reference id to get the results of this test at a later time. Integer

Response for SEED tests:

Note: Reference GetStandaloneSpamResults for information on retrieving the spam results.

XML

<?xml version="1.0" encoding="utf-8"?>
<xml>
    <seed_info>
        <seed_key>
            EXAMPLE_SEED_KEY
        </seed_key>
        <seed_address_list>
            test1@example.com, test2@example2.com, ...
        </seed_address_list>
    </seed_info>
    <eoa_test_id>1</eoa_test_id>
</xml>

JSON

{
  "seed_info": {
      "seed_key": "EXAMPLE_SEED_KEY",
      "seed_address_list": "test1@example.com, test2@example2.com, ..."
  }
  "eoa_test_id": 1
}

Response Details

Element Description Data Type
seed_info Array / Has Children
seed_key The seed key for your seedlist. String
seed_address_list A list of email addresses to send the SPAM test email. NOTE: When sending an email to the seed list please send one email which is sent to EVERY email account in this response. If not, the SPAM test will not process successfully. String
eoa_test_id A reference id to get the results of this test at a later time. Integer