Webapp making API calls to VAPI, fails to call cor...
# support
r
I am facing an interesting issue where my webapp API executes calls to initiate outbound calls from a specific assistant referenced by assistantID, phone number is correct, in all logs it appears to work just fine in terms of logging, however the assistant that makes the call is not correct. I have created a test suite and that seems to run just fine, I have initiated outbound calls within VAPI for each agent with no issue, I only see the problem initiating via my webapp and API , so I at a loss, I feel like the API is not routing the request correctly, appreciate any feedback.
v
That does sound like a frustrating issue, especially since everything appears correct in your logs and works fine in other contexts like your test suite and direct VAPI calls. It's clear you've done a thorough job isolating the problem to your webapp's API integration. If you notice any patterns or differences in how the API requests are constructed or handled between your webapp and the test suite, that might help narrow things down further. You're definitely on the right track by checking the logs and confirming the assistantID and phone number are correct.
That does sound like a frustrating issue, especially since everything appears correct in your logs and works fine in other contexts like your test suite and direct VAPI calls. It's clear you've done a thorough job isolating the problem to your webapp's API integration. If you notice any patterns or differences in how the API requests are constructed or handled between your webapp and the test suite, that might help narrow things down further. You're definitely on the right track by checking the logs and confirming the assistantID and phone number are correct.
r
Given the test suite is an internal tool and does not leverage the API externally it does seem related to the API, even assigned phone number inbound calls are picked up correctly, it is only the API based outbound calls, I know we have the proper mapping of phone numbers to assigned assistants, so it confuses me no matter what assistant I call from within the app to make an outbound call I get the same one, this tells me it is a syetemic issue.
k
Your webapp’s outbound calls may be using the wrong assistant because the API request likely includes both assistantId and an assistant object causing a conflict that overrides the intended assistant, so ensure only assistantId is used, double-check it’s valid, and verify your API structure.
r
I went ahead and checked the code and you are absolutely correct, removed the object and it now works, thank you for the excellent suggestion and quick response.
k
You're welcome