unPLUGDevelopers

Members API

Get communication preferences

GET/v1/members/{id}/communication_preferences

GET/v1/members/me/communication_preferences

Returns the member's marketing consent and where it was last changed. unPLUG reads the same values before it sends email, SMS or push campaigns.

FieldDescription
email_marketingbooleanMarketing email.
sms_marketingbooleanMarketing SMS.
push_marketingbooleanMarketing push. Separate from the device's OS permission, which you send as push_enabled on devices.
updated_atstringLast change.
sourcestringSet by unPLUG: app, web, api or unsubscribe_link. May grow.

Permissions: {id}: secret key with members:read. me: member token.

Path parameters#

  • idstring (uuid)Required

Response fields#

Returns 200 with CommunicationPreferences

  • email_marketingboolean
  • sms_marketingboolean
  • push_marketingboolean
  • updated_atstring (date-time)
  • sourcestring
    Set automatically.
    One of app, web, api, unsubscribe_link

Error descriptions#

404Not found
member_not_found

No member with this id.

410Gone
member_deleted

The member was deleted.

Any endpoint can also return the common errors.