Question

How can I clear an extension attribute?

  • 9 April 2020
  • 1 reply
  • 185 views

Using the REST API, I can update a user extension and fill out the mobilePhone attribute, but I cannot seem to figure out how to then clear that attribute for other users. Is this possible? I've tried sending "", null, and just a space and they all just error.


1 reply

Userlevel 1

An empty string should work. Not sure how you called the API but try this in Node JS

var mobilePhone = { contact: { mobilePhone: ""}}
platform.put('/account/~/extension/[extensionId]', mobilePhone)
    .then(function (resp)
       console.log(resp.json())
    })
    .catch(function(e){
       console.log(e.message)
    });

Reply