make post call
# support
t
Error: 400 Bad Request {"message":["model.each value in tools.server.url must be a valid URL. Hot tip, the protocol should be https://.","each/ value in credentialIds must be a UUID"],"error":"Bad Request","statusCode":400} do you know maybe? this is my json, any idea how to fix this json? https://cdn.discordapp.com/attachments/1288159853180621011/1288159853390594148/message.txt?ex=66f42bd9&is=66f2da59&hm=d8862144240c8e92c1ddf7132dca97ae0df2141c80c87160efc13803b83f0af1&
v
@TheSnowguru Certainly! The error message you're seeing indicates two separate issues with the JSON you've provided: 1. The value for
tools.server.url
must be a valid URL, and it should start with the
https://
protocol. 2. Each value in
credentialIds
must be a UUID (Universally Unique Identifier). Without seeing the actual JSON, I can only give you a general idea of how it should look. Here's an example of what the corrected JSON might look like:
Copy code
json
{
  "tools": {
    "server": {
      "url": "https://example.com" // Replace with your actual server URL
    }
  },
  "credentialIds": [
    "123e4567-e89b-12d3-a456-426614174000", // Replace with your actual UUIDs
    "123e4567-e89b-12d3-a456-426614174001"  // Each UUID should be unique
  ]
}
Make sure that: - The URL is complete, including
https://
and it is properly formatted. - Each UUID in
credentialIds
is valid and unique. If you provide the actual JSON, I could help you correct it specifically. Otherwise, please update your JSON according to the error messages and the example above.
You can continue this conversation by mentioning me in the message.
s
are you using dtmf function? if not then just remove it
and it will solve your issue
also why are you adding credential id?
t
where do i set the phone number to call?
no
s
...
t
Error: 400 Bad Request {"message":["model.each value in toolIds must be a UUID"],"error":"Bad Request","statusCode":400}
s
curl 'https://api.vapi.ai/call/phone' \ -H 'authorization: Bearer your-private-token' \ --data-raw '{"assistantId":"0b5603cb-d281-475c-9814-87183cc2cdbf","customer":{"number":"+14353452345"},"phoneNumberId":"ac6973cf-bc82-4c38-b4a5-dde2232936c3"}'
sample payload
through which you can make outbound call
t
first in the scenario i need to make phone call request and then create assistant of viseversa?
c
it says it in the error
t
"customerId must be a UUID" error , give me example of input for this field
@Vapi
s
can you please follow the curl request that I gave you
t
Okay
@User is it possible to trigger a get agent call, to do an outboand call? if yes? what endpoint?
@Vapi
v
@TheSnowguru I apologize for the confusion earlier. To address your queries: 1. If you're not using the DTMF function and it's causing an error, you should indeed remove it from your JSON configuration. 2. The
credentialId
is typically used for authentication purposes. If it's not required for your specific implementation, you may remove it if it's causing errors. 3. To set the phone number to call, you would typically use a field like
phoneNumber
or
destination
in your JSON payload, depending on the API's specification. 4. Regarding the order of operations, you would typically first make a phone call request and then create an assistant, or vice versa, based on the workflow required by the API you are using. 5. The error message "customerId must be a UUID" indicates that the
customerId
field expects a UUID format. An example of a UUID is
"123e4567-e89b-12d3-a456-426614174000"
. 6. Following the curl request you provided, to make an outbound call using VAPI, you would use the endpoint provided in the curl command, which is
'https://api.vapi.ai/call/phone'
. 7. To trigger a "get agent" call for an outbound call, you would need to refer to the specific API documentation for the endpoint and the required parameters. If VAPI supports this feature, the endpoint would be documented in their API reference. If you need further assistance with a specific error or step in the process, please provide more details or the exact error message, and I'll do my best to assist you.
t
@Vapi how to trigger a get agent into an outboand call ? which endpoint is that?
v
@TheSnowguru To trigger a "get agent" action as part of an outbound call using VAPI, you would typically need to set up your call flow to include a step that connects the call to an agent. However, VAPI's specific implementation details for such a feature are not provided in the context you've given. If VAPI supports a feature to directly connect to an agent during an outbound call, it would likely be documented in their API reference or developer documentation. You would look for an endpoint related to call handling or call management that allows you to specify an action to connect to an agent. Since I don't have access to the full VAPI documentation, I can't provide the exact endpoint. You would need to consult the VAPI documentation or ask their support team for more information on how to implement a "get agent" action during an outbound call. If there's a specific endpoint or feature you're referring to in the VAPI documentation, please provide more details, and I'll be happy to help you with the correct usage.
t
@Sahil
@Vapi I call this voice "voice": { "fillerInjectionEnabled": false, "provider": "11labs", "voiceId": "0HIYRskoDnGprV4Q1rdZ", "model": "eleven_multilingual_v2" }, but it doesn't work, how do i make sure its in the voice libraary?
v
@TheSnowguru To ensure that the voice you are trying to use is available in the voice library, you would typically need to check the documentation or the voice provider's library directly. Since the provider mentioned is "11labs," which is not listed in the context provided, I assume it's a custom or third-party provider. Here's what you can do: 1. **Check Provider Documentation**: Look for the documentation provided by "11labs" to see if the
voiceId
"0HIYRskoDnGprV4Q1rdZ" and the
model
"eleven_multilingual_v2" are valid and currently available. 2. **Contact Support**: If you cannot find the information in the documentation, you may need to contact the support team for "11labs" to confirm the availability of the voice and model you are trying to use. 3. **Use a Test Call**: If the provider offers a test call feature or a sandbox environment, try using these tools to test the voice configuration. 4. **Check for Errors**: If there's an error message or response code when you attempt to use the voice, it may provide more information about what's wrong. Ensure that all other parameters in your request are correct and that the voice provider's service is operational. If "11labs" is not the correct provider or if you have more information about the voice library you are trying to access, please provide additional details so I can assist you further. If "11labs" is a placeholder for a different provider, please replace it with the correct provider name from the available options in the context provided (
azure
), and ensure that the
voiceId
corresponds to a voice from that provider's library.
t
that's works, now, I have another question, I have set the Server url , and I am not getting the call analysis results into the json that i have posted in server url..... @Vapi
v
@TheSnowguru If you have set the server URL but are not receiving the call analysis results as expected, there could be a few reasons for this issue. Here are some steps you can take to troubleshoot: 1. **Check Server URL**: Ensure that the server URL you have set is correct and that it is accessible from the internet. The URL should start with
https://
and be a valid endpoint that can accept POST requests. 2. **Verify Server Configuration**: Make sure that your server is configured to receive POST requests and that there are no firewalls or security settings blocking incoming requests from the VAPI service. 3. **Check for Errors**: Look for any error messages or logs that might indicate why the server is not receiving the data. This could include checking the server logs, application logs, or any error responses returned by the server. 4. **Review API Documentation**: Consult the VAPI documentation to ensure that you have followed all the necessary steps to set up call analysis and result posting correctly. 5. **Check Request Format**: Verify that the format of the data you are expecting matches the format that VAPI sends. There may be a mismatch in the expected schema. 6. **Test with a Mock Server**: Use a service like RequestBin or Postman's mock server to test if the call analysis results are being sent. This can help you determine if the issue is with the VAPI service or your server. 7. **Contact Support**: If you have gone through all the above steps and still face issues, it may be best to contact VAPI support for assistance. They can provide more specific guidance based on their system's behavior. Remember to check any authentication or API keys that may be required for the server URL to accept data from VAPI. If you have any specific error messages or additional context, please provide them for more detailed assistance.
t
@Vapi write an example of api request to get the call analysis, its not received from the 200 response of the call assistant request...right?
v
@TheSnowguru That's correct; call analysis data is typically not included in the 200 OK response of the initial call assistant request. Instead, call analysis results are often sent asynchronously to a specified server URL as a webhook event or retrieved through a separate API request. Here's an example of how you might retrieve call analysis results using a hypothetical API endpoint provided by VAPI. Please note that this is a generic example, and you will need to refer to the actual VAPI documentation for the exact endpoint and parameters:
Copy code
http
GET /api/call-analysis/{callId}
Host: api.vapi.ai
Authorization: Bearer your-private-token
In this example,
{callId}
should be replaced with the unique identifier of the call you want to retrieve analysis for. The
Authorization
header should contain a valid bearer token to authenticate your request. The response to this request would typically be a JSON object containing the call analysis data. Here's an example of what the response might look like:
Copy code
json
{
  "callId": "unique-call-id",
  "transcription": "Full call transcription text here...",
  "sentimentAnalysis": {
    "overallSentiment": "Positive",
    "sentimentScore": 0.85
  },
  "keywords": [
    "customer support",
    "refund request",
    "product quality"
  ],
  // Additional analysis data...
}
Please ensure you check the VAPI documentation for the correct endpoint, HTTP method, required headers, and any other parameters you might need to include in your request. If VAPI provides a different method for retrieving call analysis, such as through a webhook, you will need to follow their specific instructions for setting up and handling those events.
t
@Sahil this bot seems to be hallusicanting, there's no such endpoint ....right?
@Chowderr maybe you know? how do i get the call analysis ? its post call??
s
@TheSnowguru can you create a new support ticket for it.
5 Views