correct-apricot•5h ago
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()
{ "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()
1 Reply
Hi there,
Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST).
We’ll get back to you as soon as possible during our normal business hours.
If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly.
Warm regards,
Vapi
Customer Support Team
Vapi
Customer Support Team