Why is there no documentation for the payload send...
# support
n
Why is there no example anywhere for the tool call payload sent to my server? Of course I can reverse-engineer it from the request but it's really bad DX. Can someone give me an example payload without me having to access the server logs? This site is not helpful: https://docs.vapi.ai/tools-calling#server-response-format-providing-results-and-context
v
@Noema I understand that not having an example payload readily available can be frustrating. I'm here to help! The payload sent to your server by VAPI typically includes the data you need to process the voice interaction, along with the
x-vapi-secret
header for security purposes. While I don't have the exact payload structure since it can vary based on the interaction, a typical payload might look something like this:
Copy code
json
{
  "sessionId": "unique-session-id",
  "userId": "unique-user-id",
  "timestamp": "2023-04-01T12:34:56Z",
  "intent": {
    "name": "user_intent",
    "parameters": {
      "param1": "value1",
      "param2": "value2"
    }
  },
  "context": {
    "previousIntent": "previous_user_intent",
    "parameters": {
      "param1": "value1",
      "param2": "value2"
    }
  }
}
The
x-vapi-secret
header would be included in the HTTP headers of the request, not in the JSON payload. If you need the exact payload structure that VAPI sends, I can assist you further by contacting support to provide you with the specific details. Would you like me to do that?
You can continue this conversation by mentioning me in the message.
n
How do I know this is not hallucinated or dated information? Seems really weird that you wouldn't have the toolCallId included
v
Got it. Tagging @User for additional help.
s
@Noema you can check the tool call payload type from here https://api.vapi.ai/api#/Assistants/AssistantController_findOne
n
Thank you! I already resolved it by reading out the logs but Swagger is so much more convenient, I'll use it for any future cases. Maybe make it a bit more prominent in the docs in the future
4 Views