Update agent bound to a purchased phone number
patch/update-phone-number/{phone_number}
Path parameters
phone_numberstring required
Example:+14157774444
E.164 format of the number (+country code, then number with no space, no special characters), used as the unique identifier for phone number APIs.
Request body
Example request
{
"inbound_agents": [
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"weight": 0.5
}
],
"outbound_agents": [
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"weight": 0.5
}
],
"inbound_sms_agents": [
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"weight": 0.5
}
],
"outbound_sms_agents": [
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"weight": 0.5
}
],
"nickname": "Frontdesk Number",
"inbound_webhook_url": "https://example.com/inbound-webhook",
"inbound_sms_webhook_url": "https://example.com/inbound-sms-webhook",
"allowed_inbound_country_list": [
"US",
"CA",
"GB"
],
"allowed_outbound_country_list": [
"US",
"CA"
],
"termination_uri": "someuri.pstn.twilio.com",
"auth_username": "username",
"auth_password": "123456",
"transport": "TCP",
"fallback_number": "+14155551234"
}Response
Successfully updated an phone number object.
Example response
{
"phone_number": "+14157774444",
"phone_number_type": "retell-twilio",
"phone_number_pretty": "+1 (415) 777-4444",
"allowed_inbound_country_list": [
"US",
"CA",
"GB"
],
"allowed_outbound_country_list": [
"US",
"CA"
],
"area_code": 415,
"inbound_agents": [
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"weight": 0.5
}
],
"outbound_agents": [
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"weight": 0.5
}
],
"inbound_sms_agents": [
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"weight": 0.5
}
],
"outbound_sms_agents": [
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"weight": 0.5
}
],
"nickname": "Frontdesk Number",
"inbound_webhook_url": "https://example.com/inbound-webhook",
"inbound_sms_webhook_url": "https://example.com/inbound-sms-webhook",
"last_modification_timestamp": 1703413636133,
"sip_outbound_trunk_config": {
"termination_uri": "someuri.pstn.twilio.com",
"auth_username": "username",
"transport": "TCP"
},
"fallback_number": "+14155551234"
}