Difference between revisions of "Rackspace Mailbox Spam (Rest API)"
(→Index) |
Matt.Brown (talk | contribs) (Update route names and get XML payload) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
− | == | + | == v1 - Current == |
− | === Show === | + | === Spam Settings === |
+ | |||
+ | ==== Show ==== | ||
''URL'': | ''URL'': | ||
− | <nowiki>[GET] https://api.emailsrvr.com/ | + | <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/settings</nowiki> | /rs/mailboxes/(mailbox name)/spam/settings</nowiki> | ||
Line 12: | Line 14: | ||
''Description'': | ''Description'': | ||
− | This operation returns the spam settings associated with the mailbox. | + | This operation returns the spam settings associated with the mailbox. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/settings | + | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/settings' |
</pre> | </pre> | ||
Line 41: | Line 43: | ||
<pre> | <pre> | ||
− | {"filterLevel":"on","rsEmailSettings":"hasFolderCleaner":false,"spamFolderAgeLimit":0,"spamFolderNumLimit":0, | + | { "filterLevel":"on", |
− | "spamForwardingAddress":"","spamHandling":"toFolder"}} | + | "rsEmailSettings":{ |
+ | "hasFolderCleaner":false, | ||
+ | "spamFolderAgeLimit":0, | ||
+ | "spamFolderNumLimit":0, | ||
+ | "spamForwardingAddress":"", | ||
+ | "spamHandling":"toFolder" | ||
+ | } | ||
+ | } | ||
</pre> | </pre> | ||
− | === Edit === | + | ==== Edit ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[PUT] https://api.emailsrvr.com/ | + | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/rs/mailboxes/(mailbox name)/spam/settings</nowiki> |
− | |||
Line 153: | Line 161: | ||
− | == | + | === Blocklist === |
− | === Index === | + | ==== Index ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[GET] https://api.emailsrvr.com/ | + | <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /rs/mailboxes/(mailbox name)/spam/ | + | /rs/mailboxes/(mailbox name)/spam/blocklist</nowiki> |
''Description'': | ''Description'': | ||
− | This operation returns email address | + | This operation returns email address blocklist associated with the mailbox. |
''Remarks'': | ''Remarks'': | ||
− | The Index operation only supports the GET HTTP verb. | + | The Index operation only supports the GET HTTP verb. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ | + | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/blocklist' |
</pre> | </pre> | ||
Line 182: | Line 190: | ||
<pre> | <pre> | ||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
− | < | + | <blocklist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:blocklist"> |
<addresses> | <addresses> | ||
<address>name1@spam.com</address> | <address>name1@spam.com</address> | ||
<address>name2@spam.com</address> | <address>name2@spam.com</address> | ||
</addresses> | </addresses> | ||
− | </ | + | </blocklist> |
</pre> | </pre> | ||
Line 195: | Line 203: | ||
{"addresses":["name1@spam.com","name2@spam.com"]} | {"addresses":["name1@spam.com","name2@spam.com"]} | ||
− | === Add === | + | ==== Add ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[POST] https://api.emailsrvr.com/ | + | <nowiki>[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /rs/mailboxes/(mailbox name)/spam/ | + | /rs/mailboxes/(mailbox name)/spam/blocklist/(email address)</nowiki> |
''Description'': | ''Description'': | ||
− | Adds an email address or domain to the | + | Adds an email address or domain to the blocklist. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ | + | post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/blocklist/anyone@spam.com', {} |
</pre> | </pre> | ||
Line 226: | Line 234: | ||
| Entered current domain | | Entered current domain | ||
| 400 | | 400 | ||
− | | Adding example.com would | + | | Adding example.com would blocklist the current domain |
|} | |} | ||
− | === Delete === | + | ==== Delete ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[DELETE] https://api.emailsrvr.com/ | + | <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /rs/mailboxes/(mailbox name)/spam/ | + | /rs/mailboxes/(mailbox name)/spam/blocklist/(email address)</nowiki> |
''Description'': | ''Description'': | ||
− | Removes an email address or domain from the | + | Removes an email address or domain from the blocklist. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ | + | delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/blocklist/anyone@yahoo.com' |
</pre> | </pre> | ||
Line 258: | Line 266: | ||
| invalid email address: abc | | invalid email address: abc | ||
|- | |- | ||
− | | Entered email or domain is not on the current | + | | Entered email or domain is not on the current blocklist |
| 400 | | 400 | ||
− | | abc@junkmail.com is not found on the | + | | abc@junkmail.com is not found on the blocklist |
|} | |} | ||
− | === Edit === | + | ==== Edit ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[PUT] https://api.emailsrvr.com/ | + | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /rs/mailboxes/(mailbox name)/spam/ | + | /rs/mailboxes/(mailbox name)/spam/blocklist</nowiki> |
''Description'': | ''Description'': | ||
− | Edit email addresses on the | + | Edit email addresses on the blocklist. |
{| class="wikitable" | {| class="wikitable" | ||
Line 293: | Line 301: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | put '/customers/12345678/domains/example.com/rs/mailboxes/jane.doe/spam/ | + | put '/customers/12345678/domains/example.com/rs/mailboxes/jane.doe/spam/blocklist', |
{ | { | ||
'addList' => '@%.example.com,abc@example.com', | 'addList' => '@%.example.com,abc@example.com', | ||
'removeList' => '@examp%.com' | 'removeList' => '@examp%.com' | ||
− | } | + | } |
− | |||
</pre> | </pre> | ||
− | == IP | + | === IP Blocklist === |
− | === Index === | + | ==== Index ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[GET] https://api.emailsrvr.com/ | + | <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /rs/mailboxes/(mailbox name)/spam/ | + | /rs/mailboxes/(mailbox name)/spam/ipblocklist</nowiki> |
''Description'': | ''Description'': | ||
− | This operation returns IP | + | This operation returns IP blocklist associated with the mailbox. |
''Remarks'': | ''Remarks'': | ||
− | The Index operation only supports the GET HTTP verb. | + | The Index operation only supports the GET HTTP verb. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ | + | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipblocklist' |
</pre> | </pre> | ||
Line 329: | Line 336: | ||
<pre> | <pre> | ||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
− | < | + | <ipBlocklist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:ipBlocklist"> |
<addresses> | <addresses> | ||
<ip>216.12.34.1</ip> | <ip>216.12.34.1</ip> | ||
<ip>216.12.34.2</ip> | <ip>216.12.34.2</ip> | ||
</addresses> | </addresses> | ||
− | </ | + | </ipBlocklist> |
</pre> | </pre> | ||
Line 342: | Line 349: | ||
{"addresses":["216.12.34.1","216.12.34.2"]} | {"addresses":["216.12.34.1","216.12.34.2"]} | ||
− | === Add === | + | ==== Add ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[POST] https://api.emailsrvr.com/ | + | <nowiki>[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /rs/mailboxes/(mailbox name)/spam/ | + | /rs/mailboxes/(mailbox name)/spam/ipblocklist/(ip address)</nowiki> |
''Description'': | ''Description'': | ||
− | Adds an IP to the | + | Adds an IP to the blocklist. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ | + | post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/blocklist/216.12.34.1', {} |
</pre> | </pre> | ||
− | === Delete === | + | ==== Delete ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[DELETE] https://api.emailsrvr.com/ | + | <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /rs/mailboxes/(mailbox name)/spam/ | + | /rs/mailboxes/(mailbox name)/spam/ipblocklist/(ip address)</nowiki> |
''Description'': | ''Description'': | ||
− | Removes an IP from the | + | Removes an IP from the blocklist. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ | + | delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipblocklist/216.12.34.1' |
</pre> | </pre> | ||
Line 384: | Line 391: | ||
!''Sample Message'' | !''Sample Message'' | ||
|- | |- | ||
− | | Entered IP is not on the current | + | | Entered IP is not on the current blocklist |
| 400 | | 400 | ||
− | | 216.12.34.1 is not found on the | + | | 216.12.34.1 is not found on the blocklist |
|} | |} | ||
− | === Edit === | + | ==== Edit ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[PUT] https://api.emailsrvr.com/ | + | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /rs/mailboxes/(mailbox name)/spam/ | + | /rs/mailboxes/(mailbox name)/spam/ipblocklist</nowiki> |
''Description'': | ''Description'': | ||
− | Edit IP addresses on the | + | Edit IP addresses on the blocklist. |
{| class="wikitable" | {| class="wikitable" | ||
Line 420: | Line 427: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | put '/customers/12345678/domains/example.com/rs/mailboxes/jane.doe/spam/ | + | put '/customers/12345678/domains/example.com/rs/mailboxes/jane.doe/spam/ipblocklist', |
{ | { | ||
'addList' => '216.12.34.%,216.12.%.%', | 'addList' => '216.12.34.%,216.12.%.%', | ||
'removeList' => '216.%.%.%' | 'removeList' => '216.%.%.%' | ||
− | } | + | } |
− | |||
</pre> | </pre> | ||
− | == Safelist == | + | === Safelist === |
− | === Index === | + | ==== Index ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[GET] https://api.emailsrvr.com/ | + | <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/safelist</nowiki> | /rs/mailboxes/(mailbox name)/spam/safelist</nowiki> | ||
Line 444: | Line 450: | ||
''Remarks'': | ''Remarks'': | ||
− | The Index operation only supports the GET HTTP verb. | + | The Index operation only supports the GET HTTP verb. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/safelist | + | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/safelist' |
</pre> | </pre> | ||
Line 470: | Line 476: | ||
{"addresses":["name1@notspam.com","name2@notspam.com"]} | {"addresses":["name1@notspam.com","name2@notspam.com"]} | ||
− | === Add === | + | ==== Add ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[POST] https://api.emailsrvr.com/ | + | <nowiki>[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/safelist/(email address)</nowiki> | /rs/mailboxes/(mailbox name)/spam/safelist/(email address)</nowiki> | ||
Line 484: | Line 490: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com', {} | + | post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com', {} |
</pre> | </pre> | ||
Line 500: | Line 506: | ||
|} | |} | ||
− | === Delete === | + | ==== Delete ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[DELETE] https://api.emailsrvr.com/ | + | <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/safelist/(email address)</nowiki> | /rs/mailboxes/(mailbox name)/spam/safelist/(email address)</nowiki> | ||
Line 514: | Line 520: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com | + | delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com' |
</pre> | </pre> | ||
Line 534: | Line 540: | ||
|} | |} | ||
− | === Edit === | + | ==== Edit ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[PUT] https://api.emailsrvr.com/ | + | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/safelist</nowiki> | /rs/mailboxes/(mailbox name)/spam/safelist</nowiki> | ||
Line 569: | Line 575: | ||
'addList' => '@%.example.com,abc@example.com', | 'addList' => '@%.example.com,abc@example.com', | ||
'removeList' => '@examp%.com' | 'removeList' => '@examp%.com' | ||
− | } | + | } |
− | |||
</pre> | </pre> | ||
− | == IP Safelist == | + | === IP Safelist === |
− | === Index === | + | ==== Index ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[GET] https://api.emailsrvr.com/ | + | <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/ipsafelist</nowiki> | /rs/mailboxes/(mailbox name)/spam/ipsafelist</nowiki> | ||
Line 589: | Line 594: | ||
''Remarks'': | ''Remarks'': | ||
− | The Index operation only supports the GET HTTP verb. | + | The Index operation only supports the GET HTTP verb. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipsafelist | + | get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipsafelist' |
</pre> | </pre> | ||
Line 615: | Line 620: | ||
{"addresses":["192.168.0.1","192.168.0.2"]} | {"addresses":["192.168.0.1","192.168.0.2"]} | ||
− | === Add === | + | ==== Add ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[POST] https://api.emailsrvr.com/ | + | <nowiki>[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/ipsafelist/(ip address)</nowiki> | /rs/mailboxes/(mailbox name)/spam/ipsafelist/(ip address)</nowiki> | ||
Line 629: | Line 634: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1', {} | + | post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1', {} |
</pre> | </pre> | ||
Line 645: | Line 650: | ||
|} | |} | ||
− | === Delete === | + | ==== Delete ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[DELETE] https://api.emailsrvr.com/ | + | <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/ipsafelist/(email address)</nowiki> | /rs/mailboxes/(mailbox name)/spam/ipsafelist/(email address)</nowiki> | ||
Line 659: | Line 664: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1 | + | delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1' |
</pre> | </pre> | ||
Line 675: | Line 680: | ||
|} | |} | ||
− | === Edit === | + | ==== Edit ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[PUT] https://api.emailsrvr.com/ | + | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/rs/mailboxes/(mailbox name)/spam/ipsafelist</nowiki> | /rs/mailboxes/(mailbox name)/spam/ipsafelist</nowiki> | ||
Line 710: | Line 715: | ||
'addList' => '216.12.34.%,216.12.%.%', | 'addList' => '216.12.34.%,216.12.%.%', | ||
'removeList' => '216.%.%.%' | 'removeList' => '216.%.%.%' | ||
− | } | + | } |
− | |||
</pre> | </pre> |
Latest revision as of 13:16, 14 October 2020
Contents
v1 - Current
Spam Settings
Show
URL:
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/settings
Description:
This operation returns the spam settings associated with the mailbox.
Example:
get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/settings'
XML Result Example:
<?xml version="1.0" encoding="utf-8"?> <rsMailboxSpamSetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:RSMailboxSpamSetting"> <filterLevel>on</filterLevel> <rsEmailSettings> <spamHandling>toFolder</spamHandling> <hasFolderCleaner>false</hasFolderCleaner> <spamFolderAgeLimit>0</spamFolderAgeLimit> <spamFolderNumLimit>0</spamFolderNumLimit> <spamForwardingAddress /> </rsEmailSettings> </rsMailboxSpamSetting>
Json Result Example:
{ "filterLevel":"on", "rsEmailSettings":{ "hasFolderCleaner":false, "spamFolderAgeLimit":0, "spamFolderNumLimit":0, "spamForwardingAddress":"", "spamHandling":"toFolder" } }
Edit
URL:
[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/rs/mailboxes/(mailbox name)/spam/settings
Description:
This operation will modify the mailbox spam settings.
Field Name | Data Type | Description | |
---|---|---|---|
filterLevel | string | This is a required field. Spam filter status: 'on', 'off', or 'exclusive'. Exclusive mode allows only email cleared by the Safelist. | |
rsEmail.spamHandling | string | The string 'toFolder' will deliver the email to the user's Spam folder, 'delete' will delete the mail immediately, 'labelSubject' will prepend [SPAM] to the email's subject line, and 'toAddress' will send the email to a specified folder instead.
Valid Field Combinations: (toFolder => hasFolderCleaner, spamFolderAgeLimit, spamFolderNumLimit) (toAddress => spamForwardingAddress) | |
rsEmail.hasFolderCleaner | string | This field is effective when rsEmail.spamHandling option is set to 'toFolder'. This field controls how the spam that is delivered o the spam folder is handled. There are currently two options supported for handling spam. First option is to set a limit after which the spam gets deleted. One can set limit on the number of days or on the number of spam emails. Second option is to never automatically delete the spam. For both these options to be enabled the rsEmail.hasFolderCleaner field should be set to 'true'.
The folder cleaner fields (hasFolderCleaner, spamFolderAgeLimit, spamFolderNumLimit) are allowed only when the spamHandling field is set to 'toFolder'. In order to never delete the spam set the spamFolderAgeLimit and spamFolderNumLimit fields to 0. | |
rsEmail.spamFolderAgeLimit | string | The number of days a message stays in the Spam folder before its deleted. This field is effective only when rsEmail.spamHandling is set to 'toFolder', and 'rs.hasFolderCleaner' is set to 'true'. This field cannot have negative value. | |
rsEmail.spamFolderNumLimit | string | The maximum number of emails the Spam folder holds. This field is effective only when rsEmail.spamHandling is set to 'toFolder', and 'rs.hasFolderCleaner' is set to 'true'. This field cannot have negative value. | |
rsEmail.spamForwardingAddress | string | The email address that Spam emails will be redirected to. This field is required when the spamHandling field is set to 'toAddress' |
Example:
put '/customers/100018/domains/resellerallservices.net/rs/mailboxes/unittestexist/spam/settings', { 'filterLevel' => 'on', 'rsEmail.spamHandling' => 'toFolder', 'rsEmail.hasFolderCleaner' => 'true', 'rsEmail.spamFolderAgeLimit' => '7', 'rsEmail.spamFolderNumLimit' => '100', }, Formats.xml
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Invalid input for form field 'filterLevel' | 400 | Invalid FilterLevel: Input must be: on/off/exclusive |
Invalid input for form field 'spamHandling' | 400 | Invalid RSEmail SpamHandling: Input must be: toFolder/delete/labelSubject/toAddress |
Invalid email address in spam forwarding address | 400 | Invalid email address |
Empty forwarding address | 400 | Spam Forwarding Address cannot be empty for spam handling policy: toAddress |
Invalid value for field 'spamFolderAgeLimit' | 400 | Invalid RSEmail SpamCleanupOption: -1. rsEmail.spamFolderAgeLimit should be non-negative |
Invalid value for field 'spamFolderNumLimit' | 400 | Invalid RSEmail SpamCleanupOption: -1. rsEmail.spamNumberLimit should be non-negative. |
Invalid field combination | 400 | Invalid field combination: Folder cleaner options cannot be specified with spam handling policy: delete. |
Invalid field combination | 400 | Invalid field combination: Folder cleaner options cannot be specified with spam handling policy: labelSubject. |
Invalid field combination | 400 | Invalid field combination: Folder cleaner options cannot be specified with spam handling policy: toAddress. |
Blocklist
Index
URL:
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/blocklist
Description:
This operation returns email address blocklist associated with the mailbox.
Remarks:
The Index operation only supports the GET HTTP verb.
Example:
get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/blocklist'
XML Result Example:
<?xml version="1.0" encoding="utf-8"?> <blocklist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:blocklist"> <addresses> <address>name1@spam.com</address> <address>name2@spam.com</address> </addresses> </blocklist>
Json Result Example:
{"addresses":["name1@spam.com","name2@spam.com"]}
Add
URL:
[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/blocklist/(email address)
Description:
Adds an email address or domain to the blocklist.
Example:
post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/blocklist/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 blocklist the current domain |
Delete
URL:
[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/blocklist/(email address)
Description:
Removes an email address or domain from the blocklist.
Example:
delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/blocklist/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 blocklist | 400 | abc@junkmail.com is not found on the blocklist |
Edit
URL:
[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/blocklist
Description:
Edit email addresses on the blocklist.
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/rs/mailboxes/jane.doe/spam/blocklist', { 'addList' => '@%.example.com,abc@example.com', 'removeList' => '@examp%.com' }
IP Blocklist
Index
URL:
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/ipblocklist
Description:
This operation returns IP blocklist associated with the mailbox.
Remarks:
The Index operation only supports the GET HTTP verb.
Example:
get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipblocklist'
XML Result Example':
<?xml version="1.0" encoding="utf-8"?> <ipBlocklist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:ipBlocklist"> <addresses> <ip>216.12.34.1</ip> <ip>216.12.34.2</ip> </addresses> </ipBlocklist>
Json Result Example:
{"addresses":["216.12.34.1","216.12.34.2"]}
Add
URL:
[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/ipblocklist/(ip address)
Description:
Adds an IP to the blocklist.
Example:
post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/blocklist/216.12.34.1', {}
Delete
URL:
[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/ipblocklist/(ip address)
Description:
Removes an IP from the blocklist.
Example:
delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipblocklist/216.12.34.1'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Entered IP is not on the current blocklist | 400 | 216.12.34.1 is not found on the blocklist |
Edit
URL:
[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/ipblocklist
Description:
Edit IP addresses on the blocklist.
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/rs/mailboxes/jane.doe/spam/ipblocklist', { 'addList' => '216.12.34.%,216.12.%.%', 'removeList' => '216.%.%.%' }
Safelist
Index
URL:
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/safelist
Description:
This operation returns email address safelist associated with the mailbox.
Remarks:
The Index operation only supports the GET HTTP verb.
Example:
get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/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
URL:
[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/safelist/(email address)
Description:
Adds an email address or domain to the safelist.
Example:
post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com', {}
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Entered invalid email or domain | 400 | invalid email address: abc |
Delete
URL:
[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/safelist/(email address)
Description:
Removes an email address or domain from the safelist.
Example:
delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/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 safelist |
Edit
URL:
[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox 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/rs/mailboxes/jane.doe/spam/safelist', { 'addList' => '@%.example.com,abc@example.com', 'removeList' => '@examp%.com' }
IP Safelist
Index
URL:
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/ipsafelist
Description:
This operation returns IP safelist associated with the mailbox.
Remarks:
The Index operation only supports the GET HTTP verb.
Example:
get '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/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
URL:
[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/ipsafelist/(ip address)
Description:
Adds an IP to the ipsafelist.
Example:
post '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1', {}
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Entered invalid IP address | 400 | invalid ip address: 123 |
Delete
URL:
[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox name)/spam/ipsafelist/(email address)
Description:
Removes an IP from the safelist.
Example:
delete '/customers/12345678/domains/example.com/rs/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Entered IP is not on the current safelist | 400 | 216.12.34.1 is not found on the safelist |
Edit
URL:
[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /rs/mailboxes/(mailbox 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/rs/mailboxes/jane.doe/spam/ipsafelist', { 'addList' => '216.12.34.%,216.12.%.%', 'removeList' => '216.%.%.%' }