fiery_papaya_33507
10/20/2025, 2:17 PMAI Evy
10/20/2025, 2:17 PMAI Evy
10/20/2025, 2:17 PMinbound_webhook_url parameter that can be configured for phone numbers [(1) ]() [(2) ]() .
You can set this URL when creating or updating a phone number. Here's how to configure it:
When creating a phone number:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.create() ;
[(2) ]()
When updating an existing phone number:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
nickname: 'Frontdesk Number',
outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
[(1) ]()
The inbound_webhook_url field allows you to send a webhook for inbound calls, where you can override agent id, set dynamic variables and other fields specific to that call [(3) ]() [(2) ]() . This URL would be included in the request body when creating or updating phone numbers.AI Evy
10/20/2025, 2:17 PMAI Evy
10/20/2025, 2:17 PMfiery_papaya_33507
10/20/2025, 2:20 PMAI Evy
10/20/2025, 2:20 PMAI Evy
10/20/2025, 2:20 PMinbound_webhook_url when configuring your phone number [(2) ]() . This URL should point to your server endpoint that can handle the webhook payload [(1) ]() .
The webhook will send a POST request to your endpoint with a payload containing information like agent_id, from_number, and to_number . Your endpoint needs to respond with a JSON response containing fields like override_agent_id, dynamic_variables, or metadata if you want to customize the call handling .
If you don't have a webhook endpoint set up yet, you'll need to create one on your server infrastructure before you can configure the inbound webhook URL in Retell AI.AI Evy
10/20/2025, 2:20 PMAI Evy
10/20/2025, 2:20 PMfiery_papaya_33507
10/20/2025, 2:34 PMAI Evy
10/20/2025, 2:34 PMAI Evy
10/20/2025, 2:34 PMinbound_webhook_url is something you provide to Retell AI, not something you retrieve from the platform [(1) ]() [(2) ]() .
Here's how you can view and manage the inbound webhook URL for your phone numbers:
To view an existing phone number's webhook URL:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.retrieve('+14157774444') ;
console.log(phoneNumberResponse.inbound_agent_id) ;
[(3) ]()
To set or update the inbound webhook URL:
javascript
{
"phone_number": "+14157774444",
"termination_uri": "someuri.pstn.twilio.com",
"sip_trunk_auth_username": "username",
"sip_trunk_auth_password": "123456",
"inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"inbound_agent_version": 1,
"outbound_agent_version": 1,
"area_code": 415,
"nickname": "Frontdesk Number",
"inbound_webhook_url": "<https://example.com/inbound-webhook%22>
}AI Evy
10/20/2025, 2:34 PMinbound_webhook_url field allows you to send a webhook for inbound calls, where you can override agent id, set dynamic variables and other fields specific to that call [(1) ]() [(2) ]() . You need to provide your own webhook endpoint URL that Retell AI will POST to when inbound calls are received.
In the dashboard, you can navigate to the Phone Numbers section and configure the inbound webhook URL in the phone number settings [(4) ]() .AI Evy
10/20/2025, 2:35 PMAI Evy
10/20/2025, 2:35 PM