Distribution lists

Retrieving distribution lists

Similar to creating a distribution list, retrieving a DL is bound to the workspace the DL belongs to. A distribution list that belongs to a workspace can't be accessed from another workspace.

The code samples below describe the methods to retrieve distribution lists using the Whispir API.

  • JSON
  • XML

Retrieving distribution lists

The following snippets show how you can use the Whispir API to retrieve distribution list information:

{{codeStart}}

HTTP 1.1 GET /distributionlists?apikey=<your_api_key>

Authorization: Basic asdf98nf89asdvasd2r398h8sdf

x-api-key: your_api_key

Content-Type: application/vnd.whispir.distributionlist-v1+json

{

"distributionLists" : [ {

"id" : "CF5AF1AE49ED07A6",

"name" : "DL 1",

"mri" : "dl1.company_name@list.company.whispir.sg",

"description" : "test distribution list for company",

"memberCount" : "4",

"access" : "ByApproval",

"visibility" : "Private",

"link" : [ {

"uri" : "https://api.<region>.whispir.com/distributionlists/CF5AF1AE49ED07A6?apikey=your_api_key",

"rel" : "self",

"method" : "GET"

} ]

}, {

"id" : "9FF7C2B470CCEC1E",

"name" : "Docs Distribution List",

"mri" : "Docs_Distribution_List.company@list.company.whispir.sg",

"description" : "A distribution list created while writing the docs",

"memberCount" : "2",

"access" : "Open",

"visibility" : "Public",

"link" : [ {

"uri" : "https://api.<region>.whispir.com/distributionlists/9FF7C2B470CCEC1E?apikey=your_api_key",

"rel" : "self",

"method" : "GET"

} ]

}],

"status" : "1 to 2 of 2 ",

"link" : [ ]

}

{{codeEnd}}

  

Retrieving a specific distribution list by ID

{{codeStart}}

HTTP 1.1 GET /distributionlists/E07BA0DA35B0B1EF?apikey=<your_api_key>

Authorization: Basic asdf98nf89asdvasd2r398h8sdf

x-api-key: your_api_key

{{codeEnd}}