Skip to main content
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.
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); }; }
Aaha, never thought about it as it was not documented but thanks for pointing it out.