Which is the correct format for a server response?
# support
b
I noticed that this link (https://docs.vapi.ai/server-url/events#retrieving-assistants) and this link (https://docs.vapi.ai/api-reference/messages/server-message-response) both give docs for how a server should respond to an assistant request. (The first link's JSON response is just wrapping the assistant JSON in an "assistant" key, while the second link's JSON response has a lot more attributes) Which one is correct, or are they actually for different applications?
v
@bubbleTao Both links you've provided are indeed part of the VAPI documentation, and they complement each other by providing information on how a server should respond to an assistant request. The first link (https://docs.vapi.ai/server-url/events#retrieving-assistants) likely provides a high-level overview and context for how server URLs are used within the VAPI ecosystem, including how to set up your server to handle requests from VAPI assistants. The second link (https://docs.vapi.ai/api-reference/messages/server-message-response) probably offers more detailed information on the API reference level, including the specific message formats, parameters, and response structures that your server should use when replying to an assistant request. Both are correct and should be used together to fully understand how to implement and respond to assistant requests in your server. The first one gives you the conceptual understanding, while the second one gives you the technical details necessary for implementation. If you need further clarification on how to set up your server or handle specific types of requests, please let me know!
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
s
The first one is the most accurate one.
16 Views