List Directory Contacts

GET {{baseUrl}}/directories/:directoryId/contacts?pageSize=100&skipToken=qui

Retrieve the contacts in a specific directory. <!--From Readme--> For the last page of results, the value associated with nextPage will be null.

This API call is only available to XM Directory users.

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
pageSizenumberThe maximum number of items to return per request
skipTokenstringThe start position for pagination

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;result&quot;:{&quot;elements&quot;:[{&quot;contactId&quot;:&quot;CID_012345678901234&quot;,&quot;firstName&quot;:&quot;Jane&quot;,&quot;lastName&quot;:&quot;Doe&quot;,&quot;email&quot;:&quot;JaneDoe@email.com&quot;,&quot;phone&quot;:&quot;111-111-1111&quot;,&quot;extRef&quot;:&quot;my_Internal_ID_12345&quot;,&quot;language&quot;:&quot;&quot;,&quot;unsubscribed&quot;:true},{&quot;contactId&quot;:&quot;CID_012345678901234&quot;,&quot;firstName&quot;:&quot;Jane&quot;,&quot;lastName&quot;:&quot;Doe&quot;,&quot;email&quot;:&quot;JaneDoe@email.com&quot;,&quot;phone&quot;:&quot;111-111-1111&quot;,&quot;extRef&quot;:&quot;my_Internal_ID_12345&quot;,&quot;language&quot;:&quot;&quot;,&quot;unsubscribed&quot;:true}],&quot;nextPage&quot;:&quot;pariatur eiusmod Duis laboris&quot;},&quot;meta&quot;:{&quot;httpStatus&quot;:&quot;consequat magna laborum nisi deserunt&quot;,&quot;requestId&quot;:&quot;dolore&quot;,&quot;notice&quot;:&quot;cillum Duis&quot;}}