fivecaps
08/29/2025, 5:31 AMAI Evy
08/29/2025, 5:31 AMAI Evy
08/29/2025, 5:31 AMinbound_webhook_url parameter [(1) ]() [(3) ]() :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.create({
inbound_webhook_url: "<https://example.com/inbound-webhook%22>
}) ;
[(1) ]()
For inbound calls, the webhook will POST to your endpoint with call information [(4) ]() . Your endpoint should handle the request and return a JSON response with a 2xx status code .
If webhooks only work for testing but not for actual calls, this could be because you need to set the webhook at the phone number level specifically for inbound calls to work [(5) ]() . The webhook configuration differs between inbound and outbound calls .
Check out these potentially useful sources: [Setup guide]() , [Inbound call webhook]() , [Create Phone Number]()AI Evy
08/29/2025, 5:31 AMAI Evy
08/29/2025, 5:31 AMfivecaps
08/29/2025, 5:32 AMAI Evy
08/29/2025, 5:32 AMAI Evy
08/29/2025, 5:33 AMjavascript
const registerCallResponse = await retell.call.createPhoneCall({
from_number: '+14157774444', // replace with the number you purchased
to_number: '+12137774445', // replace with the number you want to call
retell_llm_dynamic_variables: { // replace with the dynamic variables you want to send (optional)
name: 'John Doe',
blood_group: 'B+'
},
custom_sip_headers: { // replace with custom sip headers you want to send (optional)
X-Custom-Header: 'Custom Value'
}
}) ;
For outbound calls, you can also receive webhook data through call webhooks that send real-time updates when calls are initiated, end, and analyzed . You can set up webhooks to receive information like transcript, recording, latency tracking, etc.
Additionally, you can use the Get Call API to retrieve call information after the call ends .AI Evy
08/29/2025, 5:33 AMAI Evy
08/29/2025, 5:33 AMfivecaps
08/29/2025, 7:07 PMAI Evy
08/29/2025, 7:07 PMAI Evy
08/29/2025, 7:07 PMAI Evy
08/29/2025, 7:07 PMAI Evy
08/29/2025, 7:07 PM