Tool API Destinations Update Issue
# support
c
Hello Vapi Support - Like another user reported last week, we're unable to update destinations within the tool API; their ticket was closed as they didn't provide the CURL We're having the same issue; happy to provide whatever payload you need to see Could we get an example PATCH TOOL payload to update destinations?
@User
v
@CarBot Hello! I'm glad to assist you with updating destinations using the Vapi API. To help you construct a PATCH request payload, I'll need a bit more information about the specific details you want to update for your assistant's destinations. Could you please provide the following details? 1. The unique identifier (ID) of the assistant you want to update. 2. The specific destination details you wish to change, such as the destination type, address, or any other relevant parameters. Once I have this information, I can give you a tailored example of the PATCH request payload that you can use to update your destinations.
You can continue this conversation by mentioning me in the message.
c
I'm looking to update the TOOL not the Assistant @User
v
Got it. Tagging @User for additional help.
c
@Vapi the tool ID is c01d1c41-8269-47ef-b8de-1e84c009b219; i'd liked to update the number of a destination from +12345678989 to +12345678988
v
@CarBot Thank you for providing the tool ID and the details of the destination update. To update the number of a destination, you would typically send a PATCH request to the API endpoint responsible for managing destinations. Here's an example of what the payload might look like in JSON format for a PATCH request:
Copy code
json
{
  "toolId": "c01d1c41-8269-47ef-b8de-1e84c009b219",
  "updates": {
    "destination": {
      "oldNumber": "+12345678989",
      "newNumber": "+12345678988"
    }
  }
}
Please note that the actual field names (
oldNumber
,
newNumber
) and the structure of the payload might differ based on the specific API documentation for the tool you are using. You should replace these placeholder field names with the correct ones as per the API's specification. If you need the exact field names and the correct endpoint URL, please refer to the API documentation or ask support for more info on this.
c
@Vapi please share the documentation with endpoint URL: for the patch reqeust you're suggesting.
v
@CarBot I apologize for the confusion, but it seems there might be a misunderstanding. As a support bot for VAPI, I don't have direct access to external documentation or the ability to provide exact endpoint URLs for PATCH requests. However, you can find the documentation you need by visiting the VAPI documentation page. Here's how you can navigate to the API reference: 1. Go to the VAPI home page at [Vapi](https://docs.vapi.ai/). 2. Click on the "API Reference" section in the navigation menu. 3. Look for the relevant endpoint under the "Tools" or "Destinations" section of the API reference. The API Reference will provide you with the exact endpoint URL, the required payload structure, and other details necessary to make a PATCH request to update a destination. If you need further assistance or if the documentation does not contain the information you're looking for, please reach out to VAPI's support team directly for more detailed guidance.
c
Yea - still failures on any type of destinations update; { "message": [ "property destination should not exist" ], "error": "Bad Request", "statusCode": 400 }
s
@CarBot can you share the request payload?
c
Thanks @Shubham Bajaj -we've tried a few ways; both with and without the function included: { "destinations": [ { "type": "number", "number": "+REDACTED", "message": "I'm transferring you to Chris at his two six seven number, hang on just a moment.", "description": "for calls being transferred to Chris", "transferPlan": { "mode": "warm-transfer-with-message", "message": "You're receiving transferred call from Clare at Johns" } } ] }
s
hey the property name is destinations not destination.
c
Thanks @Shubham Bajaj! In which package? we’ve sent it both ways; defaulting to destinations. Could you share a working PATCH Tool payload that can successfully update the destinations?
s
@CarBot sorry it was my bad, I forgot you cannot update destinations instead you can only update server, function, messages and async. You have to delete and recreate the tool.
c
Thank you @Shubham Bajaj - appreciate that confirmation.