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
Delete a specific call log item by id
Tags: call logs
Apr 29, 2022 at 9:34am   •   2 replies  •  0 likes
Ashvin Patel

Is there any way to delete a selected call log by callRecordId?

Ref API : https://developers.ringcentral.com/api-reference/Call-Log/deleteUserCallLog

Getting detail has a way to ask for a specific log by callRecordId but delete does not have that parameter.

2 Answers
answered on Apr 29, 2022 at 10:55am  

Aaha, never thought about it as it was not documented but thanks for pointing it out.


 0
answered on Apr 29, 2022 at 10:25am  

Yes you can. Make a HTTP DELETE to the endpoint

 '/account/~/extension/~/call-log/' + recordId

Here is a sample code using the RingCentral Node JS SDK

 async function read_own_calllog(){
   try {
     var resp = await platform.get('/restapi/v1.0/account/~/extension/~/call-log', {
       dateFrom: '2022-04-01T00:00:00.000Z'
     })
     var jsonObj = await resp.json()
     for (var record of jsonObj.records){
       if (record.id == "XXXXXXXXXX"){ // a record id you want to delete
         deleteRecordById(record.id)
         break
       }
     }
   }catch(e) {
     console.error(e.message);
   };
 }
    
 async function deleteRecordById(recordDd) {
   try {
     var resp = await platform.delete('/restapi/v1.0/account/~/extension/~/call-log/' + id)
     console.log(resp)
   }catch(e) {
     console.error(e.message);
   };
 }

 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