News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Is there an API function to clear or reset a voice mailbox?
Tags: rest api, voicemail
Sep 26, 2022 at 8:09am   •   1 replies  •  0 likes
Gordon Lampshire

I can change a users details like name, email address, role and also the delete the call log via the API but how can I also automatically clear any saved or unheard messages before a new user takes over a number please?

1 Answer
answered on Sep 27, 2022 at 8:21am  

Yes, you can call the Get Message List API to read all messages (set messageType=VoiceMail if you only want to read voicemail messages) of an extension. Then grab all the message ids and call the Delete Message API to delete them. The delete message takes an array of message ids so you can delete them all in 1 API call. Remember to set the purge=true to delete all attachments associated with those messages. Here is an example in Node JS to delete a single message and its associated attachments:

async function deleteMessage(id){
  await platform.delete(`/restapi/v1.0/account/~/extension/~/message-store/${id}?purge=true`)
}

 1



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us