Difference between revisions of "Domain (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
(Sync to latest)
(Add/Edit (Reseller Only): document rsEmailProduct field)
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
  
 +
== v1 - Current ==
  
== Index ==
+
=== Index ===
  
  
 
''URL'':  
 
''URL'':  
  
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains</nowiki>
  
  
Line 17: Line 18:
 
''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>'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]
+
*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/v1/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. <nowiki>'https://api.emailsrvr.com/v1/customers/all/domains'</nowiki>.
 +
*To retrieve a list of domains owned by a single customer sub-account, use the subaccounts account number in the url. <nowiki>'https://api.emailsrvr.com/v1/customers/{subaccount number}/domains'</nowiki>.
 +
*Leaving the customers/{customer account number} out of the url is acceptable and returns the sames results as /customers/me
 +
<nowiki>'https://api.emailsrvr.com/v1/domains'</nowiki>.  
  
 +
*The index operation only supports the GET HTTP verb.
  
 
''Example'':
 
''Example'':
  
 
<pre>
 
<pre>
get '/customers/all/domains?size=100&page=1', 'text/xml'
+
get '/customers/all/domains?size=100&offset=10'
 +
</pre>
 +
 
 +
 
 +
''domainNames Parameter '''(V1 only)''''':
 +
The optional query string parameter "domainNames" can be used to retrieve a specific subset of domains by hostname. Up to 100 hostnames can be given at once in a comma-delimited list.
 +
<pre>
 +
get '/customers/all/domains?domainNames=apidomain53.com,apidomain66.com,apidomain68.com', 'application/json'
 
</pre>
 
</pre>
  
Line 43: Line 55:
 
       <accountNumber>100000</accountNumber>
 
       <accountNumber>100000</accountNumber>
 
       <serviceType>both</serviceType>
 
       <serviceType>both</serviceType>
 +
      <exchangeMaxNumMailboxes>10</exchangeMaxNumMailboxes>
 +
      <exchangeUsedStorage>4</exchangeUsedStorage>
 +
      <rsEmailMaxNumberMailboxes>10</rsEmailMaxNumberMailboxes>
 +
      <rsEmailUsedStorage>9</rsEmailUsedStorage>
 
     </domain>
 
     </domain>
 
     <domain>
 
     <domain>
 
       <name>apidomain66.com</name>
 
       <name>apidomain66.com</name>
 
       <accountNumber>100001</accountNumber>
 
       <accountNumber>100001</accountNumber>
       <serviceType>both</serviceType>
+
       <serviceType>rsemail</serviceType>
 +
      <exchangeMaxNumMailboxes>0</exchangeMaxNumMailboxes>
 +
      <exchangeUsedStorage>0</exchangeUsedStorage>
 +
      <rsEmailMaxNumberMailboxes>100</rsEmailMaxNumberMailboxes>
 +
      <rsEmailUsedStorage>40</rsEmailUsedStorage>
 
     </domain>
 
     </domain>
 
     <domain>
 
     <domain>
 
       <name>apidomain68.com</name>
 
       <name>apidomain68.com</name>
 
       <accountNumber>100002</accountNumber>
 
       <accountNumber>100002</accountNumber>
       <serviceType>both</serviceType>
+
       <serviceType>exchange</serviceType>
 +
      <exchangeMaxNumMailboxes>50</exchangeMaxNumMailboxes>
 +
      <exchangeUsedStorage>10</exchangeUsedStorage>
 +
      <rsEmailMaxNumberMailboxes>0</rsEmailMaxNumberMailboxes>
 +
      <rsEmailUsedStorage>0</rsEmailUsedStorage>
 
     </domain>
 
     </domain>
 
   </domains>
 
   </domains>
Line 63: Line 87:
 
<pre>
 
<pre>
 
{"offset":0,"size":50,"total":3,"domains":
 
{"offset":0,"size":50,"total":3,"domains":
[{"name":"apidomain53.com","accountNumber":"100000","serviceType":"both"},
+
[{"name":"apidomain53.com","accountNumber":"100000","serviceType":"both","exchangeMaxNumMailboxes":"10","exchangeUsedStorage":"4","rsEmailMaxNumberMailboxes":"10","rsEmailUsedStorage":"9"},
{"name":"apidomain66.com","accountNumber":"100001","serviceType":"both"},
+
{"name":"apidomain66.com","accountNumber":"100001","serviceType":"rsemail","exchangeMaxNumMailboxes":"0","exchangeUsedStorage":"0","rsEmailMaxNumberMailboxes":"100","rsEmailUsedStorage":"40"},
{"name":"apidomain68.com","accountNumber":"100002","serviceType":"both"}]}
+
{"name":"apidomain68.com","accountNumber":"100002","serviceType":"exchange","exchangeMaxNumMailboxes":"50","exchangeUsedStorage":"10","rsEmailMaxNumberMailboxes":"0","rsEmailUsedStorage":"0"}]}
 
</pre>
 
</pre>
  
 +
=== Export ===
 +
 +
''URL'':
 +
 +
<nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains?exportTo={email address}</nowiki>
 +
 +
 +
''Description'':
 +
 +
Use this route to export a file that includes details for domains on an account.
 +
 +
 +
''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>'https://api.emailsrvr.com/v1/customers/me/domains?exportTo=myAdminEmail@example.com'</nowiki>.
 +
*To retrieve a list of domains owned by all customer sub-accounts and your own account, use "all" as the customer account number. <nowiki>'https://api.emailsrvr.com/v1/customers/all/domains?exportTo=myAdminEmail@example.com'</nowiki>.
 +
*To retrieve a list of domains owned by a single customer sub-account, use the subaccounts account number in the url. <nowiki>'https://api.emailsrvr.com/v1/customers/{subaccount number}/domains?exportTo=myAdminEmail@example.com'</nowiki>.
 +
*Leaving the customers/{customer account number} out of the url is acceptable and returns the sames results as /customers/me
 +
<nowiki>'https://api.emailsrvr.com/v1/domains?exportTo=myAdminEmail@example.com'</nowiki>.
 +
*The export route supports 'contains' and 'startswith' filtering
  
== Show ==
+
=== Show ===
  
 
''URL'':  
 
''URL'':  
  
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)</nowiki>
  
  
Line 83: Line 127:
 
''Remarks'':
 
''Remarks'':
  
The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [http://api.emailsrvr.com/v0/Schemas/Domain.xsd Domain.xsd]
+
The show operation only supports the GET HTTP verb.
 +
 
 +
 
 +
''Notes'':
 +
 
 +
# These two fields 'exchangeUsedStorage' and 'rsEmailUsedStorage' actually return the number of active mailboxes in each service respectively.  
 +
# Due to a performance issue Domain Public Folder Status is now returned from an individual URL. See [[Domain_(Rest_API)#Show_Status | Public Folders Status]]. The field 'publicFoldersEnabled' from Show Domain result always returns 'false'.
  
  
Line 89: Line 139:
  
 
<pre>
 
<pre>
get '/customers/999999/domains/example.com', 'text/xml'
+
get '/customers/999999/domains/example.com'
 
</pre>
 
</pre>
  
Line 112: Line 162:
 
   <aliases />
 
   <aliases />
 
   <archivingServiceEnabled>false</archivingServiceEnabled>
 
   <archivingServiceEnabled>false</archivingServiceEnabled>
 +
  <publicFoldersEnabled>false</publicFoldersEnabled>
 
   <blackBerryMobileServiceEnabled>true</blackBerryMobileServiceEnabled>
 
   <blackBerryMobileServiceEnabled>true</blackBerryMobileServiceEnabled>
 
   <blackBerryLicenses>4</blackBerryLicenses>
 
   <blackBerryLicenses>4</blackBerryLicenses>
 
   <activeSyncMobileServiceEnabled>true</activeSyncMobileServiceEnabled>
 
   <activeSyncMobileServiceEnabled>true</activeSyncMobileServiceEnabled>
 
   <activeSyncLicenses>4</activeSyncLicenses>
 
   <activeSyncLicenses>4</activeSyncLicenses>
  <goodMobileServiceEnabled>true</goodMobileServiceEnabled>
 
  <goodMobileLicenses>4</goodMobileLicenses>
 
 
</domain>
 
</domain>
 
</pre>
 
</pre>
Line 128: Line 177:
 
"exchangeExtraStorage":10240,"exchangeMaxNumMailboxes":4,"rsEmailBaseMailboxSize":2048,
 
"exchangeExtraStorage":10240,"exchangeMaxNumMailboxes":4,"rsEmailBaseMailboxSize":2048,
 
"rsEmailMaxNumberMailboxes":4,"rsEmailExtraStorage":10240,"rsEmailUsedStorage":0,
 
"rsEmailMaxNumberMailboxes":4,"rsEmailExtraStorage":10240,"rsEmailUsedStorage":0,
"aliases":[],"archivingServiceEnabled":false,"blackBerryMobileServiceEnabled":true,
+
"aliases":[],"archivingServiceEnabled":false,"publicFoldersEnabled":false,
"blackBerryLicenses":4,"activeSyncMobileServiceEnabled":true,"activeSyncLicenses":4,
+
"blackBerryMobileServiceEnabled":true,"blackBerryLicenses":4,"activeSyncMobileServiceEnabled":true,
"goodMobileServiceEnabled":true,"goodMobileLicenses":4}
+
"activeSyncLicenses":4}
 
</pre>
 
</pre>
  
 
+
=== Add/Edit (Reseller Only)===
== Add/Edit (Reseller Only) ==
 
  
 
''URL'':  
 
''URL'':  
 
  <nowiki>
 
  <nowiki>
  Add: [POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
+
  Add: [POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)
  Edit: [PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
+
  Edit: [PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)
 
  </nowiki>
 
  </nowiki>
  
+
 
 
''Description'':
 
''Description'':
  
Line 164: Line 212:
 
| 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
 +
|-
 +
| rsEmailProduct
 +
| string
 +
| Rackspace Email product type. "rse-basic" = "Basic (Email)". "rse-plus" = "Plus (Email, Mobile Sync, Drive, and Docs)"
 
|-
 
|-
 
| rsEmailBaseMailboxSize
 
| rsEmailBaseMailboxSize
Line 193: Line 245:
 
| Maximum number of mailboxes allowed to have ActiveSync Mobile service. 0 means unlimited
 
| Maximum number of mailboxes allowed to have ActiveSync Mobile service. 0 means unlimited
 
|-
 
|-
| goodMobileServiceEnabled
+
| goodMobileServiceEnabled (deprecated)
 
| boolean
 
| boolean
 
| Enable or disable domain Good Mobile service
 
| Enable or disable domain Good Mobile service
 
|-
 
|-
| goodMobileLicenses
+
| goodMobileLicenses (deprecated)
 
| int
 
| int
 
| Maximum number of mailboxes allowed to have Good Mobile service. 0 means unlimited
 
| Maximum number of mailboxes allowed to have Good Mobile service. 0 means unlimited
Line 204: Line 256:
 
| boolean
 
| boolean
 
| Enable or disable domain archiving service
 
| Enable or disable domain archiving service
|-
 
 
|}
 
|}
  
Line 211: Line 262:
  
 
<pre>
 
<pre>
post '/customers/123455/domains/newcompany.com', 'text/xml',
+
post '/customers/123455/domains/newcompany.com',
 
{
 
{
 
   'maxNumMailboxes' => '5',
 
   'maxNumMailboxes' => '5',
Line 219: Line 270:
  
 
<pre>
 
<pre>
put '/customers/123455/domains/newcompany.com', 'text/xml',
+
put '/customers/123455/domains/newcompany.com',
 
{
 
{
 
   'maxNumMailboxes' => '25',
 
   'maxNumMailboxes' => '25',
Line 243: Line 294:
 
|}
 
|}
  
 +
''Notes'':
 +
 +
When setting <code>rsEmailProduct</code>, there is a short delay before the change is reflected, while the upgrade (or downgrade) process is happening.
  
== Move (Reseller Only) ==
+
=== Move (Reseller Only)===
  
 
''URL'':  
 
''URL'':  
  
  <nowiki>[PUT] https://api.emailsrvr.com/v0/customers/
+
  <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/
 
       (new customer account number)/domains/(domain name)</nowiki>
 
       (new customer account number)/domains/(domain name)</nowiki>
  
Line 254: Line 308:
 
''Description'':
 
''Description'':
  
Moves the domain to another customer account.
+
Moves a domain among your account and subaccounts.
  
 
 
{| class="wikitable"
 
{| class="wikitable"
 
!''Field Name''
 
!''Field Name''
Line 276: Line 329:
  
 
<pre>
 
<pre>
put '/customers/123456/domains/newcompany.com', 'text/xml',
+
put '/customers/123456/domains/newcompany.com',
 
{
 
{
 
   'moveDomain' => 'true'
 
   'moveDomain' => 'true'
Line 282: Line 335:
 
</pre>
 
</pre>
  
== Delete (Reseller Only) ==
+
=== Transfer ===
 
 
''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 ==
+
Transfers ownership of a domain to another customer.  You can start, read, and cancel the transfer.  The other customer can finish the transfer.
  
=== Index Blacklist ===
+
==== Start ====
  
 
''URL'':
 
''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>
 
<pre>
<?xml version="1.0" encoding="utf-8"?>
+
[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/transfer
<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>
 
</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'':
 
''Description'':
  
This operation returns IP blacklist associated with the domain.  
+
Creates a transfer, which is represented by a token.  A transfer also has an expiration, which is represented by an RFC 3339 formatted timestamp. After the expiration, the transfer is automatically canceled.
 
 
 
 
''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'':
 
''Example'':
<pre>
 
get '/customers/12345678/domains/example.com/spam/ipblacklist', 'text/xml'
 
</pre>
 
 
''XML Result Example':
 
  
 
<pre>
 
<pre>
<?xml version="1.0" encoding="utf-8"?>
+
post'/customers/12345678/domains/company.com/transfer', 'application/json'
<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>
 
</pre>
  
 +
''JSON Result Example'':
  
''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>
 
<pre>
get '/customers/12345678/domains/example.com/spam/safelist', 'text/xml'
+
{
 +
  "Token": "b77b8460-5019-48e0-a5eb-4951640ea3cd",
 +
  "Expiration": "2014-08-20T17:28:44Z"
 +
}
 
</pre>
 
</pre>
  
 
+
''Errors'':
''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"
 
{| class="wikitable"
Line 488: Line 373:
 
!''Sample Message''
 
!''Sample Message''
 
|-
 
|-
| Entered invalid email or domain
+
| The domain does not exist or is not accessible by the admin
| 400
+
| 404
| invalid email address: abc
+
| example.com not found
|-
 
| Entered current domain
 
| 400
 
| Adding example.com would blacklist the current domain
 
 
|}
 
|}
  
 +
==== Read ====
  
=== Add IP Blacklist ===
+
''URL'':  
 
 
''URL'':
 
<nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/spam/ipblacklist/(ip address)</nowiki>
 
  
 +
<pre>
 +
[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/transfer
 +
</pre>
  
 
''Description'':
 
''Description'':
  
Adds an IP to the blacklist.
+
Retrieves the domain transfer information for the domain that was returned by the request to start the transfer.
  
 +
''Example'':
  
''Example'':
 
 
<pre>
 
<pre>
post '/customers/12345678/domains/example.com/spam/blacklist/216.12.34.1', 'text/xml'
+
get '/customers/12345678/domains/company.com/transfer', 'application/json'
 
</pre>
 
</pre>
  
 +
''JSON Result Example'':
  
''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>
 
<pre>
post '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com', 'text/xml'
+
{
 +
  "Token": "b77b8460-5019-48e0-a5eb-4951640ea3cd",
 +
  "Expiration": "2014-08-20T17:28:44Z"
 +
}
 
</pre>
 
</pre>
  
 
+
''Errors'':
''Errors'':  
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 552: Line 412:
 
!''Sample Message''
 
!''Sample Message''
 
|-
 
|-
| Entered invalid email or domain
+
| No transfer has been started, or the transfer has expired
| 400
+
| 404
| invalid email address: abc
+
| Domain transfer offer not found.
 
|}
 
|}
  
 +
==== Cancel ====
  
=== Add IP Safelist ===
+
''URL'':  
 
 
''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>
 
<pre>
post '/customers/12345678/domains/example.com/spam/safelist/216.12.34.1', 'text/xml'
+
[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/transfer
 
</pre>
 
</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'':
 
''Description'':
  
Removes an email address or domain from the blacklist.
+
Cancels a domain transfer.
  
 +
''Example'':
  
''Example'':
 
 
<pre>
 
<pre>
delete '/customers/12345678/domains/example.com/spam/blacklist/anyone@yahoo.com', 'text/xml'
+
delete '/customers/12345678/domains/company.com/transfer', 'application/json'
 
</pre>
 
</pre>
  
 +
==== Finish ====
  
''Errors'':
+
''URL'':  
 
 
{| 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>
 
<pre>
delete '/customers/12345678/domains/example.com/spam/ipblacklist/216.12.34.1', 'text/xml'
+
[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/transfer/finish
 
</pre>
 
</pre>
  
 +
''Description'':
  
''Errors'':
+
Finish a domain transfer.  This API request must be made by an admin that is on the account that will accept the domain.  When the request completes successfully, assigns ownership of the domain to the company of the authenticated admin.  That company will have full control of the domain, and accepts billing for services associated with the domain.
  
 
{| class="wikitable"
 
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 
!''Description''
 
!''Description''
!''HTTP Response Code''
 
!''Sample Message''
 
 
|-
 
|-
| Entered invalid IP address
+
| token
| 400
+
| string
| invalid ip address: 123
+
| the token returned by the POST or GET to this resource by an admin with access to the domain
|-
 
| Entered IP is not on the current blacklist
 
| 400
 
| 216.12.34.1 is not found on the blacklist
 
 
|}
 
|}
  
 +
''Example'':
  
=== 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>
 
<pre>
delete '/customers/12345678/domains/example.com/spam/safelist/anyone@yahoo.com', 'text/xml'
+
post '/customers/12345678/domains/company.com/transfers/finish', 'application/json',
 +
{
 +
  'Token' => 'b77b8460-5019-48e0-a5eb-4951640ea3cd'
 +
}
 
</pre>
 
</pre>
  
 +
''JSON Result Example'':
  
''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>
 
<pre>
delete '/customers/12345678/domains/example.com/spam/ipsafelist/216.12.34.1', 'text/xml'
+
{
 +
  "Token": "b77b8460-5019-48e0-a5eb-4951640ea3cd",
 +
  "Expiration": "2014-08-20T17:28:44Z"
 +
}
 
</pre>
 
</pre>
 
+
''Errors'':
 
 
''Errors'':  
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 714: Line 481:
 
!''Sample Message''
 
!''Sample Message''
 
|-
 
|-
| Entered invalid IP address
+
| The domain does not exist or is not accessible by the admin
| 400
+
| 404
| invalid ip address: 123
+
| example.com not found
 
|-
 
|-
| Entered IP is not on the current safelist
+
| The transfer token is invalid
| 400
+
| 404
| 216.12.34.1 is not found on the list
+
| example.com not found
 
|}
 
|}
  
 
+
=== Delete (Reseller Only)===
=== Show Spam Setting ===
 
  
 
''URL'':
 
''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>
+
  <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)</nowiki>
  
  
 
''Description'':
 
''Description'':
  
Edits the domain Spam Settings.
+
Deletes the domain.
  
 
   
 
   
 +
''Remarks'':
  
{| class="wikitable"
+
The domain and all the mailboxes, mailbox contents, groups, and contacts are deleted permanently.
!''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
 
|}
 
  
 
   
 
   
Line 878: Line 510:
  
 
<pre>
 
<pre>
put '/customers/me/domains/example.com/spam/settings', 'text/xml',
+
delete '/customers/12345678/domains/newcompany.com'
{
 
  'filterLevel' => 'on',
 
  'rsEmail.spamHandling' => 'toFolder',
 
  'rsEmail.hasFolderCleaner' => 'true',
 
  'rsEmail.spamFolderAgeLimit' => '7',
 
  'rsEmail.spamFolderNumLimit' => '100',
 
}
 
 
</pre>
 
</pre>
  
  
''Errors'':
+
=== Alternate Domains ===
 
 
{| class="wikitable"
 
!''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 (Reseller Only) ===
+
==== Index (Reseller Only) ====
  
 
''URL'':  
 
''URL'':  
  
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/
 
                 domains/(domain name)/alternatedomains</nowiki>
 
                 domains/(domain name)/alternatedomains</nowiki>
  
Line 923: Line 526:
 
''Description'':
 
''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 [http://api.emailsrvr.com/v0/Schemas/DomainSplitRouting.xsd DomainAlternateList.xsd]
+
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.
 +
 
  
 
''Example'':
 
''Example'':
  
 
<pre>
 
<pre>
get '/customers/12345678/domains/test.com/alternatedomains', 'text/xml'
+
get '/customers/12345678/domains/test.com/alternatedomains'
 
</pre>
 
</pre>
  
Line 956: Line 560:
 
<pre>{"alternateDomains":[{"name":"domainalias.com","type":"DomainAlias"},{"name":"accepteddomain.com","type":"AcceptedDomain"}]}</pre>
 
<pre>{"alternateDomains":[{"name":"domainalias.com","type":"DomainAlias"},{"name":"accepteddomain.com","type":"AcceptedDomain"}]}</pre>
  
=== Add (Reseller Only) ===
+
==== Add (Reseller Only) ====
  
  
 
''URL'':  
 
''URL'':  
 
  <nowiki>
 
  <nowiki>
  [POST] https://api.emailsrvr.com/v0/customers/(customer account number)
+
  [POST] https://api.emailsrvr.com/v1/customers/(customer account number)
 
     /domains/(domain name)/alternatedomains/(alternate domain name)
 
     /domains/(domain name)/alternatedomains/(alternate domain name)
 
  </nowiki>
 
  </nowiki>
Line 985: Line 589:
 
|-
 
|-
 
|}
 
|}
 +
  
 
   
 
   
Line 990: Line 595:
  
 
<pre>
 
<pre>
post '/customers/123456/domains/example.com/alternatedomains/accepteddomain.com', 'text/xml',
+
post '/customers/123456/domains/example.com/alternatedomains/accepteddomain.com',
 
{
 
{
 
   'type' => 'AcceptedDomain'
 
   'type' => 'AcceptedDomain'
Line 1,023: Line 628:
  
  
=== Delete (Reseller Only) ===
+
==== Delete (Reseller Only) ====
  
  
 
''URL'':
 
''URL'':
  
  <nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/
+
  <nowiki>[DELETE] https://api.emailsrvr.com/v1/customers/(customer account number)/
 
       domains/(domain name)/alternatedomains/(alternate domain name)</nowiki>
 
       domains/(domain name)/alternatedomains/(alternate domain name)</nowiki>
  
Line 1,035: Line 640:
  
 
Deletes the alternate domain.
 
Deletes the alternate domain.
 +
  
 
''Example'':
 
''Example'':
Line 1,042: Line 648:
 
</pre>
 
</pre>
  
 +
=== Split Domain Routing ===
  
== Split Domain Routing ==
+
==== Show Settings ====
 
 
=== Show Settings ===
 
  
 
''URL'':
 
''URL'':
  
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/splitdomainrouting</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain)/splitdomainrouting</nowiki>
 
   
 
   
 
''Description'':
 
''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]
+
Shows the current external email server.
  
  
Line 1,058: Line 663:
  
 
<pre>
 
<pre>
get '/customers/12345678/domains/company.com/splitdomainrouting', 'text/xml'
+
get '/customers/12345678/domains/company.com/splitdomainrouting'
 
</pre>
 
</pre>
  
Line 1,077: Line 682:
 
</pre>
 
</pre>
  
=== Edit Settings ===
+
==== Edit Settings ====
  
 
''URL'':
 
''URL'':
  
  <nowiki>[PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/splitdomainrouting</nowiki>
+
  <nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain)/splitdomainrouting</nowiki>
  
 
''Description'':
 
''Description'':
Line 1,106: Line 711:
  
 
<pre>
 
<pre>
put '/customers/12345678/domains/company.com/splitdomainrouting', 'text/xml',
+
put '/customers/12345678/domains/company.com/splitdomainrouting',
 
{
 
{
 
   'externalServer' => 'email.externalserver.com',
 
   'externalServer' => 'email.externalserver.com',
Line 1,122: Line 727:
 
| One of the verification error messages.
 
| One of the verification error messages.
 
|}
 
|}
 
+
 
+
=== Archiving SSO Login URL ===
== Archiving SSO Login URL ==
 
  
 
''URL'':
 
''URL'':
  
  <nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain)/archivingSSOLoginURL</nowiki>
+
  <nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain)/archivingSSOLoginURL</nowiki>
  
  
Line 1,144: Line 748:
  
 
<pre>
 
<pre>
get '/customers/12345678/domains/company.com/archivingSSOLoginURL', 'text/xml'
+
get '/customers/12345678/domains/company.com/archivingSSOLoginURL'
 
</pre>
 
</pre>
  
Line 1,160: Line 764:
 
|}
 
|}
  
== Domain Public Folders (Reseller Only) ==
+
=== Domain Public Folders ===
  
 +
==== Show Status ====
 
''URL'':  
 
''URL'':  
 
  <nowiki>
 
  <nowiki>
   [PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)/ex/publicfolders
+
   [GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/ex/publicfolders
 
  </nowiki>
 
  </nowiki>
  
 +
''Description'':
 +
 +
Retrieves the Exchange Public Folders status for the domain.
 +
''Example'':
 +
 +
<pre>
 +
get '/customers/12345678/domains/company.com/ex/publicFolders'
 +
</pre>
 +
 +
''XML Result Example'':
 +
<pre>
 +
<?xml version="1.0" encoding="utf-8"?>
 +
<?xml version="1.0" encoding="utf-8"?>
 +
<domainPublicFolders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domainPublicFolders">
 +
  <enabled>true</enabled>
 +
</domainPublicFolders>
 +
</pre>
 +
 +
==== Enable ====
 +
''URL'':
 +
<nowiki>
 +
  [PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/ex/publicfolders
 +
</nowiki>
  
 
''Description'':
 
''Description'':
Line 1,186: Line 814:
  
 
<pre>
 
<pre>
put '/customers/12345678/domains/company.com/ex/publicFolders', 'text/xml',
+
put '/customers/12345678/domains/company.com/ex/publicFolders',
 
{
 
{
 
   'enabled' => 'true'
 
   'enabled' => 'true'
Line 1,204: Line 832:
 
| Public Folders cannot be disabled once enabled
 
| Public Folders cannot be disabled once enabled
 
|}
 
|}
 +
 +
 +
=== Domain Email Everyone ===
 +
 +
''URL'':
 +
<nowiki>
 +
  [POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/emaileveryone
 +
  [POST] https://api.emailsrvr.com/v1/domains/(domain name)/emaileveryone
 +
</nowiki>
 +
 +
 +
''Description'':
 +
Send an email to all mailboxes for the domain. This request returns a list of recipients.
 +
 +
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 +
!''Description''
 +
|-
 +
| fromName
 +
| string
 +
| Sender's Name.
 +
|-
 +
| fromAddress
 +
| string
 +
| Sender's Email Address.
 +
|-
 +
| subject
 +
| string
 +
| Message subject.
 +
|-
 +
| body
 +
| string
 +
| Message body.
 +
|}
 +
 +
 +
''Example'':
 +
 +
<pre>
 +
post'/customers/12345678/domains/example.com/emaileveryone',
 +
{
 +
  'fromName' => 'John Doe',
 +
  'fromAddress' => 'john.doe@test.com',
 +
  'subject' => 'Hi All',
 +
  'body' => 'Hello World.',
 +
}
 +
</pre>
 +
 +
''XML Result Example'':
 +
 +
<pre>
 +
<?xml version="1.0" encoding="utf-8"?>
 +
<emailAddressList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:emailAddressList">
 +
  <emailAddresses>
 +
    <address>a@example.com</address>
 +
    <address>b@example.com</address>
 +
  </emailAddresses>
 +
</emailAddressList>
 +
</pre>
 +
 +
''Json Result Example'':
 +
 +
{"emailAddresses":["a@example.com","b@example.com"]}
 +
 +
 +
=== Show Domain Catch-All Address ===
 +
 +
''URL'':
 +
 +
<nowiki>[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/catchalladdress</nowiki>
 +
<nowiki>[GET] https://api.emailsrvr.com/v1/domains/(domain name)/catchalladdress</nowiki>
 +
 +
 +
''Description'':
 +
 +
Return the Catch-All Address for the domain. Returns empty string when no Catch-All Address set for the domain.
 +
 +
 +
''Remarks'':
 +
 +
When an email is sent to a mailbox that does not exist on your domain, deliver the email to this address.
 +
 +
 +
''Example'':
 +
 +
<pre>
 +
get '/customers/999999/domains/example.com/catchalladdress'
 +
</pre>
 +
 +
 +
''XML Result Example'':
 +
 +
<pre>
 +
 +
<?xml version="1.0" encoding="utf-8"?>
 +
<emailAddress xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:emailAddress">
 +
  <address>abc@example.com</address>
 +
</emailAddress>
 +
</pre>
 +
 +
 +
''Json Result Example'':
 +
<pre>
 +
{"address":"abc@example.com"}
 +
</pre>
 +
 +
 +
=== Edit Domain Catch-All Address ===
 +
 +
''URL'':
 +
 +
<nowiki>[PUT] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/catchalladdress</nowiki>
 +
<nowiki>[PUT] https://api.emailsrvr.com/v1/domains/(domain name)/catchalladdress</nowiki>
 +
 +
 +
''Description'':
 +
 +
Edit the Catch-All Address for the domain.
 +
 +
 +
''Remarks'':
 +
 +
When an email is sent to a mailbox that does not exist on your domain, deliver the email to this address.
 +
 +
''Notes'':
 +
 +
This request may take about 1-2 minutes to be applied to the domain.
 +
 +
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 +
!''Description''
 +
|-
 +
| address
 +
| string
 +
| The Catch-All email address. Set address to empty string to remove Catch-All Address.
 +
|-
 +
|}
 +
 +
 +
''Example'':
 +
 +
<pre>
 +
post'/customers/12345678/domains/example.com/emaileveryone',
 +
{
 +
  'address' => 'abc@example.com'
 +
}
 +
</pre>

Latest revision as of 10:31, 5 April 2017

v1 - Current

Index

URL:

[GET] https://api.emailsrvr.com/v1/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/v1/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. 'https://api.emailsrvr.com/v1/customers/all/domains'.
  • To retrieve a list of domains owned by a single customer sub-account, use the subaccounts account number in the url. 'https://api.emailsrvr.com/v1/customers/{subaccount number}/domains'.
  • Leaving the customers/{customer account number} out of the url is acceptable and returns the sames results as /customers/me
'https://api.emailsrvr.com/v1/domains'. 
  • The index operation only supports the GET HTTP verb.

Example:

get '/customers/all/domains?size=100&offset=10'


domainNames Parameter (V1 only): The optional query string parameter "domainNames" can be used to retrieve a specific subset of domains by hostname. Up to 100 hostnames can be given at once in a comma-delimited list.

get '/customers/all/domains?domainNames=apidomain53.com,apidomain66.com,apidomain68.com', 'application/json'


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>
      <exchangeMaxNumMailboxes>10</exchangeMaxNumMailboxes>
      <exchangeUsedStorage>4</exchangeUsedStorage>
      <rsEmailMaxNumberMailboxes>10</rsEmailMaxNumberMailboxes>
      <rsEmailUsedStorage>9</rsEmailUsedStorage>
    </domain>
    <domain>
      <name>apidomain66.com</name>
      <accountNumber>100001</accountNumber>
      <serviceType>rsemail</serviceType>
      <exchangeMaxNumMailboxes>0</exchangeMaxNumMailboxes>
      <exchangeUsedStorage>0</exchangeUsedStorage>
      <rsEmailMaxNumberMailboxes>100</rsEmailMaxNumberMailboxes>
      <rsEmailUsedStorage>40</rsEmailUsedStorage>
    </domain>
    <domain>
      <name>apidomain68.com</name>
      <accountNumber>100002</accountNumber>
      <serviceType>exchange</serviceType>
      <exchangeMaxNumMailboxes>50</exchangeMaxNumMailboxes>
      <exchangeUsedStorage>10</exchangeUsedStorage>
      <rsEmailMaxNumberMailboxes>0</rsEmailMaxNumberMailboxes>
      <rsEmailUsedStorage>0</rsEmailUsedStorage>
    </domain>
  </domains>
</domainList>


Json Result Example:

{"offset":0,"size":50,"total":3,"domains":
[{"name":"apidomain53.com","accountNumber":"100000","serviceType":"both","exchangeMaxNumMailboxes":"10","exchangeUsedStorage":"4","rsEmailMaxNumberMailboxes":"10","rsEmailUsedStorage":"9"},
{"name":"apidomain66.com","accountNumber":"100001","serviceType":"rsemail","exchangeMaxNumMailboxes":"0","exchangeUsedStorage":"0","rsEmailMaxNumberMailboxes":"100","rsEmailUsedStorage":"40"},
{"name":"apidomain68.com","accountNumber":"100002","serviceType":"exchange","exchangeMaxNumMailboxes":"50","exchangeUsedStorage":"10","rsEmailMaxNumberMailboxes":"0","rsEmailUsedStorage":"0"}]}

Export

URL:

[GET] https://api.emailsrvr.com/v1/customers/(customer account number)/domains?exportTo={email address}


Description:

Use this route to export a file that includes details for domains on an account.


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/v1/customers/me/domains?exportTo=myAdminEmail@example.com'.
  • To retrieve a list of domains owned by all customer sub-accounts and your own account, use "all" as the customer account number. 'https://api.emailsrvr.com/v1/customers/all/domains?exportTo=myAdminEmail@example.com'.
  • To retrieve a list of domains owned by a single customer sub-account, use the subaccounts account number in the url. 'https://api.emailsrvr.com/v1/customers/{subaccount number}/domains?exportTo=myAdminEmail@example.com'.
  • Leaving the customers/{customer account number} out of the url is acceptable and returns the sames results as /customers/me
'https://api.emailsrvr.com/v1/domains?exportTo=myAdminEmail@example.com'. 
  • The export route supports 'contains' and 'startswith' filtering

Show

URL:

[GET] https://api.emailsrvr.com/v1/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.


Notes:

  1. These two fields 'exchangeUsedStorage' and 'rsEmailUsedStorage' actually return the number of active mailboxes in each service respectively.
  2. Due to a performance issue Domain Public Folder Status is now returned from an individual URL. See Public Folders Status. The field 'publicFoldersEnabled' from Show Domain result always returns 'false'.


Example:

get '/customers/999999/domains/example.com'

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>
  <publicFoldersEnabled>false</publicFoldersEnabled>
  <blackBerryMobileServiceEnabled>true</blackBerryMobileServiceEnabled>
  <blackBerryLicenses>4</blackBerryLicenses>
  <activeSyncMobileServiceEnabled>true</activeSyncMobileServiceEnabled>
  <activeSyncLicenses>4</activeSyncLicenses>
</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,"publicFoldersEnabled":false,
"blackBerryMobileServiceEnabled":true,"blackBerryLicenses":4,"activeSyncMobileServiceEnabled":true,
"activeSyncLicenses":4}

Add/Edit (Reseller Only)

URL:

 Add: [POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)
 Edit: [PUT] https://api.emailsrvr.com/v1/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
rsEmailProduct string Rackspace Email product type. "rse-basic" = "Basic (Email)". "rse-plus" = "Plus (Email, Mobile Sync, Drive, and Docs)"
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 (deprecated) boolean Enable or disable domain Good Mobile service
goodMobileLicenses (deprecated) 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',
{
  'maxNumMailboxes' => '5',
  'extraStorage' => '1024'
}
put '/customers/123455/domains/newcompany.com',
{
  '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

Notes:

When setting rsEmailProduct, there is a short delay before the change is reflected, while the upgrade (or downgrade) process is happening.

Move (Reseller Only)

URL:

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


Description:

Moves a domain among your account and subaccounts.

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',
{
  'moveDomain' => 'true'
}

Transfer

Transfers ownership of a domain to another customer. You can start, read, and cancel the transfer. The other customer can finish the transfer.

Start

URL:

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

Description:

Creates a transfer, which is represented by a token. A transfer also has an expiration, which is represented by an RFC 3339 formatted timestamp. After the expiration, the transfer is automatically canceled.

Example:

post'/customers/12345678/domains/company.com/transfer', 'application/json'

JSON Result Example:

{
  "Token": "b77b8460-5019-48e0-a5eb-4951640ea3cd",
  "Expiration": "2014-08-20T17:28:44Z"
}

Errors:

Description HTTP Response Code Sample Message
The domain does not exist or is not accessible by the admin 404 example.com not found

Read

URL:

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

Description:

Retrieves the domain transfer information for the domain that was returned by the request to start the transfer.

Example:

get '/customers/12345678/domains/company.com/transfer', 'application/json'

JSON Result Example:

{
  "Token": "b77b8460-5019-48e0-a5eb-4951640ea3cd",
  "Expiration": "2014-08-20T17:28:44Z"
}

Errors:

Description HTTP Response Code Sample Message
No transfer has been started, or the transfer has expired 404 Domain transfer offer not found.

Cancel

URL:

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

Description:

Cancels a domain transfer.

Example:

delete '/customers/12345678/domains/company.com/transfer', 'application/json'

Finish

URL:

[POST] https://api.emailsrvr.com/v1/customers/(customer account number)/domains/(domain name)/transfer/finish

Description:

Finish a domain transfer. This API request must be made by an admin that is on the account that will accept the domain. When the request completes successfully, assigns ownership of the domain to the company of the authenticated admin. That company will have full control of the domain, and accepts billing for services associated with the domain.

Field Name Data Type Description
token string the token returned by the POST or GET to this resource by an admin with access to the domain

Example:

post '/customers/12345678/domains/company.com/transfers/finish', 'application/json',
{
  'Token' => 'b77b8460-5019-48e0-a5eb-4951640ea3cd'
}

JSON Result Example:

{
  "Token": "b77b8460-5019-48e0-a5eb-4951640ea3cd",
  "Expiration": "2014-08-20T17:28:44Z"
}

Errors:

Description HTTP Response Code Sample Message
The domain does not exist or is not accessible by the admin 404 example.com not found
The transfer token is invalid 404 example.com not found

Delete (Reseller Only)

URL:

[DELETE] https://api.emailsrvr.com/v1/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'


Alternate Domains

Index (Reseller Only)

URL:

[GET] https://api.emailsrvr.com/v1/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.


Example:

get '/customers/12345678/domains/test.com/alternatedomains'


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 (Reseller Only)

URL:

 [POST] https://api.emailsrvr.com/v1/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',
{
  '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 (Reseller Only)

URL:

[DELETE] https://api.emailsrvr.com/v1/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/v1/customers/(customer account number)/domains/(domain)/splitdomainrouting

Description: Shows the current external email server.


Example:

get '/customers/12345678/domains/company.com/splitdomainrouting'


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/v1/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',
{
  '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/v1/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'


Errors:

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

Domain Public Folders

Show Status

URL:

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

Description:

Retrieves the Exchange Public Folders status for the domain. Example:

get '/customers/12345678/domains/company.com/ex/publicFolders'

XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<domainPublicFolders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:domainPublicFolders">
  <enabled>true</enabled>
</domainPublicFolders>

Enable

URL:

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

Description:

Enables the Exchange Public Folders feature on the domain. Once enabled, it cannot be disabled.

Field Name Data Type Description
enabled string Whether to enable public folders. Once enabled, it cannot be disabled.


Example:

put '/customers/12345678/domains/company.com/ex/publicFolders',
{
  'enabled' => 'true'
}


Errors:

Description HTTP Response Code Sample Message
Public folders cannot be turned off after it's been turned on. 400 Public Folders cannot be disabled once enabled


Domain Email Everyone

URL:

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


Description: Send an email to all mailboxes for the domain. This request returns a list of recipients.

Field Name Data Type Description
fromName string Sender's Name.
fromAddress string Sender's Email Address.
subject string Message subject.
body string Message body.


Example:

post'/customers/12345678/domains/example.com/emaileveryone',
{
  'fromName' => 'John Doe',
  'fromAddress' => 'john.doe@test.com',
  'subject' => 'Hi All',
  'body' => 'Hello World.',
}

XML Result Example:

<?xml version="1.0" encoding="utf-8"?>
<emailAddressList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:emailAddressList">
  <emailAddresses>
    <address>a@example.com</address>
    <address>b@example.com</address>
  </emailAddresses>
</emailAddressList>

Json Result Example:

{"emailAddresses":["a@example.com","b@example.com"]}


Show Domain Catch-All Address

URL:

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


Description:

Return the Catch-All Address for the domain. Returns empty string when no Catch-All Address set for the domain.


Remarks:

When an email is sent to a mailbox that does not exist on your domain, deliver the email to this address.


Example:

get '/customers/999999/domains/example.com/catchalladdress'


XML Result Example:


<?xml version="1.0" encoding="utf-8"?>
<emailAddress xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:emailAddress">
  <address>abc@example.com</address>
</emailAddress>


Json Result Example:

{"address":"abc@example.com"}


Edit Domain Catch-All Address

URL:

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


Description:

Edit the Catch-All Address for the domain.


Remarks:

When an email is sent to a mailbox that does not exist on your domain, deliver the email to this address.

Notes:

This request may take about 1-2 minutes to be applied to the domain.

Field Name Data Type Description
address string The Catch-All email address. Set address to empty string to remove Catch-All Address.


Example:

post'/customers/12345678/domains/example.com/emaileveryone',
{
  'address' => 'abc@example.com'
}