List Mailing Lists

GET {{baseUrl}}/directories/:directoryId/mailinglists?ownerId=<string>&pageSize=100&skipToken=<string>&includeCount=<boolean>

Return a list of the mailing lists in an XM Directory <!--From Readme--> For the last page of results, the value associated with nextPage will be null. <!-- theme: warning -->

This API call is only available to XM Directory users.

contactCount is an approximate value, use list contacts api to get exact count.

The new string-based pagination functionality results in improved performance and a lower rate of timeouts. To opt in, append query parameter useNewPaginationScheme=true.

Request Params

KeyDatatypeRequiredDescription
ownerIdstringTo query for shared mailing lists available to the user, set ownerId to a user-groupId.
pageSizenumberThe maximum number of items to return per request
skipTokenstringThe start position for pagination
includeCountstringWhen set to true will include the contact count, when set false that count will show zero and the count will not occur.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;result&quot;:{&quot;elements&quot;:[{&quot;contactCount&quot;:0,&quot;mailingListId&quot;:&quot;\u003cstring\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;lastModifiedDate&quot;:&quot;\u003cstring\u003e&quot;,&quot;creationDate&quot;:&quot;\u003cstring\u003e&quot;,&quot;ownerId&quot;:&quot;\u003cstring\u003e&quot;},{&quot;contactCount&quot;:0,&quot;mailingListId&quot;:&quot;\u003cstring\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;lastModifiedDate&quot;:&quot;\u003cstring\u003e&quot;,&quot;creationDate&quot;:&quot;\u003cstring\u003e&quot;,&quot;ownerId&quot;:&quot;\u003cstring\u003e&quot;}],&quot;nextPage&quot;:&quot;\u003cstring\u003e&quot;},&quot;meta&quot;:{&quot;httpStatus&quot;:&quot;\u003cstring\u003e&quot;,&quot;requestId&quot;:&quot;\u003cstring\u003e&quot;,&quot;notice&quot;:&quot;\u003cstring\u003e&quot;}}