zaigab
10/08/2025, 4:20 PMAI Evy
10/08/2025, 4:20 PMAI Evy
10/08/2025, 4:20 PMAI Evy
10/08/2025, 4:20 PMAI Evy
10/08/2025, 4:20 PMzaigab
10/08/2025, 4:21 PMzaigab
10/08/2025, 4:22 PMAI Evy
10/08/2025, 4:22 PMAI Evy
10/08/2025, 4:22 PMinbound_webhook_url when creating or updating your phone number [(2) ]() [(3) ]() :
javascript
const phoneNumberResponse = await client.phoneNumber.create({
inbound_webhook_url: "<https://example.com/inbound-webhook%22>
}) ;
[(3) ]()
2. Your CRM endpoint will receive a POST request with this payload structure [(1) ]() :
json
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
3. Your CRM can respond to override agent settings or set dynamic variables for that specific call :
json
{
"call_inbound": {
"override_agent_id": "agent_12345",
"override_agent_version": 1,
"dynamic_variables": {
"customer_name": "John Doe"
},
"metadata": {
"random_id": "12345"
}
}
}
The webhook has a 10-second timeout and will retry up to 3 times if no success status is received . This allows your CRM to identify callers using the from_number field and process calls with relevant customer context .AI Evy
10/08/2025, 4:22 PMAI Evy
10/08/2025, 4:22 PMzaigab
10/08/2025, 4:23 PMzaigab
10/08/2025, 4:23 PMAI Evy
10/08/2025, 4:23 PMAI Evy
10/08/2025, 4:23 PMjavascript
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) ]()
The phone number configuration includes the inbound_webhook_url field [(3) ]() [(4) ]() :
json
{
"phone_number": "+14157774444",
"phone_number_type": "retell-twilio",
"phone_number_pretty": "+1 (415) 777-4444",
"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,>
"last_modification_timestamp": 1703413636133
}AI Evy
10/08/2025, 4:23 PMAI Evy
10/08/2025, 4:23 PMAI Evy
10/08/2025, 4:23 PM