unPLUGDevelopers

Members API

Update communication preferences

PATCH/v1/members/{id}/communication_preferences

PATCH/v1/members/me/communication_preferences

Changes marketing consent. Send only the flags that changed. You can't set source; unPLUG records it from the call. A communication_preferences.updated webhook fires.

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

Path parameters#

  • idstring (uuid)Required

Request body#

  • email_marketingboolean
  • sms_marketingboolean
  • push_marketingboolean

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#

400Bad request
invalid_param

A value isn't a boolean, or the body includes source.

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.