Create Tools Via API
# support
g
Hi, I created Tools via API and its works (Screen shoot 1) But when i tried to open Tools Vapi Dashboard, i got this error (ScreenShoot2). Now, i cant open tools page, Is there something wrong with api request? and can how can i open the tools page again in vapi dashboard. This is my Body Request:
Copy code
{
  "type": "function",
  "function": {
    "name": "Testing",
    "strict": true,
    "description": "Testing",
    "parameters": {
      "type": "object",
      "properties": {
        "test": {
          "description": "test",
          "type": "string",
          "enum": [
            "test"
          ]
        },
        "test1": {
          "description": "test1",
          "type": "string",
          "enum": [
            "test1"
          ]
        }
      },
      "required": [
        "test1"
      ]
    }
  },
  "messages": [
    {
      "type": "request-start",
      "content": "test",
      "conditions": [
        {
          "param": "test",
          "operator": "eq",
          "value": "1"
        }
      ]
    },
    {
      "type": "request-complete",
      "content": "test",
      "conditions": [
        {
          "param": "test",
          "operator": "eq",
          "value": "2"
        }
      ]
    },
    {
      "type": "request-failed",
      "content": "test",
      "conditions": [
        {
          "param": "test",
          "operator": "eq",
          "value": "3"
        }
      ]
    },
    {
      "type": "request-response-delayed",
      "content": "test",
      "conditions": [
        {
          "param": "test",
          "operator": "lt",
          "value": "1"
        }
      ],
      "timingMilliseconds": 1000
    }
  ],
  "server": {
    "url": "https://voxhero.com.au",
    "timeoutSeconds": 20,
    "headers": {
      "0": {
        "name": "test",
        "value": "123"
      }
    }
  },
  "async": true
}
Thank You. cc @ivy https://cdn.discordapp.com/attachments/1369945720307712102/1369945721666797650/Screenshot_from_2025-05-08_14-39-16.png?ex=681db4e0&is=681c6360&hm=a24e18f1d3ee1b727f13fb7d269afa74b1452b3954f6489d4d2e1a7c305cfe1b& https://cdn.discordapp.com/attachments/1369945720307712102/1369945722161729607/Screenshot_from_2025-05-08_14-51-47.png?ex=681db4e0&is=681c6360&hm=5ec3642596b7f32a4507a5a5f059d0d0e3ef3cf002ae53ccc6803d744c4a70bb&
v
Thanks for sharing the details of your API request and the error you encountered in the Vapi Dashboard. From what you've described, your API request body for creating the tool appears well-structured, and it's great to hear that the creation process worked via the API. The error message "Something Went Wrong!" with a React error reference in the dashboard suggests there may be an issue with how the dashboard is handling the tool you created, but without more specific information about the error, it's difficult to pinpoint the exact cause. If you have access to more detailed error logs or messages, those might provide additional clues. In the meantime, your API request details look correct based on what you've shared.
Thanks for sharing the details of your API request and the error you encountered in the Vapi Dashboard. From what you've described, your API request body for creating the tool appears well-structured, and it's great to hear that the creation process worked via the API. The error message "Something Went Wrong!" with a React error reference in the dashboard suggests there may be an issue with how the dashboard is handling the tool you created, but without more specific information about the error, it's difficult to pinpoint the exact cause. If you have access to more detailed error logs or messages, those might provide additional clues. In the meantime, your API request details look correct based on what you've shared.
It looks like your API request to create the Tool was successful, as indicated by the 201 Created response. However, the error you’re seeing in the Vapi Dashboard (“Something Went Wrong!” with React error #31) suggests there may be an issue with how the dashboard is trying to render the Tool you created. Based on the error details, it seems the dashboard might not be handling the headers structure from your API request as expected. In your request, the headers are formatted as an object with numeric keys, each containing a {name, value} pair. This structure could be causing the dashboard to encounter an unexpected object when rendering, leading to the React error. While the API accepted your request, the dashboard may expect a different format for headers or other fields. If possible, you might want to review the structure of your API request—especially the headers section—to see if aligning it more closely with typical key-value pairs (without numeric keys) helps. The issue appears to be related to how the dashboard processes and displays the Tool data, rather than the API request itself. If you have access to edit or remove the problematic Tool via the API, that might help restore access to the Tools page in the dashboard.
It looks like your API request to create the Tool was successful, as indicated by the 201 Created response. However, the error you’re seeing in the Vapi Dashboard (“Something Went Wrong!” with React error #31) suggests there may be an issue with how the dashboard is trying to render the Tool you created. Based on the error details, it seems the dashboard might not be handling the headers structure from your API request as expected. In your request, the headers are formatted as an object with numeric keys, each containing a {name, value} pair. This structure could be causing the dashboard to encounter an unexpected object when rendering, leading to the React error. While the API accepted your request, the dashboard may expect a different format for headers or other fields. If possible, you might want to review the structure of your API request—especially the headers section—to see if aligning it more closely with typical key-value pairs (without numeric keys) helps. The issue appears to be related to how the dashboard processes and displays the Tool data, rather than the API request itself. If you have access to edit or remove the problematic Tool via the API, that might help restore access to the Tools page in the dashboard.
v
Message marked as helpful by @Gilang! 🎉
k
checking if this is resolved/solved for you?
g
yes
2 Views