# Handling Multiple API request at a Time

**URL:** <https://community.hubspot.com/t/handling-multiple-api-request-at-a-time/61885>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [July 28, 2022, 9:19am UTC](https://community.hubspot.com/t/handling-multiple-api-request-at-a-time/61885 "2022-07-28T09:19:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarthickMahes](https://avatars.discourse-cdn.com/v4/letter/k/258eb7/32.png) [@KarthickMahes](https://community.hubspot.com/u/KarthickMahes)\
**Post date:** [July 28, 2022, 9:19am UTC](https://community.hubspot.com/t/handling-multiple-api-request-at-a-time/61885/1 "2022-07-28T09:19:16Z")

</div>

We are currently working on a scenario where we will get multiple API request at a same time but we need to handle that multiple API request one after another. (API Endpoint is Update Conatct Property) Is there any way we can able to Handle this case? Handling API requests one after the another ?

Or if one API hit for a Particular contact at a time, whether we able to hold the next API hit at the same time for the same contact with some delay?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 28, 2022, 7:58pm UTC](https://community.hubspot.com/t/handling-multiple-api-request-at-a-time/61885/2 "2022-07-28T19:58:54Z")

</div>

Hey, @KarthickMahes 👋 Thanks for reaching out! Let’s see if we can get the conversation going. @zaklein @piersg @lindahl do you have any suggestions on how @KarthickMahes can accomplish their goals?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [August 2, 2022, 9:03am UTC](https://community.hubspot.com/t/handling-multiple-api-request-at-a-time/61885/3 "2022-08-02T09:03:15Z")

</div>

Hi @KarthickMahes, yes, you can use Promises to do this in JS.

e.g. if you need to change multiple functions and pass the results of functions to the next one

```lia-code-sample
doSomething()
 .then((result) => doSecondThing(result))
 .then((newResult) => doThirdThing(newResult))
 .then((finalResult) => {
 console.log(`Got the final result: ${finalResult}`);
 })
 .catch(failureCallback);

```

MDN article [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises).
