question

Tracy Cooper avatar image
Tracy Cooper asked ·

How can I clear an extension attribute?

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.

restapi
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

· Write an Answer
Phong Vu avatar image
Phong Vu answered ·

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)
    });
Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.