Difference between revisions of "Domain (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
(Updated to latest live version.)
Line 7: Line 7:
 
''URL'':  
 
''URL'':  
  
  <nowiki>[GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains</nowiki>
  
  
Line 17: Line 17:
 
''Remarks'':
 
''Remarks'':
  
To retrieve a list of domains owned by the account that is logged in, use "me" as the customer account number i.e. <nowiki>'http://api.emailsrvr.com/v0/customers/me/domains'</nowiki>. To retrieve a list of domains owned by all customer sub-accounts and your own account, use "all" as the customer account number.
+
To retrieve a list of domains owned by the account that is logged in, use "me" as the customer account number i.e. <nowiki>'https://api.emailsrvr.com/v0/customers/me/domains'</nowiki>. To retrieve a list of domains owned by all customer sub-accounts and your own account, use "all" as the customer account number.
  
 
The index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [http://api.emailsrvr.com/v0/Schemas/DomainList.xsd DomainList.xsd]
 
The index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [http://api.emailsrvr.com/v0/Schemas/DomainList.xsd DomainList.xsd]
Line 33: Line 33:
 
<pre>
 
<pre>
 
<?xml version="1.0" encoding="utf-8"?>
 
<?xml version="1.0" encoding="utf-8"?>
<domainList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domainList">
+
<domainList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domainList">
 
   <offset>0</offset>
 
   <offset>0</offset>
 
   <size>50</size>
 
   <size>50</size>
Line 60: Line 61:
 
''Json Result Example'':
 
''Json Result Example'':
  
{"offset":0,"size":50,"total":3,"domains":[{"name":"apidomain53.com","accountNumber":"100000","serviceType":"both"},{"name":"apidomain66.com","accountNumber":"100001","serviceType":"both"},{"name":"apidomain68.com","accountNumber":"100002","serviceType":"both"}]}
+
<pre>
 
+
{"offset":0,"size":50,"total":3,"domains":
 
+
[{"name":"apidomain53.com","accountNumber":"100000","serviceType":"both"},
''Errors'':
+
{"name":"apidomain66.com","accountNumber":"100001","serviceType":"both"},
 
+
{"name":"apidomain68.com","accountNumber":"100002","serviceType":"both"}]}
{| border=1 class="simple"
+
</pre>
!''Description''
 
!''HTTP Response Code''
 
!''Sample Message''
 
|-
 
| Format is invalid
 
| 406
 
| Invalid format
 
|-
 
| Customer account number is invalid
 
| 404
 
| Invalid account number
 
|}
 
  
  
Line 84: Line 73:
 
''URL'':  
 
''URL'':  
  
  <nowiki>[GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)</nowiki>
  
  
Line 107: Line 96:
 
<pre>
 
<pre>
 
<?xml version="1.0" encoding="utf-8"?>
 
<?xml version="1.0" encoding="utf-8"?>
<domain xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domain">
+
<domain xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   <name>apidomain66.com</name>
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domain">
 +
   <name>apidomain21.com</name>
 
   <accountNumber>100000</accountNumber>
 
   <accountNumber>100000</accountNumber>
 
   <serviceType>both</serviceType>
 
   <serviceType>both</serviceType>
Line 121: Line 111:
 
   <rsEmailUsedStorage>0</rsEmailUsedStorage>
 
   <rsEmailUsedStorage>0</rsEmailUsedStorage>
 
   <aliases />
 
   <aliases />
   <hasArchivingService>false</hasArchivingService>
+
   <archivingServiceEnabled>false</archivingServiceEnabled>
   <hasBlackBerryMobileService>true</hasBlackBerryMobileService>
+
   <blackBerryMobileServiceEnabled>true</blackBerryMobileServiceEnabled>
 
   <blackBerryLicenses>4</blackBerryLicenses>
 
   <blackBerryLicenses>4</blackBerryLicenses>
   <hasActivesyncMobileService>true</hasActivesyncMobileService>
+
   <activeSyncMobileServiceEnabled>true</activeSyncMobileServiceEnabled>
 
   <activeSyncLicenses>4</activeSyncLicenses>
 
   <activeSyncLicenses>4</activeSyncLicenses>
   <hasGoodmobileMobileService>true</hasGoodmobileMobileService>
+
   <goodMobileServiceEnabled>true</goodMobileServiceEnabled>
   <goodmobileLicenses>4</goodmobileLicenses>
+
   <goodMobileLicenses>4</goodMobileLicenses>
 
</domain>
 
</domain>
 
</pre>
 
</pre>
Line 133: Line 123:
  
 
''Json Result Example'':
 
''Json Result Example'':
 
+
<pre>
{"name":"apidomain66.com","accountNumber":"200001","serviceType":"both","exchangeBaseMailboxSize":2048,"exchangeUsedStorage":0,"exchangeTotalStorage":18432,"exchangeExtraStorage":10240,"exchangeMaxNumMailboxes":4,"rsEmailBaseMailboxSize":2048,"rsEmailMaxNumberMailboxes":4,"rsEmailExtraStorage":10240,"rsEmailUsedStorage":0,"aliases":[],"hasArchivingService":false,"hasBlackBerryMobileService":true,"blackBerryLicenses":4,"hasActivesyncMobileService":true,"activeSyncLicenses":4,"hasGoodmobileMobileService":true,"goodmobileLicenses":4}
+
{"name":"apidomain21.com","accountNumber":"100000","serviceType":"both",
 
+
"exchangeBaseMailboxSize":2048,"exchangeUsedStorage":0,"exchangeTotalStorage":18432,
 
+
"exchangeExtraStorage":10240,"exchangeMaxNumMailboxes":4,"rsEmailBaseMailboxSize":2048,
''Errors'':
+
"rsEmailMaxNumberMailboxes":4,"rsEmailExtraStorage":10240,"rsEmailUsedStorage":0,
 
+
"aliases":[],"archivingServiceEnabled":false,"blackBerryMobileServiceEnabled":true,
{| border=1 class="simple"
+
"blackBerryLicenses":4,"activeSyncMobileServiceEnabled":true,"activeSyncLicenses":4,
!''Description''
+
"goodMobileServiceEnabled":true,"goodMobileLicenses":4}
!''HTTP Response Code''
+
</pre>
!''Sample Message''
 
|-
 
| Format is invalid
 
| 406
 
| Invalid format
 
|-
 
| Domain is not found
 
| 404
 
| abc.com not found
 
|}
 
  
  
Line 158: Line 138:
 
''URL'':  
 
''URL'':  
 
  <nowiki>
 
  <nowiki>
  Add: [POST] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
+
  Add: [POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
  Edit: [PUT] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
+
  Edit: [PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 
  </nowiki>
 
  </nowiki>
  
Line 168: Line 148:
  
 
   
 
   
{| border=1 class="simple"
+
{| class="wikitable"
 
!''Field Name''
 
!''Field Name''
 
!''Data Type''
 
!''Data Type''
 
!''Description''
 
!''Description''
|-  
+
|-
 
| serviceType
 
| serviceType
 
| string
 
| string
 
| Domain service type. "rsemail" = "Rackspace Email Only". "exchange" = "Exchange Only". "both" = "Rackspace Email and Exchange"
 
| Domain service type. "rsemail" = "Rackspace Email Only". "exchange" = "Exchange Only". "both" = "Rackspace Email and Exchange"
|-  
+
|-
 
| exchangeExtraStorage
 
| exchangeExtraStorage
 
| int
 
| int
 
| Exchange service extra storage in megabytes
 
| Exchange service extra storage in megabytes
|-  
+
|-
 
| exchangeMaxNumMailboxes
 
| exchangeMaxNumMailboxes
 
| int
 
| int
 
| Maximum number of mailboxes allowed under the domain Exchange service. Required for Adding Exchange service
 
| Maximum number of mailboxes allowed under the domain Exchange service. Required for Adding Exchange service
|-  
+
|-
 
| rsEmailBaseMailboxSize
 
| rsEmailBaseMailboxSize
 
| int
 
| int
 
| Rackspace Email base mailbox size in megabytes
 
| Rackspace Email base mailbox size in megabytes
|-  
+
|-
 
| rsEmailMaxNumberMailboxes
 
| rsEmailMaxNumberMailboxes
 
| int
 
| int
 
| Maximum number of mailboxes allowed under the domain Rackspace Email service. Required for Adding Rackspace Email service
 
| Maximum number of mailboxes allowed under the domain Rackspace Email service. Required for Adding Rackspace Email service
|-  
+
|-
 
| rsEmailExtraStorage
 
| rsEmailExtraStorage
 
| int
 
| int
 
| Rackspace Email service extra storage in megabytes
 
| Rackspace Email service extra storage in megabytes
|-  
+
|-
| blackberry
+
| blackBerryMobileServiceEnabled
 
| boolean
 
| boolean
| Enable or disable domain BlackBerryMobile service
+
| Enable or disable domain BlackBerry Mobile service
|-  
+
|-
| blackberryLicenses
+
| blackBerryLicenses
 
| int
 
| int
| Maximum number of mailboxes allowed to have BlackBerryMobile service. 0 means unlimited
+
| Maximum number of mailboxes allowed to have BlackBerry Mobile service. 0 means unlimited
|-  
+
|-
| activesync
+
| activeSyncMobileServiceEnabled
 
| boolean
 
| boolean
| Enable or disable domain ActiveSyncMobile service
+
| Enable or disable domain ActiveSync Mobile service
|-  
+
|-
| activesyncLicenses
+
| activeSyncLicenses
 
| int
 
| int
| Maximum number of mailboxes allowed to have ActiveSyncMobile service. 0 means unlimited
+
| Maximum number of mailboxes allowed to have ActiveSync Mobile service. 0 means unlimited
|-  
+
|-
| goodmobile
+
| goodMobileServiceEnabled
 
| boolean
 
| boolean
| Enable or disable domain GoodMobile service
+
| Enable or disable domain Good Mobile service
|-  
+
|-
| goodmobileLicenses
+
| goodMobileLicenses
 
| int
 
| int
| Maximum number of mailboxes allowed to have GoodMobile service. 0 means unlimited
+
| Maximum number of mailboxes allowed to have Good Mobile service. 0 means unlimited
|-  
+
|-
| hasArchivingService
+
| archivingServiceEnabled
 
| boolean
 
| boolean
 
| Enable or disable domain archiving service
 
| Enable or disable domain archiving service
|-  
+
|-
 
|}
 
|}
  
Line 234: Line 214:
 
{
 
{
 
   'maxNumMailboxes' => '5',
 
   'maxNumMailboxes' => '5',
   'extraStorage' => '1024'
+
   'extraStorage' => '1024'
 
}
 
}
 
</pre>
 
</pre>
Line 242: Line 222:
 
{
 
{
 
   'maxNumMailboxes' => '25',
 
   'maxNumMailboxes' => '25',
   'extraStorage' => '2048'
+
   'extraStorage' => '2048'
 
}
 
}
 
</pre>
 
</pre>
Line 249: Line 229:
 
''Errors'':
 
''Errors'':
  
{| border=1 class="simple"
+
{| class="wikitable"
 
!''Description''
 
!''Description''
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-
+
|-
| Format is invalid
 
| 406
 
| Invalid format
 
|-
 
| Customer account number is invalid
 
| 404
 
| Invalid account number
 
|-
 
| Form data has unrecognized field
 
| 400
 
| Unrecognized field: size
 
|-
 
| Required form field is missing
 
| 400
 
| Missing required field: maxNumMailboxes
 
|-
 
| Required form field has null or empty string input
 
| 400
 
| Required field name cannot be empty
 
|-
 
| Integer form field has non-integer input
 
| 400
 
| Invalid format for maxNumMailboxes, input must be an integer
 
|-  
 
 
| New domain name doesn't meet the naming requirements
 
| New domain name doesn't meet the naming requirements
 
| 400
 
| 400
 
| Invalid domain name
 
| Invalid domain name
|-  
+
|-
 
| New domain name already exists
 
| New domain name already exists
 
| 400
 
| 400
Line 292: Line 248:
 
''URL'':  
 
''URL'':  
  
  <nowiki>[PUT] http://api.emailsrvr.com/v0/customers/(new customer account number)/domains/(domain name)</nowiki>
+
  <nowiki>[PUT] https://api.emailsrvr.com/v0/customers/
 +
      (new customer account number)/domains/(domain name)</nowiki>
  
  
Line 300: Line 257:
  
 
   
 
   
{| border=1 class="simple"
+
{| class="wikitable"
 
!''Field Name''
 
!''Field Name''
 
!''Data Type''
 
!''Data Type''
 
!''Description''
 
!''Description''
|-  
+
|-
 
| moveDomain
 
| moveDomain
 
| boolean
 
| boolean
Line 322: Line 279:
 
{
 
{
 
   'moveDomain' => 'true'
 
   'moveDomain' => 'true'
 +
}
 +
</pre>
 +
 +
== Delete ==
 +
 +
''URL'':
 +
 +
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Deletes the domain.
 +
 +
 +
''Remarks'':
 +
 +
The domain and all the mailboxes, mailbox contents, groups, and contacts are deleted permanently.
 +
 +
 +
''Example'':
 +
 +
<pre>
 +
delete '/customers/12345678/domains/newcompany.com', 'text/xml'
 +
</pre>
 +
 +
 +
 +
== Spam ==
 +
 +
=== Index Blacklist ===
 +
 +
''URL'':
 +
<nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/blacklist</nowiki>
 +
 +
 +
''Description'':
 +
 +
This operation returns the email address blacklist associated with the domain.
 +
 +
 +
''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/Blacklist.xsd Blacklist.xsd]
 +
 +
 +
''Example'':
 +
<pre>
 +
get '/customers/12345678/domains/example.com/spam/blacklist', 'text/xml'
 +
</pre>
 +
 +
 +
''XML Result Example'':
 +
 +
<pre>
 +
<?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>
 +
</pre>
 +
 +
 +
''Json Result Example'':
 +
 +
{"addresses":["name1@spam.com","name2@spam.com"]}
 +
 +
=== Index IP Blacklist ===
 +
 +
''URL'':
 +
<nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipblacklist</nowiki>
 +
 +
 +
''Description'':
 +
 +
This operation returns IP blacklist associated with the domain.
 +
 +
 +
''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/IpBlacklist.xsd IpBlacklist.xsd]
 +
 +
 +
''Example'':
 +
<pre>
 +
get '/customers/12345678/domains/example.com/spam/ipblacklist', 'text/xml'
 +
</pre>
 +
 +
''XML Result Example':
 +
 +
<pre>
 +
<?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>
 +
</pre>
 +
 +
 +
''Json Result Example'':
 +
 +
{"addresses":["216.12.34.1","216.12.34.2"]}
 +
 +
=== Index Safelist ===
 +
 +
''URL'':
 +
<nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/safelist</nowiki>
 +
 +
 +
''Description'':
 +
 +
This operation returns email address safelist associated with the domain.
 +
 +
 +
''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/Safelist.xsd Safelist.xsd]
 +
 +
 +
''Example'':
 +
<pre>
 +
get '/customers/12345678/domains/example.com/spam/safelist', 'text/xml'
 +
</pre>
 +
 +
 +
''XML Result Example'':
 +
 +
<pre>
 +
<?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>
 +
</pre>
 +
 +
 +
''Json Result Example'':
 +
 +
{"addresses":["name1@notspam.com","name2@notspam.com"]}
 +
 +
=== Index IP Safelist ===
 +
 +
''URL'':
 +
<nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipsafelist</nowiki>
 +
 +
 +
''Description'':
 +
 +
This operation returns IP safelist associated with the domain.
 +
 +
 +
''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]
 +
 +
 +
''Example'':
 +
<pre>
 +
get '/customers/12345678/domains/example.com/spam/ipsafelist', 'text/xml'
 +
</pre>
 +
 +
 +
''XML Result Example'':
 +
 +
<pre>
 +
<?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>
 +
</pre>
 +
 +
 +
''Json Result Example'':
 +
 +
{"addresses":["192.168.0.1","192.168.0.2"]}
 +
 +
=== Add Blacklist ===
 +
 +
''URL'':
 +
<nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/blacklist/(email address)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Adds an email address or domain to the blacklist.
 +
 +
 +
''Example'':
 +
<pre>
 +
post '/customers/12345678/domains/example.com/spam/blacklist/anyone@spam.com', 'text/xml'
 +
</pre>
 +
 +
 +
''Errors'':
 +
 +
{| class="wikitable"
 +
!''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
 +
|}
 +
 +
 +
=== Add IP Blacklist ===
 +
 +
''URL'':
 +
<nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Adds an IP to the blacklist.
 +
 +
 +
''Example'':
 +
<pre>
 +
post '/customers/12345678/domains/example.com/spam/blacklist/216.12.34.1', 'text/xml'
 +
</pre>
 +
 +
 +
''Errors'':
 +
 +
{| class="wikitable"
 +
!''Description''
 +
!''HTTP Response Code''
 +
!''Sample Message''
 +
|-
 +
| Entered invalid IP address
 +
| 400
 +
| invalid ip address: 123
 +
|}
 +
 +
 +
=== Add Safelist ===
 +
 +
''URL'':
 +
<nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/safelist/(email address)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Adds an email address or domain to the safelist.
 +
 +
 +
''Example'':
 +
<pre>
 +
post '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com', 'text/xml'
 +
</pre>
 +
 +
 +
''Errors'':
 +
 +
{| class="wikitable"
 +
!''Description''
 +
!''HTTP Response Code''
 +
!''Sample Message''
 +
|-
 +
| Entered invalid email or domain
 +
| 400
 +
| invalid email address: abc
 +
|}
 +
 +
 +
=== Add IP Safelist ===
 +
 +
''URL'':
 +
<nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipsafelist/(ip address)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Adds an IP to the safelist.
 +
 +
 +
''Example'':
 +
<pre>
 +
post '/customers/12345678/domains/example.com/spam/safelist/216.12.34.1', 'text/xml'
 +
</pre>
 +
 +
 +
''Errors'':
 +
 +
{| class="wikitable"
 +
!''Description''
 +
!''HTTP Response Code''
 +
!''Sample Message''
 +
|-
 +
| Entered invalid IP address
 +
| 400
 +
| invalid ip address: 123
 +
|}
 +
 +
 +
=== Delete Blacklist ===
 +
 +
''URL'':
 +
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/blacklist/(email address)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Removes an email address or domain from the blacklist.
 +
 +
 +
''Example'':
 +
<pre>
 +
delete '/customers/12345678/domains/example.com/spam/blacklist/anyone@yahoo.com', 'text/xml'
 +
</pre>
 +
 +
 +
''Errors'':
 +
 +
{| class="wikitable"
 +
!''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
 +
|}
 +
 +
 +
=== Delete IP Blacklist ===
 +
 +
''URL'':
 +
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Removes an IP from the blacklist.
 +
 +
 +
''Example'':
 +
<pre>
 +
delete '/customers/12345678/domains/example.com/spam/ipblacklist/216.12.34.1', 'text/xml'
 +
</pre>
 +
 +
 +
''Errors'':
 +
 +
{| class="wikitable"
 +
!''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
 +
|}
 +
 +
 +
=== Delete Safelist ===
 +
 +
''URL'':
 +
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/safelist/(email address)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Removes an email address or domain from the safelist.
 +
 +
 +
''Example'':
 +
<pre>
 +
delete '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com', 'text/xml'
 +
</pre>
 +
 +
 +
''Errors'':
 +
 +
{| class="wikitable"
 +
!''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
 +
|}
 +
 +
 +
=== Delete IP Safelist ===
 +
 +
''URL'':
 +
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipsafelist/(email address)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Removes an IP from the safelist.
 +
 +
 +
''Example'':
 +
<pre>
 +
delete '/customers/12345678/domains/example.com/spam/ipsafelist/216.12.34.1', 'text/xml'
 +
</pre>
 +
 +
 +
''Errors'':
 +
 +
{| class="wikitable"
 +
!''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
 +
|}
 +
 +
 +
=== Show Spam Setting ===
 +
 +
''URL'':
 +
<nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/settings</nowiki>
 +
 +
 +
''Description'':
 +
 +
This operation returns the spam settings associated with the domain.
 +
 +
 +
''Remarks'':
 +
 +
The Show operation only supports the GET HTTP verb. For .xml format, refer to the following schema document: [http://api.emailsrvr.com/v0/Schemas/DomainSpamSetting.xsd DomainSpamSetting.xsd]
 +
 +
 +
''Example'':
 +
<pre>
 +
get '/customers/12345678/domains/example.com/spam/settings', 'text/xml'
 +
</pre>
 +
 +
 +
''XML Result Example'':
 +
 +
<pre>
 +
<?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>
 +
</pre>
 +
 +
 +
''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'':
 +
 +
<nowiki>[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/settings</nowiki>
 +
 +
 +
''Description'':
 +
 +
Edits the domain Spam Settings.
 +
 +
 +
 +
{| class="wikitable"
 +
!''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:
 +
{| class="wikitable"
 +
!''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:
 +
{| class="wikitable"
 +
!''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'':
 +
 +
<pre>
 +
put '/customers/me/domains/' + @@domain + '/spam/settings', 'text/xml',
 +
{
 +
  'filterLevel' => 'on',
 +
  'rsEmail.spamHandling' => 'toFolder',
 +
  'rsEmail.hasFolderCleaner' => 'true',
 +
  'rsEmail.spamFolderAgeLimit' => '7',
 +
  'rsEmail.spamFolderNumLimit' => '100',
 
}
 
}
 
</pre>
 
</pre>
Line 328: Line 891:
 
''Errors'':
 
''Errors'':
  
{| border=1 class="simple"
+
{| class="wikitable"
 
!''Description''
 
!''Description''
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
| Format is invalid
+
| Invalid input for Filter Level
| 406
+
| 400
| Invalid format
+
| Invalid FilterLevel: high. Input must be: on/off/exclusive
|-  
+
|-
| Domain is not found
+
| Invalid input for RSEmail SpamHandling
| 404
+
| 400
| abc.com not found
+
| Invalid RSEmail SpamHandling: nonuser. Input must be: toFolder/delete/labelSubject/toAddress
|-  
+
|-
| Customer is not found
+
| Invalid input for Exchange ForwardToDomainQuarantine
| 404
+
| 400
| Customer not found
+
| Invalid input for Exchange ForwardToDomainQuarantine: delete. Input must be: on/off/nonuser
 
|}
 
|}
  
  
== Delete ==
 
  
''URL'':
+
== Alternate Domains ==
 +
 
 +
=== Index ===
 +
 
 +
''URL'':  
  
  <nowiki>[DELETE] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/
 +
                domains/(domain name)/alternatedomains</nowiki>
  
  
 
''Description'':
 
''Description'':
  
Deletes the domain.
+
This operation returns a list of Domain Aliases and Accepted Domains for the domain. The type of the alternate domain is indicated by the 'type' data field. The XML schema for the returned data is [http://api.emailsrvr.com/v0/Schemas/DomainSplitRouting.xsd DomainAlternateList.xsd]
 +
 
 +
''Example'':
 +
 
 +
<pre>
 +
get '/customers/12345678/domains/test.com/alternatedomains', 'text/xml'
 +
</pre>
 +
 
 +
 
 +
''XML Result Example'':
 +
 
 +
<pre>
 +
<?xml version="1.0" encoding="utf-8"?>
 +
<alternateDomainList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domainAlternateList">
 +
  <alternateDomains>
 +
    <alternateDomain>
 +
      <name>domainalias.com</name>
 +
      <type>DomainAlias</type>
 +
    </alternateDomain>
 +
    <alternateDomain>
 +
      <name>accepteddomain.com</name>
 +
      <type>AcceptedDomain</type>
 +
    </alternateDomain>
 +
  </alternateDomains>
 +
</alternateDomainList>
 +
</pre>
 +
 
 +
 
 +
''Json Result Example'':
 +
 
 +
<pre>{"alternateDomains":[{"name":"domainalias.com","type":"DomainAlias"},{"name":"accepteddomain.com","type":"AcceptedDomain"}]}</pre>
 +
 
 +
=== Add ===
 +
 
 +
 
 +
''URL'':
 +
<nowiki>
 +
[POST] https://api.emailsrvr.com/v0/customers/(customer account number)
 +
    /domains/(domain name)/alternatedomains/(alternate domain name)
 +
</nowiki>
  
 
   
 
   
''Remarks'':
+
''Description'':
 +
 
 +
Adds either a Domain Alias or Accepted Domain to the domain.
  
The domain and all the mailboxes, mailbox contents, groups, and contacts are deleted permanently.
+
 +
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 +
!''Description''
 +
|-
 +
| type
 +
| string
 +
| Alternate domain type. Send "DomainAlias" for a domain alias, and "AcceptedDomain" for an accepted domain. (Required)
 +
|-
 +
| createForExistingRecipients
 +
| boolean
 +
| Whether the alternate addresses should be created for existing mailboxes when adding an Accepted Domain. Sending this field in the request when the type is Domain Alias will throw an error. This defaults to false.
 +
|-
 +
|}
  
 
   
 
   
Line 367: Line 990:
  
 
<pre>
 
<pre>
delete '/customers/12345678/domains/newcompany.com', 'text/xml'
+
post '/customers/123456/domains/example.com/alternatedomains/accepteddomain.com', 'text/xml',
 +
{
 +
  'type' => 'AcceptedDomain'
 +
  'createForExistingRecipients' => 'true'
 +
}
 
</pre>
 
</pre>
  
Line 373: Line 1,000:
 
''Errors'':
 
''Errors'':
  
{| border=1 class="simple"
+
{| class="wikitable"
 
!''Description''
 
!''Description''
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-  
+
|-
| Format is invalid
+
| New domain name doesn't meet the naming requirements
| 406
+
| 400
| Invalid format
+
| Invalid domain name
|-  
+
|-
| Domain is not found
+
| Alternate domain already exists
| 404
+
| 400
| abc.com not found
+
| abc.com already exists as a domain or alternate domain
 +
|-
 +
| The 'createForExistingRecipients' field was sent with either data, or as a null field. It should not be included in the form data at all.
 +
| 400
 +
| Invalid Alternate Domain Setting: createForExistingRecipients is an invalid setting for Domain Aliases
 +
|-
 +
| The only valid values for 'type' are 'DomainAlias' and 'AcceptedDomain', for a Domain Alias and Accepted Domain respectively.
 +
| 400
 +
| Invalid Alternate Domain type
 
|}
 
|}
  
 +
 +
=== Delete ===
 +
 +
 +
''URL'':
 +
 +
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/
 +
      domains/(domain name)/alternatedomains/(alternate domain name)</nowiki>
 +
 +
 +
''Description'':
 +
 +
Deletes the alternate domain.
 +
 +
''Example'':
 +
 +
<pre>
 +
delete '/customers/12345678/domains/example.com/alternatedomains/accepteddomain.com'
 +
</pre>
 +
 +
 +
== Split Domain Routing ==
 +
 +
=== Show Settings ===
 +
 +
''URL'':
 +
 +
<nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/splitdomainrouting</nowiki>
 +
 +
''Description'':
 +
Shows the current external email server. The XML schema document for the output of this command is [http://api.emailsrvr.com/v0/Schemas/DomainSplitRouting.xsd DomainSplitRouting.xsd]
 +
 +
 +
''Example'':
 +
 +
<pre>
 +
get '/customers/12345678/domains/company.com/splitdomainrouting', 'text/xml'
 +
</pre>
 +
 +
 +
''XML Result Example'':
 +
<pre>
 +
<?xml version="1.0" encoding="utf-8"?>
 +
<splitDomainRouting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:splitDomainRouting">
 +
  <externalServer>email.externalserver.com</externalServer>
 +
</splitDomainRouting>
 +
</pre>
 +
 +
 +
''JSON Result Example'':
 +
<pre>
 +
{"externalServer":"email.externalserver.com"}
 +
</pre>
 +
 +
=== Edit Settings ===
 +
 +
''URL'':
 +
 +
<nowiki>[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/splitdomainrouting</nowiki>
 +
 +
''Description'':
 +
 +
This command sets the external email server. This command will return a success when the verification passes. Since this involves communication to the external server the request may take some time. If the verification fails a 400 return code will be sent back with the verification's error message.
 +
 +
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 +
!''Description''
 +
|-
 +
| externalServer
 +
| string
 +
| The address of the external email server. To turn off split domain routing send 'none'. (Required)
 +
|-
 +
| verificationAddress
 +
| string
 +
| An email address part of your domain or one of the alternate domains that the external server is already set up to handle. (Required only when turning on split domain routing, Do not send this field if turning off.)
 +
|-
 +
|}
 +
 +
 +
''Example'':
 +
 +
<pre>
 +
put '/customers/12345678/domains/company.com/splitdomainrouting', 'text/xml',
 +
{
 +
  'externalServer' => 'email.externalserver.com',
 +
  'verificationAddress' => 'externalaccount@company.com',
 +
}
 +
</pre>
 +
 +
{| class="wikitable"
 +
!''Description''
 +
!''HTTP Response Code''
 +
!''Sample Message''
 +
|-
 +
| The SMTP host could not be found.
 +
| 400
 +
| One of the verification error messages.
 +
|}
  
  
Line 393: Line 1,128:
 
''URL'':
 
''URL'':
  
  <nowiki>[GET] http://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/archivingSSOLoginURL</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/archivingSSOLoginURL</nowiki>
  
  
Line 415: Line 1,150:
 
''Errors'':
 
''Errors'':
  
{| border=1 class="simple"
+
{| class="wikitable"
 
!''Description''
 
!''Description''
 
!''HTTP Response Code''
 
!''HTTP Response Code''
 
!''Sample Message''
 
!''Sample Message''
|-
+
|-
| Format is invalid
 
| 406
 
| Invalid format
 
|-
 
| Domain is not found
 
| 404
 
| abc.com not found
 
|-  
 
 
| No archiving service
 
| No archiving service
 
| 404
 
| 404
 
| Domain abc.com has no archiving service enabled
 
| Domain abc.com has no archiving service enabled
 
|}
 
|}

Revision as of 11:20, 30 November 2009


Index

URL:

[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains


Description:

This operation returns a list of domains under the account. If a customer account is specified, then a list of domains under that specific account will be returned.


Remarks:

To retrieve a list of domains owned by the account that is logged in, use "me" as the customer account number i.e. 'https://api.emailsrvr.com/v0/customers/me/domains'. To retrieve a list of domains owned by all customer sub-accounts and your own account, use "all" as the customer account number.

The index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: DomainList.xsd


Example:

get '/customers/all/domains?size=100&page=1', 'text/xml'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<domainList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domainList">
  <offset>0</offset>
  <size>50</size>
  <total>3</total>
  <domains>
    <domain>
      <name>apidomain53.com</name>
      <accountNumber>100000</accountNumber>
      <serviceType>both</serviceType>
    </domain>
    <domain>
      <name>apidomain66.com</name>
      <accountNumber>100001</accountNumber>
      <serviceType>both</serviceType>
    </domain>
    <domain>
      <name>apidomain68.com</name>
      <accountNumber>100002</accountNumber>
      <serviceType>both</serviceType>
    </domain>
  </domains>
</domainList>


Json Result Example:

{"offset":0,"size":50,"total":3,"domains":
[{"name":"apidomain53.com","accountNumber":"100000","serviceType":"both"},
{"name":"apidomain66.com","accountNumber":"100001","serviceType":"both"},
{"name":"apidomain68.com","accountNumber":"100002","serviceType":"both"}]}


Show

URL:

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


Description:

The show operation will return detailed information about the specified domain name.


Remarks:

The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: Domain.xsd


Example:

get '/customers/999999/domains/example.com', 'text/xml'

XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<domain xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domain">
  <name>apidomain21.com</name>
  <accountNumber>100000</accountNumber>
  <serviceType>both</serviceType>
  <exchangeBaseMailboxSize>2048</exchangeBaseMailboxSize>
  <exchangeUsedStorage>0</exchangeUsedStorage>
  <exchangeTotalStorage>18432</exchangeTotalStorage>
  <exchangeExtraStorage>10240</exchangeExtraStorage>
  <exchangeMaxNumMailboxes>4</exchangeMaxNumMailboxes>
  <rsEmailBaseMailboxSize>2048</rsEmailBaseMailboxSize>
  <rsEmailMaxNumberMailboxes>4</rsEmailMaxNumberMailboxes>
  <rsEmailExtraStorage>10240</rsEmailExtraStorage>
  <rsEmailUsedStorage>0</rsEmailUsedStorage>
  <aliases />
  <archivingServiceEnabled>false</archivingServiceEnabled>
  <blackBerryMobileServiceEnabled>true</blackBerryMobileServiceEnabled>
  <blackBerryLicenses>4</blackBerryLicenses>
  <activeSyncMobileServiceEnabled>true</activeSyncMobileServiceEnabled>
  <activeSyncLicenses>4</activeSyncLicenses>
  <goodMobileServiceEnabled>true</goodMobileServiceEnabled>
  <goodMobileLicenses>4</goodMobileLicenses>
</domain>


Json Result Example:

{"name":"apidomain21.com","accountNumber":"100000","serviceType":"both",
"exchangeBaseMailboxSize":2048,"exchangeUsedStorage":0,"exchangeTotalStorage":18432,
"exchangeExtraStorage":10240,"exchangeMaxNumMailboxes":4,"rsEmailBaseMailboxSize":2048,
"rsEmailMaxNumberMailboxes":4,"rsEmailExtraStorage":10240,"rsEmailUsedStorage":0,
"aliases":[],"archivingServiceEnabled":false,"blackBerryMobileServiceEnabled":true,
"blackBerryLicenses":4,"activeSyncMobileServiceEnabled":true,"activeSyncLicenses":4,
"goodMobileServiceEnabled":true,"goodMobileLicenses":4}


Add/Edit

URL:

 Add: [POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 Edit: [PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 


Description:

Adds/edits a new domain to the account with the data specified. To add a domain to your own account, use your own account id.


Field Name Data Type Description
serviceType string Domain service type. "rsemail" = "Rackspace Email Only". "exchange" = "Exchange Only". "both" = "Rackspace Email and Exchange"
exchangeExtraStorage int Exchange service extra storage in megabytes
exchangeMaxNumMailboxes int Maximum number of mailboxes allowed under the domain Exchange service. Required for Adding Exchange service
rsEmailBaseMailboxSize int Rackspace Email base mailbox size in megabytes
rsEmailMaxNumberMailboxes int Maximum number of mailboxes allowed under the domain Rackspace Email service. Required for Adding Rackspace Email service
rsEmailExtraStorage int Rackspace Email service extra storage in megabytes
blackBerryMobileServiceEnabled boolean Enable or disable domain BlackBerry Mobile service
blackBerryLicenses int Maximum number of mailboxes allowed to have BlackBerry Mobile service. 0 means unlimited
activeSyncMobileServiceEnabled boolean Enable or disable domain ActiveSync Mobile service
activeSyncLicenses int Maximum number of mailboxes allowed to have ActiveSync Mobile service. 0 means unlimited
goodMobileServiceEnabled boolean Enable or disable domain Good Mobile service
goodMobileLicenses int Maximum number of mailboxes allowed to have Good Mobile service. 0 means unlimited
archivingServiceEnabled boolean Enable or disable domain archiving service


Example:

post '/customers/123455/domains/newcompany.com', 'text/xml',
{
  'maxNumMailboxes' => '5',
  'extraStorage' => '1024'
}
put '/customers/123455/domains/newcompany.com', 'text/xml',
{
  'maxNumMailboxes' => '25',
  'extraStorage' => '2048'
}


Errors:

Description HTTP Response Code Sample Message
New domain name doesn't meet the naming requirements 400 Invalid domain name
New domain name already exists 400 abc.com already exists as a domain or alternate domain


Move

URL:

[PUT] https://api.emailsrvr.com/v0/customers/
      (new customer account number)/domains/(domain name)


Description:

Moves the domain to another customer account.


Field Name Data Type Description
moveDomain boolean Indicate whether or not moving the domain


Remarks:

Note 'Move Domain' and 'Edit Domain' share the same URI and HTTP verb. When the domain doesn't belong to the customer and 'moveDomain' is set to 'true', API will take the request as a 'Move Domain' call.


Example:

put '/customers/123456/domains/newcompany.com', 'text/xml',
{
  'moveDomain' => 'true'
}

Delete

URL:

[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)


Description:

Deletes the domain.


Remarks:

The domain and all the mailboxes, mailbox contents, groups, and contacts are deleted permanently.


Example:

delete '/customers/12345678/domains/newcompany.com', 'text/xml'


Spam

Index Blacklist

URL:

[GET] https://api.emailsrvr.com/v0/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. For .xml format, refer to the following schema document: Blacklist.xsd


Example:

get '/customers/12345678/domains/example.com/spam/blacklist', 'text/xml'


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"]}

Index IP Blacklist

URL:

[GET] https://api.emailsrvr.com/v0/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. For .xml format, refer to the following schema document: IpBlacklist.xsd


Example:

get '/customers/12345678/domains/example.com/spam/ipblacklist', 'text/xml'

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"]}

Index Safelist

URL:

[GET] https://api.emailsrvr.com/v0/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. For .xml format, refer to the following schema document: Safelist.xsd


Example:

get '/customers/12345678/domains/example.com/spam/safelist', 'text/xml'


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"]}

Index IP Safelist

URL:

[GET] https://api.emailsrvr.com/v0/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. For .xml format, refer to the following schema document: IpSafelist.xsd


Example:

get '/customers/12345678/domains/example.com/spam/ipsafelist', 'text/xml'


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 Blacklist

URL:

[POST] https://api.emailsrvr.com/v0/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', 'text/xml'


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


Add IP Blacklist

URL:

[POST] https://api.emailsrvr.com/v0/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', 'text/xml'


Errors:

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


Add Safelist

URL:

[POST] https://api.emailsrvr.com/v0/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', 'text/xml'


Errors:

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


Add IP Safelist

URL:

[POST] https://api.emailsrvr.com/v0/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', 'text/xml'


Errors:

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


Delete Blacklist

URL:

[DELETE] https://api.emailsrvr.com/v0/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', 'text/xml'


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


Delete IP Blacklist

URL:

[DELETE] https://api.emailsrvr.com/v0/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', 'text/xml'


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


Delete Safelist

URL:

[DELETE] https://api.emailsrvr.com/v0/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', 'text/xml'


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


Delete IP Safelist

URL:

[DELETE] https://api.emailsrvr.com/v0/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', 'text/xml'


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


Show Spam Setting

URL:

[GET] https://api.emailsrvr.com/v0/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. For .xml format, refer to the following schema document: DomainSpamSetting.xsd


Example:

get '/customers/12345678/domains/example.com/spam/settings', 'text/xml'


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/v0/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/' + @@domain + '/spam/settings', 'text/xml', 
{
  '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


Alternate Domains

Index

URL:

[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/
                domains/(domain name)/alternatedomains


Description:

This operation returns a list of Domain Aliases and Accepted Domains for the domain. The type of the alternate domain is indicated by the 'type' data field. The XML schema for the returned data is DomainAlternateList.xsd

Example:

get '/customers/12345678/domains/test.com/alternatedomains', 'text/xml'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<alternateDomainList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domainAlternateList">
  <alternateDomains>
    <alternateDomain>
      <name>domainalias.com</name>
      <type>DomainAlias</type>
    </alternateDomain>
    <alternateDomain>
      <name>accepteddomain.com</name>
      <type>AcceptedDomain</type>
    </alternateDomain>
  </alternateDomains>
</alternateDomainList>


Json Result Example:

{"alternateDomains":[{"name":"domainalias.com","type":"DomainAlias"},{"name":"accepteddomain.com","type":"AcceptedDomain"}]}

Add

URL:

 [POST] https://api.emailsrvr.com/v0/customers/(customer account number)
    /domains/(domain name)/alternatedomains/(alternate domain name)
 


Description:

Adds either a Domain Alias or Accepted Domain to the domain.


Field Name Data Type Description
type string Alternate domain type. Send "DomainAlias" for a domain alias, and "AcceptedDomain" for an accepted domain. (Required)
createForExistingRecipients boolean Whether the alternate addresses should be created for existing mailboxes when adding an Accepted Domain. Sending this field in the request when the type is Domain Alias will throw an error. This defaults to false.


Example:

post '/customers/123456/domains/example.com/alternatedomains/accepteddomain.com', 'text/xml',
{
  'type' => 'AcceptedDomain'
  'createForExistingRecipients' => 'true'
}


Errors:

Description HTTP Response Code Sample Message
New domain name doesn't meet the naming requirements 400 Invalid domain name
Alternate domain already exists 400 abc.com already exists as a domain or alternate domain
The 'createForExistingRecipients' field was sent with either data, or as a null field. It should not be included in the form data at all. 400 Invalid Alternate Domain Setting: createForExistingRecipients is an invalid setting for Domain Aliases
The only valid values for 'type' are 'DomainAlias' and 'AcceptedDomain', for a Domain Alias and Accepted Domain respectively. 400 Invalid Alternate Domain type


Delete

URL:

[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/
      domains/(domain name)/alternatedomains/(alternate domain name)


Description:

Deletes the alternate domain.

Example:

delete '/customers/12345678/domains/example.com/alternatedomains/accepteddomain.com'


Split Domain Routing

Show Settings

URL:

[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/splitdomainrouting

Description: Shows the current external email server. The XML schema document for the output of this command is DomainSplitRouting.xsd


Example:

get '/customers/12345678/domains/company.com/splitdomainrouting', 'text/xml'


XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<splitDomainRouting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:splitDomainRouting">
  <externalServer>email.externalserver.com</externalServer>
</splitDomainRouting>


JSON Result Example:

{"externalServer":"email.externalserver.com"}

Edit Settings

URL:

[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/splitdomainrouting

Description:

This command sets the external email server. This command will return a success when the verification passes. Since this involves communication to the external server the request may take some time. If the verification fails a 400 return code will be sent back with the verification's error message.

Field Name Data Type Description
externalServer string The address of the external email server. To turn off split domain routing send 'none'. (Required)
verificationAddress string An email address part of your domain or one of the alternate domains that the external server is already set up to handle. (Required only when turning on split domain routing, Do not send this field if turning off.)


Example:

put '/customers/12345678/domains/company.com/splitdomainrouting', 'text/xml',
{
  'externalServer' => 'email.externalserver.com',
  'verificationAddress' => 'externalaccount@company.com',
}
Description HTTP Response Code Sample Message
The SMTP host could not be found. 400 One of the verification error messages.


Archiving SSO Login URL

URL:

[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/archivingSSOLoginURL


Description:

Gets the domain archiving service SSO login URL.


Remarks:

The retrieved URL can be used in browser to access the domain archiving control panel.


Example:

get '/customers/12345678/domains/company.com/archivingSSOLoginURL', 'text/xml'


Errors:

Description HTTP Response Code Sample Message
No archiving service 404 Domain abc.com has no archiving service enabled