0

In the mobile push rest API, is there somewhere where I can find the list of contacts that has opted in to receive push notifications via the API? Also, is there a way, say via the Event Notification Server, where it is broadcast to a webhook that someone has opted in?

Thanks in advance

0

You can also retrieve this information via API by searching by the Attribute named "MobilePush Demographics", with the route:

/contacts/v1/attributeSets/name:MobilePush%20Demographics/search
Example:
Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
POST /contacts/v1/attributeSets/name:MobilePush%20Demographics/search
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

{
"request": {
"attributes": [{
"key": "MobilePush Demographics.Device ID"
}]
},
"conditionSet": {
"operator": "And",
"conditionSets": [],
"conditions": [{
"attribute": {
"key": "MobilePush Demographics.Device ID"
},
"operator": "Equals",
"value": {
"items": ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
}
}]
}
}
Reference: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/attributeSetsDataName.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.