In react hooks, How can I delay onInput event till I have finished typing

I currently have an input field that is meant to trigger an api call when an 11 digit number is input. How do I delay it from making the call until all 11 digits are typed


Something simple like this should do the trick.

const callAPI = (value) =>{
    if(value.length === 11){
    console.log("Call API")
<input type="text" oninput="callAPI(value)"/>