Difference between revisions of "Domain Spam (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
(Index Safelist)
(remove accept header from examples to avoid confusion)
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Spam Settings ==
+
== v1 - Current ==
  
=== Show Spam Setting ===
+
=== Spam Settings ===
 +
 
 +
==== Show Spam Setting ====
  
 
''URL'':
 
''URL'':
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/settings</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/settings</nowiki>
  
  
Line 14: Line 16:
 
''Remarks'':
 
''Remarks'':
  
The Show operation only supports the GET HTTP verb. For .xml format, refer to the following schema document: [http://api.emailsrvr.com/Schemas/DomainSpamSetting.xsd DomainSpamSetting.xsd]
+
The Show operation only supports the GET HTTP verb.
  
  
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
get '/customers/12345678/domains/example.com/spam/settings', 'text/xml'
+
get '/customers/12345678/domains/example.com/spam/settings'
 
</pre>
 
</pre>
  
Line 49: Line 51:
 
{"filterLevel":"on","rsEmailSettings":{"spamHandling":"toAddress","hasFolderCleaner":false,"spamFolderAgeLimit":0,"spamFolderNumLimit":0,"spamForwardingAddress":"someone@mail.com"},"exchangeSettings":{"forwardToDomainQuarantine":"on","quarantineOwner":"someone@mail.com","defaultQuarantineOwner":"someone@mail.com"}}
 
{"filterLevel":"on","rsEmailSettings":{"spamHandling":"toAddress","hasFolderCleaner":false,"spamFolderAgeLimit":0,"spamFolderNumLimit":0,"spamForwardingAddress":"someone@mail.com"},"exchangeSettings":{"forwardToDomainQuarantine":"on","quarantineOwner":"someone@mail.com","defaultQuarantineOwner":"someone@mail.com"}}
  
=== Edit Spam Setting ===
+
==== Edit Spam Setting ====
  
 
''URL'':  
 
''URL'':  
  
  <nowiki>[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/settings</nowiki>
+
  <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/settings</nowiki>
  
  
Line 155: Line 157:
  
 
<pre>
 
<pre>
put '/customers/me/domains/example.com/spam/settings', 'text/xml',  
+
put '/customers/me/domains/example.com/spam/settings',  
 
{
 
{
 
   'filterLevel' => 'on',
 
   'filterLevel' => 'on',
Line 187: Line 189:
  
  
== Blacklist ==
+
=== Blacklist ===
  
=== Index Blacklist ===
+
==== Index Blacklist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/blacklist</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/blacklist</nowiki>
  
  
Line 202: Line 204:
 
''Remarks'':
 
''Remarks'':
  
The Index operation only supports the GET HTTP verb. For .xml format, refer to the following schema document: [http://api.emailsrvr.com/Schemas/Blacklist.xsd Blacklist.xsd]
+
The Index operation only supports the GET HTTP verb.
  
  
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
get '/customers/12345678/domains/example.com/spam/blacklist', 'text/xml'
+
get '/customers/12345678/domains/example.com/spam/blacklist'
 
</pre>
 
</pre>
  
Line 228: Line 230:
 
{"addresses":["name1@spam.com","name2@spam.com"]}
 
{"addresses":["name1@spam.com","name2@spam.com"]}
  
=== Add Blacklist ===
+
==== Add Blacklist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/blacklist/(email address)</nowiki>
+
  <nowiki>[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/blacklist/(email address)</nowiki>
  
  
Line 241: Line 243:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
post '/customers/12345678/domains/example.com/spam/blacklist/anyone@spam.com', 'text/xml'
+
post '/customers/12345678/domains/example.com/spam/blacklist/anyone@spam.com'
 
</pre>
 
</pre>
  
Line 261: Line 263:
 
|}
 
|}
  
=== Delete Blacklist ===
+
==== Delete Blacklist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/blacklist/(email address)</nowiki>
+
  <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/blacklist/(email address)</nowiki>
  
  
Line 274: Line 276:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
delete '/customers/12345678/domains/example.com/spam/blacklist/anyone@yahoo.com', 'text/xml'
+
delete '/customers/12345678/domains/example.com/spam/blacklist/anyone@yahoo.com'
 
</pre>
 
</pre>
  
Line 294: Line 296:
 
|}
 
|}
  
=== Edit Blacklist ===
+
==== Edit Blacklist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/blacklist</nowiki>
+
  <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/blacklist</nowiki>
  
  
Line 328: Line 330:
 
   'addList' => '@%.example.com,abc@example.com',
 
   'addList' => '@%.example.com,abc@example.com',
 
   'removeList' => '@examp%.com'
 
   'removeList' => '@examp%.com'
},
+
}
'text/xml'
 
 
</pre>
 
</pre>
  
== IP Blacklist ==
+
=== IP Blacklist ===
  
=== Index IP Blacklist ===
+
==== Index IP Blacklist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipblacklist</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipblacklist</nowiki>
  
  
Line 347: Line 348:
 
''Remarks'':
 
''Remarks'':
  
The Index operation only supports the GET HTTP verb. For .xml format, refer to the following schema document: [http://api.emailsrvr.com/Schemas/IpBlacklist.xsd IpBlacklist.xsd]
+
The Index operation only supports the GET HTTP verb.
  
  
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
get '/customers/12345678/domains/example.com/spam/ipblacklist', 'text/xml'
+
get '/customers/12345678/domains/example.com/spam/ipblacklist'
 
</pre>
 
</pre>
  
Line 372: Line 373:
 
{"addresses":["216.12.34.1","216.12.34.2"]}
 
{"addresses":["216.12.34.1","216.12.34.2"]}
  
=== Add IP Blacklist ===
+
==== Add IP Blacklist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)</nowiki>
+
  <nowiki>[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)</nowiki>
  
  
Line 385: Line 386:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
post '/customers/12345678/domains/example.com/spam/blacklist/216.12.34.1', 'text/xml'
+
post '/customers/12345678/domains/example.com/spam/blacklist/216.12.34.1'
 
</pre>
 
</pre>
  
Line 401: Line 402:
 
|}
 
|}
  
=== Delete IP Blacklist ===
+
==== Delete IP Blacklist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)</nowiki>
+
  <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)</nowiki>
  
  
Line 414: Line 415:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
delete '/customers/12345678/domains/example.com/spam/ipblacklist/216.12.34.1', 'text/xml'
+
delete '/customers/12345678/domains/example.com/spam/ipblacklist/216.12.34.1'
 
</pre>
 
</pre>
  
Line 434: Line 435:
 
|}
 
|}
  
=== Edit IP Blacklist ===
+
==== Edit IP Blacklist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipblacklist</nowiki>
+
  <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipblacklist</nowiki>
  
  
Line 468: Line 469:
 
   'addList' => '216.12.34.%,216.12.%.%',
 
   'addList' => '216.12.34.%,216.12.%.%',
 
   'removeList' => '216.%.%.%'
 
   'removeList' => '216.%.%.%'
},
+
}
'text/xml'
 
 
</pre>
 
</pre>
  
== Safelist ==
+
=== Safelist ===
  
=== Index Safelist ===
+
==== Index Safelist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/safelist</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/safelist</nowiki>
  
  
Line 487: Line 487:
 
''Remarks'':
 
''Remarks'':
  
The Index operation only supports the GET HTTP verb. For .xml format, refer to the following schema document: [http://api.emailsrvr.com/Schemas/Safelist.xsd Safelist.xsd]
+
The Index operation only supports the GET HTTP verb.
  
  
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
get '/customers/12345678/domains/example.com/spam/safelist', 'text/xml'
+
get '/customers/12345678/domains/example.com/spam/safelist'
 
</pre>
 
</pre>
  
Line 513: Line 513:
 
{"addresses":["name1@notspam.com","name2@notspam.com"]}
 
{"addresses":["name1@notspam.com","name2@notspam.com"]}
  
=== Add Safelist ===
+
==== Add Safelist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/safelist/(email address)</nowiki>
+
  <nowiki>[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/safelist/(email address)</nowiki>
  
  
Line 526: Line 526:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
post '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com', 'text/xml'
+
post '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com'
 
</pre>
 
</pre>
  
Line 543: Line 543:
  
  
=== Delete Safelist ===
+
==== Delete Safelist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/safelist/(email address)</nowiki>
+
  <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/safelist/(email address)</nowiki>
  
  
Line 556: Line 556:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
delete '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com', 'text/xml'
+
delete '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com'
 
</pre>
 
</pre>
  
Line 576: Line 576:
 
|}
 
|}
  
=== Edit Safelist ===
+
==== Edit Safelist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/safelist</nowiki>
+
  <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/safelist</nowiki>
  
  
Line 610: Line 610:
 
   'addList' => '@%.example.com,abc@example.com',
 
   'addList' => '@%.example.com,abc@example.com',
 
   'removeList' => '@examp%.com'
 
   'removeList' => '@examp%.com'
},
+
}
'text/xml'
 
 
</pre>
 
</pre>
  
  
== IP Safelist ==
+
=== IP Safelist ===
  
=== Index IP Safelist ===
+
==== Index IP Safelist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipsafelist</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipsafelist</nowiki>
  
  
Line 630: Line 629:
 
''Remarks'':
 
''Remarks'':
  
The Index operation only supports the GET HTTP verb. For .xml format, refer to the following schema document: [http://api.emailsrvr.com/v0/Schemas/IpSafelist.xsd IpSafelist.xsd]
+
The Index operation only supports the GET HTTP verb.
  
  
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
get '/customers/12345678/domains/example.com/spam/ipsafelist', 'text/xml'
+
get '/customers/12345678/domains/example.com/spam/ipsafelist'
 
</pre>
 
</pre>
  
Line 656: Line 655:
 
{"addresses":["192.168.0.1","192.168.0.2"]}
 
{"addresses":["192.168.0.1","192.168.0.2"]}
  
=== Add IP Safelist ===
+
==== Add IP Safelist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipsafelist/(ip address)</nowiki>
+
  <nowiki>[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipsafelist/(ip address)</nowiki>
  
  
Line 669: Line 668:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
post '/customers/12345678/domains/example.com/spam/safelist/216.12.34.1', 'text/xml'
+
post '/customers/12345678/domains/example.com/spam/safelist/216.12.34.1'
 
</pre>
 
</pre>
  
Line 685: Line 684:
 
|}
 
|}
  
=== Delete IP Safelist ===
+
==== Delete IP Safelist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipsafelist/(email address)</nowiki>
+
  <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipsafelist/(email address)</nowiki>
  
  
Line 698: Line 697:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
delete '/customers/12345678/domains/example.com/spam/ipsafelist/216.12.34.1', 'text/xml'
+
delete '/customers/12345678/domains/example.com/spam/ipsafelist/216.12.34.1'
 
</pre>
 
</pre>
  
Line 718: Line 717:
 
|}
 
|}
  
=== Edit IP Safelist ===
+
==== Edit IP Safelist ====
  
 
''URL'':
 
''URL'':
  <nowiki>[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipsafelist</nowiki>
+
  <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipsafelist</nowiki>
  
  
Line 752: Line 751:
 
   'addList' => '216.12.34.%,216.12.%.%',
 
   'addList' => '216.12.34.%,216.12.%.%',
 
   'removeList' => '216.%.%.%'
 
   'removeList' => '216.%.%.%'
},
+
}
'text/xml'
 
 
</pre>
 
</pre>

Revision as of 14:36, 12 January 2017

v1 - Current

Spam Settings

Show Spam Setting

URL:

[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/settings


Description:

This operation returns the spam settings associated with the domain.


Remarks:

The Show operation only supports the GET HTTP verb.


Example:

get '/customers/12345678/domains/example.com/spam/settings'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<domainSpamSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:DomainSpamSettings">
  <filterLevel>on</filterLevel>
  <rsEmailSettings>
    <spamHandling>toAddress</spamHandling>
    <hasFolderCleaner>false</hasFolderCleaner>
    <spamFolderAgeLimit>0</spamFolderAgeLimit>
    <spamFolderNumLimit>0</spamFolderNumLimit>
    <spamForwardingAddress>someone@mail.com</spamForwardingAddress>
  </rsEmailSettings>
  <exchangeSettings>
    <forwardToDomainQuarantine>on</forwardToDomainQuarantine>
    <quarantineOwner>someone@mail.com</quarantineOwner>
    <defaultQuarantineOwner>someone@mail.com</defaultQuarantineOwner>
  </exchangeSettings>
</domainSpamSettings>


Json Result Example:

{"filterLevel":"on","rsEmailSettings":{"spamHandling":"toAddress","hasFolderCleaner":false,"spamFolderAgeLimit":0,"spamFolderNumLimit":0,"spamForwardingAddress":"someone@mail.com"},"exchangeSettings":{"forwardToDomainQuarantine":"on","quarantineOwner":"someone@mail.com","defaultQuarantineOwner":"someone@mail.com"}}

Edit Spam Setting

URL:

[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/settings


Description:

Edits the domain Spam Settings.


Field Name Data Type Description
filterLevel string Spam filter status, must be 'on' or 'off' or 'exclusive' (Required)
overrideUserSettings boolean Set this flag to "true" to override preferences for all users regardless of their own preferences. Otherwise, it sets preferences only for users who have not set their own.
rsEmail.spamHandling string Change settings for Rackspace Email Handling. For the options, see the table below.
rsEmail.hasFolderCleaner boolean Turns on/off Spam Folder Cleaner. Requires "rsEmail.spamHandling" to be set to "toFolder".
rsEmail.spamFolderAgeLimit int The number of days that email stays the "Spam" folder before being deleted. Requires "rsEmail.hasFolderCleaner" to be set to "true".
rsEmail.spamFolderNumLimit int The max number of emails that will be kept in the "Spam" folder. Requires "rsEmail.hasFolderCleaner" to be set to "true".
rsEmail.spamForwardingAddress string The address that spams will be forwarded to. Requires "rsEmail.spamHandling" to be set to "toAddress".
exchange.forwardToDomainQuarantine string Change settings for Exchange Handling. For the options, see the table below.
exchange.quarantineOwner string The address that domain quarantine notifications will be sent to.
exchange.removeQuarantineOwner boolean Set this flag to "true" to remove domain quarantine owner.
exchange.defaultQuarantineOwner string The address that quarantine notifications will be sent to. This applies to new users and users that have not changed their settings to override.
exchange.removeDefaultQuarantineOwner boolean Set this flag to "true" to remove default domain quarantine owner.


Rackspace Email Handling Options:

Value Description
toFolder Deliver to Spam folder
delete Delete the email immediately
labelSubject Include "[SPAM]" at the beginning of the subject line
toAddress Deliver to the email address that is specified by "rsEmail.spamForwardingAddress"


Exchange Handling Options:

Value Description
on Send all spam to domain quarantine
off Send spam to recipient's quarantine
nonuser Send non-user spam (Contacts, Resources, etc.) to domain quarantine


Example:

put '/customers/me/domains/example.com/spam/settings', 
{
  'filterLevel' => 'on',
  'rsEmail.spamHandling' => 'toFolder',
  'rsEmail.hasFolderCleaner' => 'true',
  'rsEmail.spamFolderAgeLimit' => '7',
  'rsEmail.spamFolderNumLimit' => '100',
}


Errors:

Description HTTP Response Code Sample Message
Invalid input for Filter Level 400 Invalid FilterLevel: high. Input must be: on/off/exclusive
Invalid input for RSEmail SpamHandling 400 Invalid RSEmail SpamHandling: nonuser. Input must be: toFolder/delete/labelSubject/toAddress
Invalid input for Exchange ForwardToDomainQuarantine 400 Invalid input for Exchange ForwardToDomainQuarantine: delete. Input must be: on/off/nonuser


Blacklist

Index Blacklist

URL:

[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/blacklist


Description:

This operation returns the email address blacklist associated with the domain.


Remarks:

The Index operation only supports the GET HTTP verb.


Example:

get '/customers/12345678/domains/example.com/spam/blacklist'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<blacklist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:blacklist">
  <addresses>
    <address>name1@spam.com</address>
    <address>name2@spam.com</address>
  </addresses>
</blacklist>


Json Result Example:

{"addresses":["name1@spam.com","name2@spam.com"]}

Add Blacklist

URL:

[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/blacklist/(email address)


Description:

Adds an email address or domain to the blacklist.


Example:

post '/customers/12345678/domains/example.com/spam/blacklist/anyone@spam.com'


Errors:

Description HTTP Response Code Sample Message
Entered invalid email or domain 400 invalid email address: abc
Entered current domain 400 Adding example.com would blacklist the current domain

Delete Blacklist

URL:

[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/blacklist/(email address)


Description:

Removes an email address or domain from the blacklist.


Example:

delete '/customers/12345678/domains/example.com/spam/blacklist/anyone@yahoo.com'


Errors:

Description HTTP Response Code Sample Message
Entered invalid email or domain 400 invalid email address: abc
Entered email or domain is not on the current blacklist 400 abc@junkmail.com is not found on the list

Edit Blacklist

URL:

[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/blacklist


Description:

Edit email addresses on the blacklist.

Field Name Data Type Description
addList string Comma separated list of email addresses to add to the list
removeList string Comma separated list of email addresses to remove from the list

Note:

You can use a '%' as a wildcard in domains, but not in the TLD (.com, .net, etc). You cannot use wildcards in email addresses. For example, the following are allowed: @%.example.com, @examp%.com.

Example:

put '/customers/12345678/domains/example.com/spam/blacklist',
{
  'addList' => '@%.example.com,abc@example.com',
  'removeList' => '@examp%.com'
}

IP Blacklist

Index IP Blacklist

URL:

[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipblacklist


Description:

This operation returns IP blacklist associated with the domain.


Remarks:

The Index operation only supports the GET HTTP verb.


Example:

get '/customers/12345678/domains/example.com/spam/ipblacklist'

XML Result Example':

<?xml version="1.0" encoding="utf-8"?>
<ipBlacklist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:ipBlacklist">
  <addresses>
    <ip>216.12.34.1</ip>
    <ip>216.12.34.2</ip>
  </addresses>
</ipBlacklist>


Json Result Example:

{"addresses":["216.12.34.1","216.12.34.2"]}

Add IP Blacklist

URL:

[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)


Description:

Adds an IP to the blacklist.


Example:

post '/customers/12345678/domains/example.com/spam/blacklist/216.12.34.1'


Errors:

Description HTTP Response Code Sample Message
Entered invalid IP address 400 invalid ip address: 123

Delete IP Blacklist

URL:

[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)


Description:

Removes an IP from the blacklist.


Example:

delete '/customers/12345678/domains/example.com/spam/ipblacklist/216.12.34.1'


Errors:

Description HTTP Response Code Sample Message
Entered invalid IP address 400 invalid ip address: 123
Entered IP is not on the current blacklist 400 216.12.34.1 is not found on the blacklist

Edit IP Blacklist

URL:

[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipblacklist


Description:

Edit IP addresses on the blacklist.

Field Name Data Type Description
addList string Comma separated list of IP addresses to add to the list
removeList string Comma separated list of IP addresses to remove from the list

Note:

You can use a '%' as a wildcard in the last octets to specify IP ranges. For example: 216.12.34.%, 216.12.%.%, 216.%.%.%.

Example:

put '/customers/12345678/domains/example.com/spam/ipblacklist',
{
  'addList' => '216.12.34.%,216.12.%.%',
  'removeList' => '216.%.%.%'
}

Safelist

Index Safelist

URL:

[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/safelist


Description:

This operation returns email address safelist associated with the domain.


Remarks:

The Index operation only supports the GET HTTP verb.


Example:

get '/customers/12345678/domains/example.com/spam/safelist'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<safelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:safelist">
  <addresses>
    <address>name1@notspam.com</address>
    <address>name2@notspam.com</address>
  </addresses>
</safelist>


Json Result Example:

{"addresses":["name1@notspam.com","name2@notspam.com"]}

Add Safelist

URL:

[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/safelist/(email address)


Description:

Adds an email address or domain to the safelist.


Example:

post '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com'


Errors:

Description HTTP Response Code Sample Message
Entered invalid email or domain 400 invalid email address: abc


Delete Safelist

URL:

[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/safelist/(email address)


Description:

Removes an email address or domain from the safelist.


Example:

delete '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com'


Errors:

Description HTTP Response Code Sample Message
Entered invalid email or domain 400 invalid email address: abc
Entered email or domain is not on the current safelist 400 anyone@yahoo.com is not found on the list

Edit Safelist

URL:

[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/safelist


Description:

Edit email addresses on the safelist.

Field Name Data Type Description
addList string Comma separated list of email addresses to add to the list
removeList string Comma separated list of email addresses to remove from the list

Note:

You can use a '%' as a wildcard in domains, but not in the TLD (.com, .net, etc). You cannot use wildcards in email addresses. For example, the following are allowed: @%.example.com, @examp%.com.

Example:

put '/customers/12345678/domains/example.com/spam/safelist',
{
  'addList' => '@%.example.com,abc@example.com',
  'removeList' => '@examp%.com'
}


IP Safelist

Index IP Safelist

URL:

[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipsafelist


Description:

This operation returns IP safelist associated with the domain.


Remarks:

The Index operation only supports the GET HTTP verb.


Example:

get '/customers/12345678/domains/example.com/spam/ipsafelist'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<ipSafelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:ipSafelist">
  <addresses>
    <ip>192.168.0.1</ip>
    <ip>192.168.0.2</ip>
  </addresses>
</ipSafelist>


Json Result Example:

{"addresses":["192.168.0.1","192.168.0.2"]}

Add IP Safelist

URL:

[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipsafelist/(ip address)


Description:

Adds an IP to the safelist.


Example:

post '/customers/12345678/domains/example.com/spam/safelist/216.12.34.1'


Errors:

Description HTTP Response Code Sample Message
Entered invalid IP address 400 invalid ip address: 123

Delete IP Safelist

URL:

[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipsafelist/(email address)


Description:

Removes an IP from the safelist.


Example:

delete '/customers/12345678/domains/example.com/spam/ipsafelist/216.12.34.1'


Errors:

Description HTTP Response Code Sample Message
Entered invalid IP address 400 invalid ip address: 123
Entered IP is not on the current safelist 400 216.12.34.1 is not found on the list

Edit IP Safelist

URL:

[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/spam/ipsafelist


Description:

Edit IP addresses on the safelist.

Field Name Data Type Description
addList string Comma separated list of IP addresses to add to the list
removeList string Comma separated list of IP addresses to remove from the list

Note:

You can use a '%' as a wildcard in the last octets to specify IP ranges. For example: 216.12.34.%, 216.12.%.%, 216.%.%.%.

Example:

put '/customers/12345678/domains/example.com/spam/ipsafelist',
{
  'addList' => '216.12.34.%,216.12.%.%',
  'removeList' => '216.%.%.%'
}