conversation.transferred

The conversation transferred webhook is triggered when a call is successfully transferred to a phone number.

Webhook payload

Here is an example of the POST request JSON payload:

{
"event_type": "conversation.transferred",
"data": {
"conversation": {
"id": "conv_894dcb66-c3dd-4160-8606-30387e8ab9b5",
"items": [
{
"role": "assistant",
"text": "Let me transfer you now."
},
{
"role": "user",
"text": "Thanks!"
}
]
},
"transferred_to": "+15551234567",
"call_info": {
"from_phone_number": "+6461234567",
"to_phone_number": "+14151234567"
}
},
"created_at": "2025-07-14T11:36:33.767Z"
}

Payload fields

event_type
stringRequired

Always "conversation.transferred"

created_at
stringRequired

ISO 8601 timestamp of when the event was created

data.conversation.id
stringRequired

Unique conversation identifier

data.conversation.items
ConversationItem[]Required

Array of conversation turns. See the Get Conversation endpoint for the full ConversationItem type.

data.transferred_to
stringRequired

The phone number the call was transferred to, in E.164 format

data.call_info
CallInfo | null

Phone call metadata (present for telephony conversations, null for web). Contains from_phone_number, to_phone_number, and optionally twilio_call_sid.

Example usage

Here’s an example of how to handle the webhook:

import { Hono } from "hono";
import { Webhook } from "svix";
const app = new Hono();
app.post("/webhooks/phonic", async (c) => {
if (!process.env.PHONIC_WEBHOOK_SECRET) {
return c.text("Bad Request", 400);
}
const wh = new Webhook(process.env.PHONIC_WEBHOOK_SECRET);
const rawBody = await c.req.text();
try {
const payload = wh.verify(rawBody, {
"svix-id": c.req.header("svix-id") ?? "",
"svix-timestamp": c.req.header("svix-timestamp") ?? "",
"svix-signature": c.req.header("svix-signature") ?? "",
}) as ConversationTransferredWebhookPayload;
const { conversation, transferred_to } = payload.data;
console.log(`Conversation ${conversation.id} transferred to ${transferred_to}`);
return c.text("OK", 200);
} catch (error) {
console.error("Failed to verify webhook:", error);
return c.text("Bad Request", 400);
}
});
export default app;