Difference between revisions of "Exchange Mailbox Spam (Rest API)"
(Created page with '__TOC__ == Spam Settings == === Show === ''URL'': <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name) /ex/mailboxes…') |
Matt.Brown (talk | contribs) (Update route names and get XML payload) |
||
(12 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) |
/ex/mailboxes/(mailbox name)/spam/settings</nowiki> | /ex/mailboxes/(mailbox name)/spam/settings</nowiki> | ||
Line 17: | Line 19: | ||
''Remarks'': | ''Remarks'': | ||
− | The Show operation only supports the GET HTTP verb. | + | The Show operation only supports the GET HTTP verb. |
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | get '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/settings | + | get '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/settings' |
</pre> | </pre> | ||
Line 42: | Line 44: | ||
{"filterLevel":"on","sendToDomainQuarantine":false,"quarantineOwner":""} | {"filterLevel":"on","sendToDomainQuarantine":false,"quarantineOwner":""} | ||
− | + | ==== Edit ==== | |
− | === Edit === | ||
''URL'': | ''URL'': | ||
− | <nowiki>[PUT] https://api.emailsrvr.com/ | + | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/ex/mailboxes/(mailbox name)/spam/settings</nowiki> | /ex/mailboxes/(mailbox name)/spam/settings</nowiki> | ||
Line 71: | Line 72: | ||
| string | | string | ||
| The email address that quarantine notifications be sent to | | The email address that quarantine notifications be sent to | ||
+ | |- | ||
+ | | removeQuarantineOwner | ||
+ | | boolean | ||
+ | | Set this flag to "true" to remove quarantine owner | ||
|} | |} | ||
Line 84: | Line 89: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | put '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/settings | + | put '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/settings', |
{ | { | ||
'filterlevel' => 'off' | 'filterlevel' => 'off' | ||
Line 103: | Line 108: | ||
|} | |} | ||
− | == | + | === 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) |
− | /ex/mailboxes/(mailbox name)/spam/ | + | /ex/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/ex/mailboxes/alex.smith/spam/ | + | get '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/blocklist' |
</pre> | </pre> | ||
Line 132: | Line 137: | ||
<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 145: | Line 150: | ||
{"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) |
− | /ex/mailboxes/(mailbox name)/spam/ | + | /ex/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/ex/mailboxes/alex.smith/spam/ | + | post '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/blocklist/anyone@spam.com', {} |
</pre> | </pre> | ||
Line 176: | Line 181: | ||
| 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) |
− | /ex/mailboxes/(mailbox name)/spam/ | + | /ex/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/ex/mailboxes/alex.smith/spam/ | + | delete '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/blocklist/anyone@yahoo.com' |
</pre> | </pre> | ||
Line 208: | Line 213: | ||
| 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 ==== | ||
+ | |||
+ | ''URL'': | ||
+ | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) | ||
+ | /ex/mailboxes/(mailbox name)/spam/blocklist</nowiki> | ||
+ | |||
+ | ''Description'': | ||
+ | |||
+ | Edit email addresses on the blocklist. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | !''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. | ||
− | === Index === | + | ''Example'': |
+ | <pre> | ||
+ | put '/customers/12345678/domains/example.com/ex/mailboxes/jane.doe/spam/blocklist', | ||
+ | { | ||
+ | 'addList' => '@%.example.com,abc@example.com', | ||
+ | 'removeList' => '@examp%.com' | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | === IP Blocklist === | ||
+ | |||
+ | ==== Index ==== | ||
''URL'': | ''URL'': | ||
− | <nowiki>[GET] https://api.emailsrvr.com/ | + | <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
− | /ex/mailboxes/(mailbox name)/spam/ | + | /ex/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/ex/mailboxes/alex.smith/spam/ | + | get '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/ipblocklist' |
</pre> | </pre> | ||
Line 241: | Line 283: | ||
<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 254: | Line 296: | ||
{"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) |
− | /ex/mailboxes/(mailbox name)/spam/ | + | /ex/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/ex/mailboxes/alex.smith/spam/ | + | post '/customers/12345678/domains/example.com/ex/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) |
− | /ex/mailboxes/(mailbox name)/spam/ | + | /ex/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/ex/mailboxes/alex.smith/spam/ | + | delete '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/ipblocklist/216.12.34.1' |
</pre> | </pre> | ||
Line 296: | Line 338: | ||
!''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 ==== | ||
+ | |||
+ | ''URL'': | ||
+ | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) | ||
+ | /ex/mailboxes/(mailbox name)/spam/ipblocklist</nowiki> | ||
+ | |||
+ | |||
+ | ''Description'': | ||
+ | |||
+ | Edit IP addresses on the blocklist. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | !''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'': | ||
+ | <pre> | ||
+ | put '/customers/12345678/domains/example.com/ex/mailboxes/jane.doe/spam/ipblocklist', | ||
+ | { | ||
+ | 'addList' => '216.12.34.%,216.12.%.%', | ||
+ | 'removeList' => '216.%.%.%' | ||
+ | } | ||
+ | </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) |
/ex/mailboxes/(mailbox name)/spam/safelist</nowiki> | /ex/mailboxes/(mailbox name)/spam/safelist</nowiki> | ||
Line 318: | Line 397: | ||
''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/ex/mailboxes/alex.smith/spam/safelist | + | get '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/safelist' |
</pre> | </pre> | ||
Line 344: | Line 423: | ||
{"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) |
/ex/mailboxes/(mailbox name)/spam/safelist/(email address)</nowiki> | /ex/mailboxes/(mailbox name)/spam/safelist/(email address)</nowiki> | ||
Line 358: | Line 437: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | post '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com', {} | + | post '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com', {} |
</pre> | </pre> | ||
Line 374: | Line 453: | ||
|} | |} | ||
− | === Delete === | + | ==== Delete ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[DELETE] https://api.emailsrvr.com/ | + | <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/ex/mailboxes/(mailbox name)/spam/safelist/(email address)</nowiki> | /ex/mailboxes/(mailbox name)/spam/safelist/(email address)</nowiki> | ||
Line 388: | Line 467: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | delete '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com | + | delete '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/safelist/anyone@yahoo.com' |
</pre> | </pre> | ||
Line 408: | Line 487: | ||
|} | |} | ||
− | == IP Safelist == | + | ==== Edit ==== |
+ | |||
+ | ''URL'': | ||
+ | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) | ||
+ | /ex/mailboxes/(mailbox name)/spam/safelist</nowiki> | ||
+ | |||
+ | |||
+ | ''Description'': | ||
+ | |||
+ | Edit email addresses on the safelist. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | !''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'': | ||
+ | <pre> | ||
+ | put '/customers/12345678/domains/example.com/ex/mailboxes/jane.doe/spam/safelist', | ||
+ | { | ||
+ | 'addList' => '@%.example.com,abc@example.com', | ||
+ | 'removeList' => '@examp%.com' | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | === 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) |
/ex/mailboxes/(mailbox name)/spam/ipsafelist</nowiki> | /ex/mailboxes/(mailbox name)/spam/ipsafelist</nowiki> | ||
Line 424: | Line 541: | ||
''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/ex/mailboxes/alex.smith/spam/ipsafelist | + | get '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/ipsafelist' |
</pre> | </pre> | ||
Line 450: | Line 567: | ||
{"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) |
/ex/mailboxes/(mailbox name)/spam/ipsafelist/(ip address)</nowiki> | /ex/mailboxes/(mailbox name)/spam/ipsafelist/(ip address)</nowiki> | ||
Line 464: | Line 581: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | post '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1', {} | + | post '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1', {} |
</pre> | </pre> | ||
Line 480: | Line 597: | ||
|} | |} | ||
− | === Delete === | + | ==== Delete ==== |
''URL'': | ''URL'': | ||
− | <nowiki>[DELETE] https://api.emailsrvr.com/ | + | <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) |
/ex/mailboxes/(mailbox name)/spam/ipsafelist/(email address)</nowiki> | /ex/mailboxes/(mailbox name)/spam/ipsafelist/(email address)</nowiki> | ||
Line 494: | Line 611: | ||
''Example'': | ''Example'': | ||
<pre> | <pre> | ||
− | delete '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1 | + | delete '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/ipsafelist/216.12.34.1' |
</pre> | </pre> | ||
Line 509: | Line 626: | ||
| 216.12.34.1 is not found on the safelist | | 216.12.34.1 is not found on the safelist | ||
|} | |} | ||
+ | |||
+ | ==== Edit ==== | ||
+ | |||
+ | ''URL'': | ||
+ | <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) | ||
+ | /ex/mailboxes/(mailbox name)/spam/ipsafelist</nowiki> | ||
+ | |||
+ | |||
+ | ''Description'': | ||
+ | |||
+ | Edit IP addresses on the safelist. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | !''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'': | ||
+ | <pre> | ||
+ | put '/customers/12345678/domains/example.com/ex/mailboxes/jane.doe/spam/ipsafelist', | ||
+ | { | ||
+ | 'addList' => '216.12.34.%,216.12.%.%', | ||
+ | 'removeList' => '216.%.%.%' | ||
+ | } | ||
+ | </pre> |
Latest revision as of 14:20, 14 October 2020
Contents
v1 - Current
Spam Settings
Show
URL:
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /ex/mailboxes/(mailbox name)/spam/settings
Description:
This operation returns the spam settings associated with the mailbox.
Remarks:
The Show operation only supports the GET HTTP verb.
Example:
get '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/settings'
XML Result Example:
<?xml version="1.0" encoding="utf-8"?> <MailboxSpamSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:MailboxSpamSettings"> <filterLevel>on</filterLevel> <sendToDomainQuarantine>false</sendToDomainQuarantine> <quarantineOwner /> </MailboxSpamSettings>
Json Result Example:
{"filterLevel":"on","sendToDomainQuarantine":false,"quarantineOwner":""}
Edit
URL:
[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /ex/mailboxes/(mailbox name)/spam/settings
Description:
This operation will modify the mailbox spam setting. Only 'filterlevel' is the required form field.
Field Name | Data Type | Description |
---|---|---|
filterlevel | string | Spam filter status, must be 'on' or 'off' or 'exclusive' (Required) |
sendtodomainquarantine | boolean | Indicates whether or not send spam to domain quarantine |
quarantineowner | string | The email address that quarantine notifications be sent to |
removeQuarantineOwner | boolean | Set this flag to "true" to remove quarantine owner |
Remarks:
Form field "filterlevel" is always required.
When "filterlevel" is "on", spam will be sent to mailbox quarantine as default, unless "sendtodomainquarantine" is set to "true".
Changing "filterlevel" to "off" will force "sendtodomainquarantine" to be "false".
When "filterlevel" is "exclusive", spam will be sent to mailbox quarantine as default, unless "sendtodomainquarantine" is set to "true". In addition, mailbox will only receive email from addresses and IPs on its safelist.
Example:
put '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/settings', { 'filterlevel' => 'off' }
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Invalid input for form field 'filterlevel' | 400 | Invalid filterLevel, input must be: on/off/exclusive |
Blocklist
Index
URL:
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /ex/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/ex/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) /ex/mailboxes/(mailbox name)/spam/blocklist/(email address)
Description:
Adds an email address or domain to the blocklist.
Example:
post '/customers/12345678/domains/example.com/ex/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) /ex/mailboxes/(mailbox name)/spam/blocklist/(email address)
Description:
Removes an email address or domain from the blocklist.
Example:
delete '/customers/12345678/domains/example.com/ex/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) /ex/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/ex/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) /ex/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/ex/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) /ex/mailboxes/(mailbox name)/spam/ipblocklist/(ip address)
Description:
Adds an IP to the blocklist.
Example:
post '/customers/12345678/domains/example.com/ex/mailboxes/alex.smith/spam/blocklist/216.12.34.1', {}
Delete
URL:
[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name) /ex/mailboxes/(mailbox name)/spam/ipblocklist/(ip address)
Description:
Removes an IP from the blocklist.
Example:
delete '/customers/12345678/domains/example.com/ex/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) /ex/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/ex/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) /ex/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/ex/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) /ex/mailboxes/(mailbox name)/spam/safelist/(email address)
Description:
Adds an email address or domain to the safelist.
Example:
post '/customers/12345678/domains/example.com/ex/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) /ex/mailboxes/(mailbox name)/spam/safelist/(email address)
Description:
Removes an email address or domain from the safelist.
Example:
delete '/customers/12345678/domains/example.com/ex/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) /ex/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/ex/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) /ex/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/ex/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) /ex/mailboxes/(mailbox name)/spam/ipsafelist/(ip address)
Description:
Adds an IP to the ipsafelist.
Example:
post '/customers/12345678/domains/example.com/ex/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) /ex/mailboxes/(mailbox name)/spam/ipsafelist/(email address)
Description:
Removes an IP from the safelist.
Example:
delete '/customers/12345678/domains/example.com/ex/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) /ex/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/ex/mailboxes/jane.doe/spam/ipsafelist', { 'addList' => '216.12.34.%,216.12.%.%', 'removeList' => '216.%.%.%' }