GET
/
list-phone-numbers
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
});

async function main() {
  const phoneNumberResponses = await client.phoneNumber.list();

  console.log(phoneNumberResponses);
}

main();
[
  {
    "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",
    "last_modification_timestamp": 1703413636133
  }
]

Authorizations

Authorization
string
header
required

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Response

200
application/json

Successfully retrieved all phone numbers.

The response is of type object[].