Difference between revisions of "Exchange Distribution List (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
m (replace page with offset)
(Distribution List: removed verbs column from distro list table)
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
  
 +
== v1 - Current ==
  
=== Index ===
+
This resource supports submitting and responding with both XML and JSON.
 +
(The v0 method of submitting data via form URL-encoded variables is NOT supported in v1.)
  
''URL'':
+
=== Data Model ===
<nowiki>[GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 
        /ex/distributionlists</nowiki>
 
  
 +
(See [[Common_Exchange_API_Concepts#Serialization|Serialization]])
  
''Description'':
+
==== Distribution List ====
  
This operation returns a list of distribution lists associated with the domain.
+
Operations:
  
 +
* Exchange Distribution List [[#List|List]], [[#Create|Create]], [[#Read|Read]], [[#Update|Update]], [[#Delete|Delete]], [[#Import|Import]], [[#Export|Export]]
  
''Remarks'':
+
This model extends [[Common_Exchange_API_Concepts#Mailbox|Mailbox]].
  
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/DistributionlistList.xsd DistributionlistList.xsd]
+
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 +
!''Description''
 +
|-
 +
| Description
 +
| String
 +
| A user-defined description of the list.
 +
|-
 +
| MemberCount
 +
| Integer
 +
| A number of members currently assigned to this list.
 +
|-
 +
| PrimarySmtpAddress
 +
| String
 +
| The external email address for this list.
 +
|-
 +
| EmailAddresses
 +
| [[#Email Address|Email Address]] Array
 +
| [[#Email Addresses|See examples below.]]
 +
|-
 +
| Members
 +
| [[#Members|Members]] Object
 +
| [[#Members_2|See examples below.]]
 +
|-
 +
| AcceptMessagesOnlyFrom
 +
| [[#Senders|Senders]] Object
 +
| [[#Senders_2|See examples below.]]
 +
|}
  
 +
==== Email Addresses ====
  
''Example'':
+
{| class="wikitable"
<pre>
+
!''Field Name''
get '/customers/12345678/domains/example.com/ex/distributionlists?size=100&offset=10&contains=mailing', 'text/xml'
+
!''Data Type''
</pre>
+
!''Verbs''
 +
!''Description''
 +
|-
 +
| Action
 +
| String
 +
| PUT
 +
| Must be 'Add', 'Update' or 'Remove'
 +
|-
 +
| AddressPrimary
 +
| Boolean
 +
| GET, PUT
 +
| True if this is the primary email address. Only one email address can be primary
 +
|-
 +
| AddressProtocol
 +
| String
 +
| GET, POST, PUT
 +
| Must be 'smtp' or 'x500'. The primary email address must be 'smtp'
 +
|-
 +
| Value
 +
| String
 +
| GET, POST, PUT
 +
| The email address, including the domain (See example below)
 +
|}
 +
 
 +
When creating a new mailbox you are allowed to configure alternate email addresses, however there are a few special considerations
 +
 
 +
'''Allowed Domains'''
 +
* Primary Domain (specified in the url)
 +
* Accepted Domains
 +
 
 +
'''Domain Aliases'''
 +
* Each email address entry using the primary domain will result in a corresponding entry for each domain alias
 +
** ''Example:'' Adding myalternate@primary.com will also add an entry for myalternate@alias1.com and myalternate@alias2.com
 +
** ''Example:'' Removing myalternate@primary.com will also remove myalternate@alias1.com and myalternate@alias2.com
 +
* Domain alias entries cannot be independently added or removed
  
 +
'''Common Name Email Address'''
 +
* The common name email address is the mailbox name and domain used in the url
 +
* The common name email address cannot be removed
  
''XML Result Example'':
+
'''AddressPrimary (Reply-To)'''
 +
* The primary address is automatically set based on the supplied CommonName when the mailbox is added
 +
** An entry for CommonName@PrimaryDomain will be added to the email address list with AddressPrimary set to 'true'
 +
* The primary address can be changed after the mailbox is created
 +
* Changing the primary address does not change the name of the mailbox
 +
* Deleting the primary address without setting another address as the primary address will result in the common name email address being reset as the primary address
  
<pre>
+
----
<?xml version="1.0" encoding="utf-8"?>
 
<distributionlistList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 
xmlns="urn:xml:distributionlistList">
 
  <offset>0</offset>
 
  <size>50</size>
 
  <total>3</total>
 
  <distributionlists>
 
    <distributionlist>
 
      <name>apiexgroup4</name>
 
      <displayName>API Test Group</displayName>
 
    </distributionlist>
 
    <distributionlist>
 
      <name>apiexgroup62</name>
 
      <displayName>API Test Group</displayName>
 
    </distributionlist>
 
    <distributionlist>
 
      <name>apiexgroup64</name>
 
      <displayName>API Test Group</displayName>
 
    </distributionlist>
 
  </distributionlists>
 
</distributionlistList>
 
</pre>
 
  
 +
==== Members ====
  
''Json Result Example'':
+
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 +
!''Description''
 +
|-
 +
| Recipients
 +
| [[#Recipient|Recipient]] Array
 +
| Array of Recipient (see below).
 +
|}
  
{"offset":0,"size":50,"total":3,"distributionlists":[{"name":"apiexgroup4","displayName":"API Test Group"},{"name":"apiexgroup62","displayName":"API Test Group"},{"name":"apiexgroup64","displayName":"API Test Group"}]}
+
==== Senders ====
  
 +
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 +
!''Description''
 +
|-
 +
| All
 +
| String
 +
| Must be 'restricted' or 'public'. In order to add specific recipients, this must be 'restricted'.
 +
|-
 +
| Recipients
 +
| [[#Recipient|Recipient]] Array
 +
| Array of Recipient (see below).
 +
|}
  
''Errors'': 
+
==== Recipient ====
  
 
{| class="wikitable"
 
{| class="wikitable"
 +
!''Field Name''
 +
!''Data Type''
 +
!''Verbs''
 
!''Description''
 
!''Description''
!''HTTP Response Code''
 
!''Sample Message''
 
 
|-
 
|-
| Distribution List is not found
+
| Value
| 404
+
| String
| Distribution List not found
+
| GET, PUT
 +
| Email Address
 +
|-
 +
| Action
 +
| String
 +
| PUT
 +
| Must be "Add" or "Remove".
 
|}
 
|}
  
 +
----
 +
 +
=== List ===
  
=== Show ===
+
{| class="wikitable"
 +
! Verb
 +
| GET
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/
 +
|-
 +
! Description
 +
| Lists Distribution Lists, supports exporting. (see [[Common Exchange API Concepts#Listings|Listings]])
 +
|-
 +
! Model
 +
| [[#Distribution List|Distribution List]] Listing
 +
|}
  
''URL'':
+
HTTP Codes
[<nowiki>GET] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 
        /ex/distributionlists/(distribution list name)</nowiki>
 
  
 +
{| class="wikitable"
 +
! Code
 +
! Condition
 +
|-
 +
| 200 OK
 +
| The listing was successfully retrieved.
 +
|-
 +
| 400 Bad Request
 +
| The request was invalid.  Inspect the <tt>validationFault</tt> response for more detail.
 +
|-
 +
| 404 Not Found
 +
| The domain does not exist, the domain does not have Exchange, or the marker was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
 +
|}
  
''Description'':
+
<pre>
 +
Request:
 +
GET https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists
  
Returns the distribution list's details.
+
Response:
 +
200 OK
 +
{
 +
    "DistributionLists": [
 +
        {
 +
            "Description": "This is an example of an edited DL.",
 +
            "MemberCount": 0,
 +
            "CommonName": "exampledl",
 +
            "DisplayName": "ExampleDL",
 +
            "Alias": "exampledl.example.com",
 +
            "IsHiddenFromAddressList": false,
 +
            "PrimarySmtpAddress": "exampledl@example.com",
 +
            "Status": "Ready",
 +
            "LegacyExchangeDn": "/o=e14s/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=exampledl59c"
 +
        }
 +
    ],
 +
    "Sort": "primarysmtpaddress",
 +
    "Limit": 25,
 +
    "Total": 1,
 +
    "Order": "asc"
 +
}
 +
</pre>
  
 +
=== Distribution List ===
  
''Remarks'':
+
POSTS, PUTS, and DELETES support [[Common_Exchange_API_Concepts#Asynchronous_Statuses|Asynchronous Statuses]] and [[Common_Exchange_API_Concepts#Asynchronous_Errors|Asynchronous Errors]].
  
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/Distributionlist.xsd Distributionlist.xsd]
+
==== Create ====
  
 +
{| class="wikitable"
 +
! Verb
 +
| POST
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/
 +
|-
 +
! Description
 +
| Use this route to add a new Distribution List.
 +
|-
 +
! Model
 +
| [[#Distribution List|Distribution List]]
 +
|}
  
''Example'':
+
HTTP Codes
<pre>
 
get '/customers/12345678/domains/example.com/ex/distributionlists/all.employees', 'text/xml'
 
</pre>
 
  
 +
{| class="wikitable"
 +
! Code
 +
! Condition
 +
|-
 +
| 204 No Content
 +
| The request has been accepted and will be processed.
 +
|-
 +
| 400 Bad Request
 +
| The request was invalid.  Inspect the <tt>validationFault</tt> response for more detail.
 +
|-
 +
| 404 Not Found
 +
| The domain does not exist, the domain does not have Exchange, or the marker was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
 +
|}
  
''XML Result Example''
 
  
 
<pre>
 
<pre>
<?xml version="1.0" encoding="utf-8"?>
+
Request:
<distributionlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xml:contact">
+
POST: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists
  <name>apiexgroup64</name>
+
{   
  <displayName>API Test Group</displayName>
+
    "Description": "This is an example DL.",
  <isHidden>false</isHidden>
+
    "CommonName": "ExampleDL",
  <emailAddressList>
+
    "DisplayName": "ExampleDL",
    <emailAddress>
+
    "IsHiddenFromAddressList": false,
      <address>apiexgroup64@apidomain36.com</address>
+
    "EmailAddresses": [
       <replyTo>true</replyTo>
+
  {
    </emailAddress>
+
            "Action":"Add",
  </emailAddressList>
+
            "Value": "exampledl-alias@example.com",
  <memberList>
+
            "AddressPrimary": false,
     <member>apiexmailbox30@apidomain36.com</member>
+
            "AddressProtocol": "smtp"
     <member>apiexmailbox7@apidomain36.com</member>
+
        }
    <member>apiexmailbox99@apidomain36.com</member>
+
    ],
  </memberList>
+
    "Members": {
</distributionlist>
+
       "Recipients": [
 +
      {
 +
  "Action":"Add",
 +
        "Value":"mexuser1"
 +
      },
 +
      {
 +
        "Action":"Add",
 +
        "Value":"mexuser2"
 +
      }
 +
      ]
 +
     },
 +
     "AcceptMessagesOnlyFrom": {
 +
      "All":"restricted",
 +
      "Recipients": [
 +
      {
 +
        "Action":"Add",
 +
        "Value":"mexuser1"
 +
      },
 +
      {
 +
        "Action":"Add",
 +
        "Value":"mexuser2"
 +
      }
 +
      ]
 +
  }
 +
}
 +
 
 +
Response:
 +
204 No Content
 
</pre>
 
</pre>
  
 +
==== Read ====
  
''Json Result Example'':
+
{| class="wikitable"
 +
! Verb
 +
| GET
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}
 +
|-
 +
! Description
 +
| Use this route to read an existing Distribution List.
 +
|-
 +
! Model
 +
| [[#Distribution List|Distribution List]] *
 +
|}
  
{"name":"apiexgroup64","displayName":"API Test Group","isHidden":false,"emailAddressList":[{"address":"apiexgroup64@apidomain36.com","replyTo":true}],"memberList":["apiexmailbox30@apidomain36.com","apiexmailbox7@apidomain36.com","apiexmailbox99@apidomain36.com"]}
+
<nowiki>*</nowiki> Note: The Distribution List resource contains some paged data that must be accessed via separate GET requests.  Properties directly on the object can be accessed via a GET on the base resource, however [[#Members|Members]] and [[#Senders|Senders]] must each be retrieved by separate requests.
  
 
+
HTTP Codes
''Errors'':
 
  
 
{| class="wikitable"
 
{| class="wikitable"
!''Description''
+
! Code
!''HTTP Response Code''
+
! Condition
!''Sample Message''
+
|-
 +
| 200 OK
 +
| The resource was successfully retrieved.
 +
|-
 +
| 400 Bad Request
 +
| The request was invalid.  Inspect the <tt>validationFault</tt> response for more detail.
 
|-
 
|-
| Distribution list is not found
+
| 404 Not Found
| 404
+
| The domain does not exist, the domain does not have Exchange, or the marker was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
| Distribution List not found
 
 
|}
 
|}
  
  
 +
<pre>
 +
Request:
 +
GET: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL
  
=== Add/Edit ===
 
  
''URL'':
+
Response:
<nowiki>Add: [POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
+
200 OK
                /ex/distributionlists/(distribution list name)
+
{
Edit: [PUT] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
+
    "Description": "This is an example DL.",
                /ex/distributionlists/(distribution list name)</nowiki>
+
    "MemberCount": 2,
 +
    "CommonName": "exampledl",
 +
    "DisplayName": "Example DL",
 +
    "Alias": "exampledl.example.com",
 +
    "IsHiddenFromAddressList": false,
 +
    "PrimarySmtpAddress": "exampledl@example.com",
 +
    "Status": "Ready",
 +
    "LegacyExchangeDn": "/o=e14s/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=exampledl59c"
 +
}
 +
</pre>
  
 +
==== Update ====
  
''Description'':
+
{| class="wikitable"
 
+
! Verb
Adds/edits the distribution list with the specified information.  Required fields must be supplied when adding. Others are optional.
+
| PUT
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}
 +
|-
 +
! Description
 +
| Updates an existing Distribution List.
 +
|-
 +
! Model
 +
| [[#Distribution_List|Distribution List]]
 +
|}
  
 +
HTTP Codes
  
 
{| class="wikitable"
 
{| class="wikitable"
!''Field Name''
+
! Code
!''Data Type''
+
! Condition
!''Description''
+
|-
 +
| 204 No Content
 +
| The request has been accepted and will be processed.
 
|-
 
|-
| displayName
+
| 400 Bad Request
| string
+
| The request was invalid.  Inspect the <tt>validationFault</tt> response for more detail.
| Distribution list display name (Required)
 
 
|-
 
|-
| isHidden
+
| 404 Not Found
| boolean
+
| The domain does not exist, the domain does not have Exchange, or the marker was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
| Whether or not the distribution list is hidden from the Global Address List (Defaults to false)
 
 
|}
 
|}
  
 +
All data that is part of the Exchange Distribution List resource can be updated in a single PUT request.  <tt>Recipients</tt> and <tt>AcceptMessagesOnlyFrom</tt> must specify an <tt>Action</tt>, set to either <tt>Add</tt> or <tt>Remove</tt>, to specify the operation for that value. <tt>AcceptMessagesOnlyFrom</tt> also has an additional parameter <tt>All</tt> that can be set to <tt>restricted</tt> (to specify specific allowed senders) or <tt>public</tt>.
  
''Example'':
 
 
<pre>
 
<pre>
post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees',
+
Request:
 +
PUT: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL
 
{
 
{
  'name' => 'all.employees',
+
    "Description": "This is an example of an edited DL.",
  'displayName' => 'Employees'
+
    "DisplayName": "ExampleDL",
},
+
    "IsHiddenFromAddressList": false,
'text/xml'
+
    "EmailAddresses": [
</pre>
+
        {
 +
            "Action":"remove",
 +
            "Value": "exampledl-alias@example.com",
 +
            "AddressPrimary": false,
 +
            "AddressProtocol": "smtp"
 +
        }
 +
    ],
 +
    "Members": {
 +
      "Recipients": [
 +
      {
 +
      "Action":"Remove",
 +
      "Value":"mexuser1"
 +
      },
 +
      {
 +
      "Action":"Add",
 +
      "Value":"mexuser3"
 +
      }
 +
      ]
 +
    },
 +
    "AcceptMessagesOnlyFrom": {
 +
        "All":"restricted",
 +
        "Recipients": [
 +
      {
 +
      "Action":"Remove",
 +
      "Value":"mexuser3"
 +
      },
 +
      {
 +
      "Action":"Add",
 +
      "Value":"mexuser2"
 +
      }
 +
      ]
 +
  }
 +
}
  
<pre>
+
Response:
put '/customers/12345678/domains/example.com/ex/distributionlists/all.employees',
+
204 No Content
{
 
  'displayName' => 'Example.com Employees'
 
},
 
'text/xml',
 
 
</pre>
 
</pre>
  
''Errors'':
+
==== Delete ====
  
 
{| class="wikitable"
 
{| class="wikitable"
!''Description''
+
! Verb
!''HTTP Response Code''
+
| DELETE
!''Sample Message''
+
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionList/{common name}
 
|-
 
|-
| New distribution list name already exists
+
! Description
| 400
+
| Use this route to delete a distribution list.
| The email address john.doe@abc.com is already in use
 
 
|-
 
|-
| New distribution list name doesn't meet the naming requirements
+
! Model
| 400
+
| None
| Invalid user name
+
|}
 +
 
 +
HTTP Codes
 +
 
 +
{| class="wikitable"
 +
! Code
 +
! Condition
 
|-
 
|-
| New distribution list display name doesn't meet the naming requirements
+
| 204 No Content
| 400
+
| The request has been accepted and will be processed.
| Invalid display name
 
 
|-
 
|-
| Distribution list is not found
+
| 400 Bad Request
| 404
+
| The request was invalid.  Inspect the <tt>validationFault</tt> response for more detail.
| Distribution List not found
 
 
|-
 
|-
| Display name doesn't meet the naming requirements
+
| 404 Not Found
| 400
+
| The domain does not exist, the domain does not have Exchange, or the marker was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
| Invalid display name
 
 
|}
 
|}
  
 +
<pre>
 +
Request:
 +
DELETE https://api.emailsrvr.com/v1/domains/example.com/ex/distributionList/ExampleDL
  
=== Delete ===
 
  
''URL'':
+
Response:
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
+
204 No Content
            /ex/distributionlists/(distribution list name)</nowiki>
+
</pre>
  
 +
----
  
''Description'':
+
==== Export ====
  
Deletes the distribution list.
+
{| class="wikitable"
 +
! Verb
 +
| GET
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists?exportTo={your email address}
 +
|-
 +
! Description
 +
| Use this route to export a file of distribution lists.
 +
|-
 +
! Model
 +
| [[#Distribution List|Distribution List]] Listing
 +
|}
  
 +
HTTP Codes
 +
 +
{| class="wikitable"
 +
! Code
 +
! Condition
 +
|-
 +
| 202 Accepted
 +
| The request has been accepted and will be processed.
 +
|-
 +
| 400 Bad Request
 +
| The request was invalid.  Inspect the <tt>validationFault</tt> response for more detail.
 +
|-
 +
| 404 Not Found
 +
| The domain does not exist, the domain does not have Exchange, or the marker was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
 +
|}
  
''Example'':
 
 
<pre>
 
<pre>
delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees', 'text/xml'
+
Request:
 +
GET https://api.emailsrvr.com/v1/domains/example.com/ex/distributionLists?exportTo=myAdminEmail@example.com
 +
 
 +
Response:
 +
202 Accepted
 
</pre>
 
</pre>
  
 +
----
 +
 +
==== Import ====
  
 
{| class="wikitable"
 
{| class="wikitable"
!''Description''
+
! Verb
!''HTTP Response Code''
+
| POST
!''Sample Message''
+
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists?emailAddress={your email address}
 +
|-
 +
! Description
 +
| Use this route to import a file of distribution lists.
 
|-
 
|-
| Distribution list is not found
+
! Model
| 404
+
| FileUrl (string), OverrideExisting (boolean)
| Distribution List not found
 
 
|}
 
|}
  
 +
HTTP Codes
  
=== Email Addresses ===
+
{| class="wikitable"
 +
! Code
 +
! Condition
 +
|-
 +
| 202 Accepted
 +
| The request has been accepted and will be processed.
 +
|-
 +
| 400 Bad Request
 +
| The request was invalid.  Inspect the <tt>validationFault</tt> response for more detail.
 +
|-
 +
| 404 Not Found
 +
| The domain does not exist, the domain does not have Exchange, or the marker was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
 +
|}
  
This refers to the email addresses a distribution list can appear as.
+
Instructions:
  
==== Add Email Address ====
+
1. Create a CSV (comma-separated values) file containing the distribution lists you'd like to import. You can get a valid CSV file format by bulk-exporting your current distribution lists.
  
''URL'':
+
2. Upload the file to a public accessible URL (e.g. cloud-files, CDN, etc.)
<nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 
        /ex/distributionlists/(distribution list name)/emailaddresses/(email address)</nowiki>
 
  
 +
3. Call this endpoint with the url of the file in the body.
  
''Description'':
+
4. The OverrideExisting field is optional and defaults to false. When true, any existing distribution lists will be modified to match the CSV file, including the removal of members and senders. 
 +
* NOTE: The Description field will be cleared out if left blank when OverrideExisting is true or false.
  
Adds an email address that the distribution list is associated with to the list.  This address' domain name must be the same as the domain the distribution list is under.
+
5. You will receive a confirmation email to the address specified in the URL when the import is complete. Any rows that were not able to be imported are available via a link provided in the confirmation email.
  
 
''Example'':
 
 
<pre>
 
<pre>
post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/emailaddresses/alex@example.com', {}, 'text/xml'
+
Request:
 +
POST https://api.emailsrvr.com/v1/domains/example.com/ex/distributionLists?emailAddress=myAdminEmail@example.com
 +
{
 +
    "FileUrl": "http://asdfasdfzxcvzxcvasdfasdf.cf1.rackcdn.com/MyDistributionLists.csv",
 +
    "OverrideExisting": false
 +
}
 +
Response:
 +
202 Accepted
 
</pre>
 
</pre>
  
''Errors'':
+
----
 +
 
 +
==== Email Addresses====
 +
 
 +
===== List =====
 +
 
 +
{| class="wikitable"
 +
! Verb
 +
| GET
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}/emailaddresses
 +
|-
 +
! Description
 +
| Lists an existing Distribution List's alternate email addresses. (see [[Common Exchange API Concepts#Listings|Listings]])
 +
|-
 +
! Model
 +
| [[#Email Address|Email Address]] Listing
 +
|}
 +
 
 +
HTTP Codes
  
 
{| class="wikitable"
 
{| class="wikitable"
!''Description''
+
! Code
!''HTTP Response Code''
+
! Condition
!''Sample Message''
+
|-
 +
| 200 OK
 +
| The data was successfully retrieved.
 
|-
 
|-
| Distribution list is not found
+
| 404 Not Found
| 404
+
| The domain does not exist, the domain does not have Exchange, or the resource was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
| Distribution list not found
 
 
|}
 
|}
  
 +
<pre>
 +
GET: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL/emailaddresses
  
==== Delete Email Address ====
+
Response:
 +
200 OK
 +
{
 +
    "EmailAddresses": [
 +
        {
 +
            "Value": "exampledl@example.com",
 +
            "AddressPrimary": true,
 +
            "AddressProtocol": "smtp"
 +
        },
 +
        {
 +
            "Value": "exampledl-alias@example.com",
 +
            "AddressPrimary": false,
 +
            "AddressProtocol": "smtp"
 +
        }
 +
    ],
 +
    "Limit": 25,
 +
    "Total": 2,
 +
    "Order": "asc"
 +
}
 +
</pre>
  
''URL'':
+
==== Members ====
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 
            /ex/distributionlists/(distribution list name)/emailaddresses/(email address)</nowiki>
 
  
 +
===== List =====
  
''Description'':
+
{| class="wikitable"
 +
! Verb
 +
| GET
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}/members
 +
|-
 +
! Description
 +
| Lists an existing Distribution List's Members. (see [[Common Exchange API Concepts#Listings|Listings]])
 +
|-
 +
! Model
 +
| [[#Members|Members]] Listing
 +
|}
  
Deletes the email address that is tied to the distribution list.
+
HTTP Codes
  
 +
{| class="wikitable"
 +
! Code
 +
! Condition
 +
|-
 +
| 200 OK
 +
| The data was successfully retrieved.
 +
|-
 +
| 404 Not Found
 +
| The domain does not exist, the domain does not have Exchange, or the resource was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
 +
|}
  
''Example'':
 
 
<pre>
 
<pre>
delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/emailaddresses/alex@example.com', 'text/xml'
+
GET: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL/members
 +
 
 +
Response:
 +
200 OK
 +
{
 +
    "Recipients": [
 +
        {
 +
            "Value": "mexuser1"
 +
        },
 +
        {
 +
            "Value": "mexuser2"
 +
        }
 +
    ],
 +
    "Limit": 25,
 +
    "Total": 2,
 +
    "Order": "asc"
 +
}
 
</pre>
 
</pre>
  
=== Member ===
+
==== Senders ====
  
This refers to the recipients of the distribution list.
+
===== List =====
  
==== Add Member ====
+
{| class="wikitable"
 +
! Verb
 +
| GET
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionlists/{common name}/senders
 +
|-
 +
! Description
 +
| Lists an existing Distribution List's Senders. (see [[Common Exchange API Concepts#Listings|Listings]])
 +
|-
 +
! Model
 +
| [[#Senders|Senders]] Listing
 +
|}
  
''URL'':
+
HTTP Codes
<nowiki>[POST] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
 
        /ex/distributionlists/(distribution list name)/members/(member name)</nowiki>
 
  
 +
{| class="wikitable"
 +
! Code
 +
! Condition
 +
|-
 +
| 200 OK
 +
| The data was successfully retrieved.
 +
|-
 +
| 404 Not Found
 +
| The domain does not exist, the domain does not have Exchange, or the resource was not found.  Inspect the <tt>itemNotFoundFault</tt> for more detail.
 +
|}
  
''Description'':
+
<pre>
 +
GET: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL/senders
 +
 
 +
Response:
 +
200 OK
 +
{
 +
    "All": "restricted",
 +
    "Recipients": [
 +
        {
 +
            "Value": "mexuser1"
 +
        },
 +
        {
 +
            "Value": "mexuser2"
 +
        }
 +
    ],
 +
    "Limit": 25,
 +
    "Total": 2,
 +
    "Order": "asc"
 +
}
 +
</pre>
 +
 
 +
=== New Distribution List Options ===
 +
 
 +
<tt><nowiki>https://api.emailsrvr.com/v1/domains/(domain)/ex/distributionListOptions/</nowiki></tt> is the base URL for getting complete sets of valid data that can be submitted as part of a Distribution List create operation.
  
Adds an email address to the distribution list.
+
==== Available Senders Recipients ====
  
 +
{| class="wikitable"
 +
! Verb
 +
| GET
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionListOptions/AvailableSendersRecipients
 +
|-
 +
! Description
 +
| Use this route to retrieve a list of recipients that can be senders for a new Distribution List on the given domain.
 +
|-
 +
! Model
 +
| [[#Senders|Senders]] Listing
 +
|}
  
''Example'':
 
 
<pre>
 
<pre>
post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/members/john.smith', {}, 'text/xml'
+
Request:
 +
GET https://api.emailsrvr.com/v1/customers/all/domains/example.com/ex/distributionlistOptions/AvailableSendersRecipients
 +
 
 +
Response:
 +
200 OK
 +
{
 +
    "Recipients": [
 +
        {
 +
            "Value": "mexuser1"
 +
        },
 +
        {
 +
            "Value": "mexuser2"
 +
        },
 +
        {
 +
            "Value": "mexuser3"
 +
        },
 +
        {
 +
            "Value": "mexuser4"
 +
        }
 +
    ],
 +
    "Limit": 25,
 +
    "Total": 2,
 +
    "Order": "asc"
 +
}
 
</pre>
 
</pre>
  
 
+
==== Available Members Recipients ====
''Errors'':
 
  
 
{| class="wikitable"
 
{| class="wikitable"
!''Description''
+
! Verb
!''HTTP Response Code''
+
| GET
!''Sample Message''
+
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionListOptions/AvailableMembersRecipients
 
|-
 
|-
| Distribution list is not found
+
! Description
| 404
+
| Use this route to retrieve a list of recipients that can be Members for a new Distribution List on the given domain.
| Distribution list not found
 
 
|-
 
|-
| New member is not found
+
! Model
| 400
+
| [[#Members|Members]] Listing
| No user with the email address jane.doe exists
 
 
|}
 
|}
  
 +
<pre>
 +
Request:
 +
GET https://api.emailsrvr.com/v1/customers/all/domains/example.com/ex/distributionlistOptions/AvailableMembersRecipients
  
==== Delete Member ====
 
  
''URL'':
+
Response:
<nowiki>[DELETE] https://api.emailsrvr.com/v0/customers/(customer account number)/domains/(domain name)
+
200 OK
            /ex/distributionlists/(distribution list name)/members/(member name)</nowiki>
+
{
 +
    "Recipients": [
 +
        {
 +
            "Value": "mexuser1"
 +
        },
 +
        {
 +
            "Value": "mexuser2"
 +
        },
 +
        {
 +
            "Value": "mexuser3"
 +
        },
 +
        {
 +
            "Value": "mexuser4"
 +
        }
 +
    ],
 +
    "Limit": 25,
 +
    "Total": 2,
 +
    "Order": "asc"
 +
}
 +
</pre>
  
 +
=== Existing Distribution List Options ===
  
''Description'':
+
<tt><nowiki>https://api.emailsrvr.com/v1/domains/(domain)/ex/distributionLists/(common name)/options</nowiki></tt> is the base URL for getting complete sets of valid data that can be submitted as part of a Distribution List update operation.
  
Delete an email address from the distribution list.
+
==== Available Senders Recipients ====
  
 +
{| class="wikitable"
 +
! Verb
 +
| GET
 +
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}/options/AvailableSendersRecipients
 +
|-
 +
! Description
 +
| Use this route to retrieve a list of recipients that can be senders for a specific Distribution List on the given domain.
 +
|-
 +
! Model
 +
| [[#Senders|Senders]] Listing
 +
|}
  
''Example'':
 
 
<pre>
 
<pre>
delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/members/john.smith', {}, 'text/xml'
+
Request:
 +
GET https://api.emailsrvr.com/v1/customers/all/domains/example.com/ex/distributionLists/ExampleDL/options/AvailableSendersRecipients
 +
 
 +
 
 +
Response:
 +
200 OK
 +
{
 +
    "Recipients": [
 +
        {
 +
            "Value": "mexuser3"
 +
        },
 +
        {
 +
            "Value": "mexuser4"
 +
        }
 +
    ],
 +
    "Limit": 25,
 +
    "Total": 2,
 +
    "Order": "asc"
 +
}
 
</pre>
 
</pre>
  
 
+
==== Available Members Recipients ====
''Errors'':
 
  
 
{| class="wikitable"
 
{| class="wikitable"
!''Description''
+
! Verb
!''HTTP Response Code''
+
| GET
!''Sample Message''
+
|-
 +
! URL Format
 +
| /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}/options/AvailableMembersRecipients
 
|-
 
|-
| Distribution list is not found
+
! Description
| 404
+
| Use this route to retrieve a list of recipients that can be Members for a specific Distribution List on the given domain.
| Distribution list not found
 
 
|-
 
|-
| Member is not found
+
! Model
| 400
+
| [[#Members|Members]] Listing
| Invalid group member name
 
 
|}
 
|}
 +
 +
<pre>
 +
Request:
 +
GET https://api.emailsrvr.com/v1/customers/all/domains/example.com/ex/distributionLists/ExampleDL/options/AvailableMembersRecipients
 +
 +
 +
Response:
 +
200 OK
 +
{
 +
    "Recipients": [
 +
        {
 +
            "Value": "mexuser3"
 +
        },
 +
        {
 +
            "Value": "mexuser4"
 +
        }
 +
    ],
 +
    "Limit": 25,
 +
    "Total": 2,
 +
    "Order": "asc"
 +
}
 +
</pre>

Latest revision as of 12:56, 15 April 2015

v1 - Current

This resource supports submitting and responding with both XML and JSON. (The v0 method of submitting data via form URL-encoded variables is NOT supported in v1.)

Data Model

(See Serialization)

Distribution List

Operations:

This model extends Mailbox.

Field Name Data Type Description
Description String A user-defined description of the list.
MemberCount Integer A number of members currently assigned to this list.
PrimarySmtpAddress String The external email address for this list.
EmailAddresses Email Address Array See examples below.
Members Members Object See examples below.
AcceptMessagesOnlyFrom Senders Object See examples below.

Email Addresses

Field Name Data Type Verbs Description
Action String PUT Must be 'Add', 'Update' or 'Remove'
AddressPrimary Boolean GET, PUT True if this is the primary email address. Only one email address can be primary
AddressProtocol String GET, POST, PUT Must be 'smtp' or 'x500'. The primary email address must be 'smtp'
Value String GET, POST, PUT The email address, including the domain (See example below)

When creating a new mailbox you are allowed to configure alternate email addresses, however there are a few special considerations

Allowed Domains

  • Primary Domain (specified in the url)
  • Accepted Domains

Domain Aliases

  • Each email address entry using the primary domain will result in a corresponding entry for each domain alias
    • Example: Adding myalternate@primary.com will also add an entry for myalternate@alias1.com and myalternate@alias2.com
    • Example: Removing myalternate@primary.com will also remove myalternate@alias1.com and myalternate@alias2.com
  • Domain alias entries cannot be independently added or removed

Common Name Email Address

  • The common name email address is the mailbox name and domain used in the url
  • The common name email address cannot be removed

AddressPrimary (Reply-To)

  • The primary address is automatically set based on the supplied CommonName when the mailbox is added
    • An entry for CommonName@PrimaryDomain will be added to the email address list with AddressPrimary set to 'true'
  • The primary address can be changed after the mailbox is created
  • Changing the primary address does not change the name of the mailbox
  • Deleting the primary address without setting another address as the primary address will result in the common name email address being reset as the primary address

Members

Field Name Data Type Description
Recipients Recipient Array Array of Recipient (see below).

Senders

Field Name Data Type Description
All String Must be 'restricted' or 'public'. In order to add specific recipients, this must be 'restricted'.
Recipients Recipient Array Array of Recipient (see below).

Recipient

Field Name Data Type Verbs Description
Value String GET, PUT Email Address
Action String PUT Must be "Add" or "Remove".

List

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/
Description Lists Distribution Lists, supports exporting. (see Listings)
Model Distribution List Listing

HTTP Codes

Code Condition
200 OK The listing was successfully retrieved.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail.
Request:
GET https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists

Response:
200 OK
{
    "DistributionLists": [
        {
            "Description": "This is an example of an edited DL.",
            "MemberCount": 0,
            "CommonName": "exampledl",
            "DisplayName": "ExampleDL",
            "Alias": "exampledl.example.com",
            "IsHiddenFromAddressList": false,
            "PrimarySmtpAddress": "exampledl@example.com",
            "Status": "Ready",
            "LegacyExchangeDn": "/o=e14s/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=exampledl59c"
        }
    ],
    "Sort": "primarysmtpaddress",
    "Limit": 25,
    "Total": 1,
    "Order": "asc"
}

Distribution List

POSTS, PUTS, and DELETES support Asynchronous Statuses and Asynchronous Errors.

Create

Verb POST
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/
Description Use this route to add a new Distribution List.
Model Distribution List

HTTP Codes

Code Condition
204 No Content The request has been accepted and will be processed.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail.


Request:
POST: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists
{    
    "Description": "This is an example DL.",
    "CommonName": "ExampleDL",
    "DisplayName": "ExampleDL",
    "IsHiddenFromAddressList": false,
    "EmailAddresses": [
  	{
            "Action":"Add",
            "Value": "exampledl-alias@example.com",
            "AddressPrimary": false,
            "AddressProtocol": "smtp"
        }
     ],
    "Members": {
      "Recipients": [
      	{
	   "Action":"Add",
      	   "Value":"mexuser1"
      	},
      	{
      	   "Action":"Add",
      	   "Value":"mexuser2"
      	}
      ]
    },
    "AcceptMessagesOnlyFrom": {
      "All":"restricted",
      "Recipients": [
      	{
      	   "Action":"Add",
      	   "Value":"mexuser1"
      	},
      	{
      	   "Action":"Add",
      	   "Value":"mexuser2"
      	}
      ]
   }
}

Response:
204 No Content

Read

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}
Description Use this route to read an existing Distribution List.
Model Distribution List *

* Note: The Distribution List resource contains some paged data that must be accessed via separate GET requests. Properties directly on the object can be accessed via a GET on the base resource, however Members and Senders must each be retrieved by separate requests.

HTTP Codes

Code Condition
200 OK The resource was successfully retrieved.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail.


Request:
GET: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL


Response:
200 OK
{
    "Description": "This is an example DL.",
    "MemberCount": 2,
    "CommonName": "exampledl",
    "DisplayName": "Example DL",
    "Alias": "exampledl.example.com",
    "IsHiddenFromAddressList": false,
    "PrimarySmtpAddress": "exampledl@example.com",
    "Status": "Ready",
    "LegacyExchangeDn": "/o=e14s/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=exampledl59c"
}

Update

Verb PUT
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}
Description Updates an existing Distribution List.
Model Distribution List

HTTP Codes

Code Condition
204 No Content The request has been accepted and will be processed.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail.

All data that is part of the Exchange Distribution List resource can be updated in a single PUT request. Recipients and AcceptMessagesOnlyFrom must specify an Action, set to either Add or Remove, to specify the operation for that value. AcceptMessagesOnlyFrom also has an additional parameter All that can be set to restricted (to specify specific allowed senders) or public.

Request:
PUT: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL
{
    "Description": "This is an example of an edited DL.",
    "DisplayName": "ExampleDL",
    "IsHiddenFromAddressList": false,
    "EmailAddresses": [
        {
            "Action":"remove",
            "Value": "exampledl-alias@example.com",
            "AddressPrimary": false,
            "AddressProtocol": "smtp"
        }
     ],
    "Members": {
      "Recipients": [
      	{
      		"Action":"Remove",
      		"Value":"mexuser1"
      	},
      	{
      		"Action":"Add",
      		"Value":"mexuser3"
      	}
       ]
    },
    "AcceptMessagesOnlyFrom": {
        "All":"restricted",
        "Recipients": [
      	{
      		"Action":"Remove",
      		"Value":"mexuser3"
      	},
      	{
      		"Action":"Add",
      		"Value":"mexuser2"
      	}
      ]
   }
}

Response:
204 No Content

Delete

Verb DELETE
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionList/{common name}
Description Use this route to delete a distribution list.
Model None

HTTP Codes

Code Condition
204 No Content The request has been accepted and will be processed.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail.
Request:
DELETE https://api.emailsrvr.com/v1/domains/example.com/ex/distributionList/ExampleDL


Response:
204 No Content

Export

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists?exportTo={your email address}
Description Use this route to export a file of distribution lists.
Model Distribution List Listing

HTTP Codes

Code Condition
202 Accepted The request has been accepted and will be processed.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail.
Request:
GET https://api.emailsrvr.com/v1/domains/example.com/ex/distributionLists?exportTo=myAdminEmail@example.com

Response:
202 Accepted

Import

Verb POST
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists?emailAddress={your email address}
Description Use this route to import a file of distribution lists.
Model FileUrl (string), OverrideExisting (boolean)

HTTP Codes

Code Condition
202 Accepted The request has been accepted and will be processed.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist, the domain does not have Exchange, or the marker was not found. Inspect the itemNotFoundFault for more detail.

Instructions:

1. Create a CSV (comma-separated values) file containing the distribution lists you'd like to import. You can get a valid CSV file format by bulk-exporting your current distribution lists.

2. Upload the file to a public accessible URL (e.g. cloud-files, CDN, etc.)

3. Call this endpoint with the url of the file in the body.

4. The OverrideExisting field is optional and defaults to false. When true, any existing distribution lists will be modified to match the CSV file, including the removal of members and senders.

  • NOTE: The Description field will be cleared out if left blank when OverrideExisting is true or false.

5. You will receive a confirmation email to the address specified in the URL when the import is complete. Any rows that were not able to be imported are available via a link provided in the confirmation email.

Request:
POST https://api.emailsrvr.com/v1/domains/example.com/ex/distributionLists?emailAddress=myAdminEmail@example.com
{
    "FileUrl": "http://asdfasdfzxcvzxcvasdfasdf.cf1.rackcdn.com/MyDistributionLists.csv",
    "OverrideExisting": false
}
Response:
202 Accepted

Email Addresses

List
Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}/emailaddresses
Description Lists an existing Distribution List's alternate email addresses. (see Listings)
Model Email Address Listing

HTTP Codes

Code Condition
200 OK The data was successfully retrieved.
404 Not Found The domain does not exist, the domain does not have Exchange, or the resource was not found. Inspect the itemNotFoundFault for more detail.
GET: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL/emailaddresses

Response:
200 OK
{
    "EmailAddresses": [
        {
            "Value": "exampledl@example.com",
            "AddressPrimary": true,
            "AddressProtocol": "smtp"
        },
        {
            "Value": "exampledl-alias@example.com",
            "AddressPrimary": false,
            "AddressProtocol": "smtp"
        }
    ],
    "Limit": 25,
    "Total": 2,
    "Order": "asc"
}

Members

List
Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}/members
Description Lists an existing Distribution List's Members. (see Listings)
Model Members Listing

HTTP Codes

Code Condition
200 OK The data was successfully retrieved.
404 Not Found The domain does not exist, the domain does not have Exchange, or the resource was not found. Inspect the itemNotFoundFault for more detail.
GET: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL/members

Response:
200 OK
{
    "Recipients": [
        {
            "Value": "mexuser1"
        },
        {
            "Value": "mexuser2"
        }
    ],
    "Limit": 25,
    "Total": 2,
    "Order": "asc"
}

Senders

List
Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionlists/{common name}/senders
Description Lists an existing Distribution List's Senders. (see Listings)
Model Senders Listing

HTTP Codes

Code Condition
200 OK The data was successfully retrieved.
404 Not Found The domain does not exist, the domain does not have Exchange, or the resource was not found. Inspect the itemNotFoundFault for more detail.
GET: https://api.emailsrvr.com/v1/domains/example.com/ex/distributionlists/ExampleDL/senders

Response:
200 OK
{
    "All": "restricted",
    "Recipients": [
        {
            "Value": "mexuser1"
        },
        {
            "Value": "mexuser2"
        }
    ],
    "Limit": 25,
    "Total": 2,
    "Order": "asc"
}

New Distribution List Options

https://api.emailsrvr.com/v1/domains/(domain)/ex/distributionListOptions/ is the base URL for getting complete sets of valid data that can be submitted as part of a Distribution List create operation.

Available Senders Recipients

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionListOptions/AvailableSendersRecipients
Description Use this route to retrieve a list of recipients that can be senders for a new Distribution List on the given domain.
Model Senders Listing
Request:
GET https://api.emailsrvr.com/v1/customers/all/domains/example.com/ex/distributionlistOptions/AvailableSendersRecipients

Response:
200 OK
{
    "Recipients": [
        {
            "Value": "mexuser1"
        },
        {
            "Value": "mexuser2"
        },
        {
            "Value": "mexuser3"
        },
        {
            "Value": "mexuser4"
        }
    ],
    "Limit": 25,
    "Total": 2,
    "Order": "asc"
}

Available Members Recipients

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionListOptions/AvailableMembersRecipients
Description Use this route to retrieve a list of recipients that can be Members for a new Distribution List on the given domain.
Model Members Listing
Request:
GET https://api.emailsrvr.com/v1/customers/all/domains/example.com/ex/distributionlistOptions/AvailableMembersRecipients


Response:
200 OK
{
    "Recipients": [
        {
            "Value": "mexuser1"
        },
        {
            "Value": "mexuser2"
        },
        {
            "Value": "mexuser3"
        },
        {
            "Value": "mexuser4"
        }
    ],
    "Limit": 25,
    "Total": 2,
    "Order": "asc"
}

Existing Distribution List Options

https://api.emailsrvr.com/v1/domains/(domain)/ex/distributionLists/(common name)/options is the base URL for getting complete sets of valid data that can be submitted as part of a Distribution List update operation.

Available Senders Recipients

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}/options/AvailableSendersRecipients
Description Use this route to retrieve a list of recipients that can be senders for a specific Distribution List on the given domain.
Model Senders Listing
Request:
GET https://api.emailsrvr.com/v1/customers/all/domains/example.com/ex/distributionLists/ExampleDL/options/AvailableSendersRecipients


Response:
200 OK
{
    "Recipients": [
        {
            "Value": "mexuser3"
        },
        {
            "Value": "mexuser4"
        }
    ],
    "Limit": 25,
    "Total": 2,
    "Order": "asc"
}

Available Members Recipients

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/distributionLists/{common name}/options/AvailableMembersRecipients
Description Use this route to retrieve a list of recipients that can be Members for a specific Distribution List on the given domain.
Model Members Listing
Request:
GET https://api.emailsrvr.com/v1/customers/all/domains/example.com/ex/distributionLists/ExampleDL/options/AvailableMembersRecipients


Response:
200 OK
{
    "Recipients": [
        {
            "Value": "mexuser3"
        },
        {
            "Value": "mexuser4"
        }
    ],
    "Limit": 25,
    "Total": 2,
    "Order": "asc"
}