server webhook
Urgent
I'm currently integrating Vapi into my application and would like to receive the full transcript and call metadata at the end of each call via a webhook.
"serverUrl": "https://dev.xxxxx.com/call/webhook",
However, I would like Vapi to send the final transcript and relevant call metadata (e.g., call duration, user ID, timestamps, etc.) to a different endpoint, specifically:
Could you please guide me on how to achieve this?
Is there a separate configuration or webhook event I should subscribe to in order to receive the transcript and metadata at the end of a call?
This is my code look like
from vapi_python.vapi_python import Vapi
vapi_api_key = os.getenv("VAPI_PRIVATE_API_KEY")
vapi = Vapi(api_key=vapi_api_key)
def start_vapi_assistant(payload, system_prompt):
assistant_config = {
"firstMessage": payload.firstMessage or "Hey, are we good to start the interview?",
"model": {
"provider": "openai",
"model": "gpt-4.1-nano",
"systemPrompt": system_prompt,
"tools": [
{ "type": "endCall" }
],
},
"voice": {
"provider": "vapi",
"voiceId": "Neha",
},
"recordingEnabled": True,
"interruptionsEnabled": False,
"serverUrl": "https://dev.xxxxx.com/call/webhook",
}
response = requests.post(
"https://api.vapi.ai/assistant",
headers={
"Authorization": f"Bearer {vapi_api_key}",
"Content-Type": "application/json"
},
json=assistant_config
)
response.raise_for_status()
return response.json().get("id")
def fetch_call_details(call_id: str):
url = f"https://api.vapi.ai/call/{call_id}"
headers = {
"Authorization": f"Bearer {vapi_api_key}"
}
response = requests.get(url, headers=headers)
return response.json()