Exchange Distribution List (Rest API)
Contents
Distribution List
Index
URL:
[GET] /customers/(customer account number)/domains/(domain name)/ex/distributionlists
Description:
This operation returns a list of distribution lists associated with the domain.
Remarks:
The Index operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [Groups.xsd]
Example:
get '/customers/12345678/domains/example.com/ex/distributionlists?size=100&page=1&contains=mailing', 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Distribution List is not found | 404 | Distribution List not found |
Show
URL:
[GET] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)
Description:
Returns the distribution list's details.
Remarks:
The show operation only supports the GET HTTP verb. For text/xml format, refer to the following schema document: [Group.xsd]
Example:
get '/customers/12345678/domains/example.com/ex/distributionlists/all.employees', 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Distribution list is not found | 404 | Distribution List not found |
Add/Edit
URL:
Add: [POST] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name) Edit: [PUT] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)
Description:
Adds/edits the distribution list with the specified information. Required fields must be supplied when adding. Others are optional.
Field Name | Data Type | Description |
---|---|---|
name | string | Distribution list name (Required for Add, not available for Edit) |
displayName | string | Distribution list display name (Required) |
isHidden | boolean | Whether or not the distribution list is hidden from the Global Address List (Defaults to false) |
Example:
post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees', { 'name' => 'all.employees', 'displayName' => 'Employees' }, 'text/xml'
put '/customers/12345678/domains/example.com/ex/distributionlists/all.employees', { 'displayName' => 'Example.com Employees' }, 'text/xml',
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Required form field is missing | 400 | Missing required field: name |
Required form field has null or empty string input | 400 | Required field displayName cannot be empty |
Boolean form field has non-boolean input | 400 | Invalid format for isHidden, input must be True or False |
Form data has unrecognized field | 400 | Unrecognized field: size |
New distribution list name already exists | 400 | The email address john.doe@abc.com is already in use |
New distribution list name doesn't meet the naming requirements | 400 | Invalid user name |
New distribution list display name doesn't meet the naming requirements | 400 | Invalid display name |
Distribution list is not found | 404 | Distribution List not found |
Display name doesn't meet the naming requirements | 400 | Invalid display name |
Delete
URL:
[DELETE] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)
Description:
Deletes the distribution list.
Example:
delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees', 'text/xml'
Description | HTTP Response Code | Sample Message |
---|---|---|
Domain is not found | 404 | abc.com not found |
Distribution list is not found | 404 | Distribution List not found |
Email Addresses
This refers to the email addresses a distribution list can appear as.
Add Email Address
URL:
[POST] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)/emailaddresses/(email address)
Description:
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.
Example:
post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/emailaddresses/alex@example.com', {}, 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Distribution list is not found | 404 | Distribution list not found |
Delete Email Address
URL:
[DELETE] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)/emailaddresses/(email address)
Description:
Deletes the email address that is tied to the distribution list.
Example:
delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/emailaddresses/alex@example.com', 'text/xml'
Member
This refers to the recipients of the distribution list.
Add Member
URL:
[POST] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)/members/(member name)
Description:
Adds an email address to the distribution list.
Example:
post '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/members/john.smith', {}, 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Distribution list is not found | 404 | Distribution list not found |
Required form field is missing | 400 | Missing field: addmember |
Form data has unrecognized field | 400 | Unrecognized field: deletemember |
New member is not found | 400 | No user with the email address jane.doe exists |
Delete Member
URL:
[DELETE] /customers/(customer account number)/domains/(domain name)/ex/distributionlists/(distribution list name)/members/(member name)
Description:
Delete an email address from the distribution list.
Example:
delete '/customers/12345678/domains/example.com/ex/distributionlists/all.employees/members/john.smith', {}, 'text/xml'
Errors:
Description | HTTP Response Code | Sample Message |
---|---|---|
Format is invalid | 406 | Invalid format |
Domain is not found | 404 | abc.com not found |
Distribution list is not found | 404 | Distribution list not found |
Member is not found | 400 | Invalid group member name |