Skip to main content
Question

Update multiple contact

  • October 21, 2021
  • 5 replies
  • 308 views

I want to update multiple contact in my custom web application using api..which api can be called? Any sample example available?

You can use this following API to update your external contacts in bulk (maximum 500 ext) :

https://developers.ringcentral.com/api-reference/External-Contacts/addressBookBulkUpload


  • New Participant
  • January 30, 2025

This endpoint documentation shows a ‘results’ property on the response with record details, but I do not get one. I’m trying to find the most efficient way to upload contacts and get the associated IDs. I tried adding ?results=true to the url, no luck. Can anyone help? 

Thanks,

Alex


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • January 30, 2025
alexpowell wrote:

This endpoint documentation shows a ‘results’ property on the response with record details, but I do not get one. I’m trying to find the most efficient way to upload contacts and get the associated IDs. I tried adding ?results=true to the url, no luck. Can anyone help? 

Thanks,

Alex

The response from the POST endpoint contains the task Id. You need to use the id to check the status of the task and get the response with the result when the task is completed.

Here is an example how to check the task status and get the response.

async function check_bulk_upload_task(taskId){
  try {
    var endpoint = `/restapi/v1.0/account/~/address-book-bulk-upload/tasks/${taskId}`
    var resp = await platform.get(endpoint)
    var jsonObj = await resp.json()
    if (jsonObj.status == "Failed"){
      console.log(jsonObj)
    }else if (jsonObj.status == "Completed"){
      console.log(JSON.stringify(jsonObj))
    } else {
      await new Promise(r => setTimeout(r, 20000));
      check_bulk_upload_task(taskId)
    }
  }catch(e){
    console.log(e.message)
  }
}

 


  • New Participant
  • January 31, 2025

Thank you!


  • New Participant
  • January 31, 2025

I did this and was returned an array that did not include a id for each contact created. I got names, phones, addresses, but no ID. How can I get the IDs? I need to do several hundred per extension, so individual calls are not an option because of the rate limiting.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings