Further to my previous answer, you can now delete Contacts using the REST API. I've just tested this and this works.
Deleting Contacts is a two step process. There is documentation on this page and this one, but the documentation is incorrect (the JSON payload isn't even valid) and there's no reference to these pages in the site index for some reason.
Step 1. Retrieve Adapters
Host: https://www.exacttargetapis.com
POST /contacts/v1/contacts/actions/delete/options
Authorization: Bearer {{accessToken}}
Content-Type: application/json
{
"context":{
"listType":"audience",
"deleteOperationType":"ContactAndAttributes"
}
}
This request will return this response. You can then delete Contacts (refer to the first values array) from All Contacts, MobileConnect Addresses and MobileConnect Subscriptions Contact/list models. Use the adapterID
and iD
values retrieved from the previous request in this request:
Step 2. Delete Contacts
Host: https://www.exacttargetapis.com
POST /contacts/v1/contacts/actions/delete?type=keys
Authorization: Bearer {{accessToken}}
Content-Type: application/json
{
"ContactTypeId":0,
"values":[
"00Q6F000014XAA7UAO",
"00Q6F000014XAAvUAO"
],
"DeleteOperationType":"ContactAndAttributes",
"optionValues":[
{
"adapterID":6011,
"adapterKey":"ContactDeleteProcessor.ContactBuilder.Roots",
"values":[
{
"iD":"5523009a-4174-4dd8-8ba6-c6df7c28a39b",
"value":"True"
}
]
},
{
"adapterID":6014,
"adapterKey":"ContactDeleteProcessor.MobileConnect",
"values":[
{
"iD":"2f2e5b49-b2d3-4dad-8781-876bc9cd1525",
"value":"True"
},
{
"iD":"b0580712-a1fe-4bc0-9857-6dcfcd110439",
"value":"True"
}
]
}
]
}