List Opted Out Directory Contacts

GET {{baseUrl}}/directories/:directoryId/contacts/optedOutContacts?pageSize=100&since=2022-01-01T00:00:00.00Z&skipToken=<string>

Retrieve the contacts, in a specific directory, who have opted out. <!--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.

Request Params

KeyDatatypeRequiredDescription
pageSizenumberThe maximum number of items to return per request
sincestringThe date before which unsubscribed contacts should be excluded. If excluded, all unsubscribed contacts are included regardless of the date on which they unsubscribed from the directory.
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;exampleFirstName0&quot;,&quot;lastName&quot;:&quot;exampleLastName0&quot;,&quot;email&quot;:&quot;example0@example.com&quot;,&quot;phone&quot;:&quot;0000000000&quot;,&quot;extRef&quot;:&quot;reference.com&quot;,&quot;language&quot;:&quot;es&quot;,&quot;directoryUnsubscribed&quot;:false,&quot;directoryUnsubscribeDate&quot;:null},{&quot;contactId&quot;:&quot;CID_012345678901235&quot;,&quot;firstName&quot;:&quot;exampleFirstName1&quot;,&quot;lastName&quot;:&quot;exampleLastName1&quot;,&quot;email&quot;:&quot;example1@example.com&quot;,&quot;extRef&quot;:&quot;reference.com&quot;,&quot;phone&quot;:null,&quot;language&quot;:&quot;de&quot;,&quot;directoryUnsubscribed&quot;:false,&quot;directoryUnsubscribeDate&quot;:null}],&quot;nextPage&quot;:null},&quot;meta&quot;:{&quot;requestId&quot;:&quot;9699867f-7c37-49ce-8ff1-c34c5c845197&quot;,&quot;httpStatus&quot;:&quot;200 - OK&quot;}}