Discrepancy between API Calls vs. UI
# support
g
I started learning how to use the API calls this past week for Vapi. As someone primarily non-technical there are a few things that had gotten me scratching my head a bit, and I just need some confirmation. E.g. In the dashboard you can click two buttons and give the agent the ability to + transfer the call to the number you want + end the call with the pre-built function. When using the list assistant api call, the payload you get is like such: ""forwardingPhoneNumber": "+18643667777", endCallFunctionEnabled": true," When creating or updating the assistant via api calls, those properties don't exist. However within the Model object there exists an array of Tools in which you can add to the assistant. I did and the result was status code 200 and it shows as such: "tools": [ { "type": "endCall" }, { "type": "transferCall", "destinations": [ { "type": "number", "number": "+18643667777" } ] } ] I just want to confirm the above that is shown as a payload does the same thing as the UI? Furthermore is it accurate for me to assume than anything I see/receive via the API calls in terms of payload holds more weight than what I see in the UI dashboard? E.g. via API, the server URL is clearly there. But in the dashboard, post-update, it's not. Same thing with max idle timeout, in API it's longer than 10 seconds but in the dash, it's 10 seconds max. There seems to be a lag in terms of UI development, which I guess I can't blame you guys considering it's made for devs. But to my question above, of being able to trust whatever the API call shows - if I use the "list assistant" api call, and the configurations are shown, that means there hasn't been an error. And if they show up for the assistant, I can assume they work as intended, is that correct? Just so I can get clear.
v
message has been deleted
@george.l Yes, you are correct in your understanding. The payload you've added to the assistant via the API, which includes the "tools" array with "endCall" and "transferCall" configurations, should indeed perform the same functions as the options you can select in the UI dashboard. When you receive a status code 200, it indicates that your request was successfully processed and the changes have been applied. Regarding the API payload versus the UI dashboard, it is generally accurate to trust the API responses. The API is the underlying service that powers the functionality, and the UI is a visual layer built on top of it. If there are discrepancies between the two, the API's response is the more authoritative source of information about the current configuration and capabilities of your assistant. If you use the "list assistant" API call and the configurations are shown in the response, you can trust that they have been set correctly. As long as the configurations are returned in the API response, you can assume they are active and should work as intended. However, it's important to note that while the API response confirms that the configurations have been set, it does not necessarily guarantee that they will work as expected in all scenarios. It's always a good practice to test the functionality in a real-world scenario to ensure that everything is working properly. If you encounter any inconsistencies or issues with the functionality, please don't hesitate to reach out to support for further assistance.
You can continue this conversation by mentioning me in the message.
b
I am also interested in this
s
@george.l - Both of the properties are deprectaed by now and hidden because of this you don't see them in the UI for now you have to use
model.tools[].type === "endCall"
tool instead and
model.tools[].type === "transferCall"
in place of endCallFunctionEnabled and forwardingPhoneNumber - Tools are part of the assistant model, not the other way around. both tool payloads you showed are correct, but when creating your own transfer call tool, it's recommended to use a different name than the reserved/default ones. - Yes, the api is the source of truth for all communication. - Thanks for reporting the idle timeout issue. i've created a ticket for it: https://linear.app/vapi/issue/VAP-2223/update-max-idle-timeout-seconds While the api is the source of truth, we are working on improving the dashboard as our next big initiative. we want the dashboard to be the first point of contact for all our features and users. cc: @Ben
b
> Both of the properties are deprectaed by now and hidden because of this you don't see them in the UI for now you have to use model.tools[].type === "endCall" tool instead and model.tools[].type === "transferCall" in place of endCallFunctionEnabled and forwardingPhoneNumber Thanks for clarifying @Shubham Bajaj - Ah I see now we specify the tool as part of the
model
itself not as part of the assistant, I will try this today Would be great to update the docs here: https://docs.vapi.ai/assistants/function-calling#end-call accordingly
s
@Ben it's the same just that internally this is how it is represented. > Ah I see now we specify the tool as part of the model itself not as part of the assistant, I will try this today