Skip to main content
GET
/
api
/
v1
/
providers
/
twilio
/
{id}
/
available-numbers
List available phone numbers
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://blackbox.dasha.ai/api/v1/providers/twilio/{id}/available-numbers', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
[
  {
    "sid": "<string>",
    "phoneNumber": "<string>",
    "friendlyName": "<string>",
    "imported": true
  }
]

Phone Number Discovery

This endpoint connects to your Twilio account and retrieves all incoming phone numbers.

Response Fields

Each phone number includes:
FieldDescription
sidTwilio Phone Number SID (used for import)
phoneNumberE.164 formatted phone number
friendlyNameHuman-readable name set in Twilio
importedWhether the number has already been imported

Import Workflow

  1. Call this endpoint to see available numbers
  2. Note the sid values of numbers you want to import
  3. Use the /import-numbers endpoint with those SIDs

Already Imported Numbers

Numbers marked with imported: true are already in your system and linked to this provider. Attempting to import them again will result in a duplicate error.

Path Parameters

id
string<uuid>
required

Provider identifier

Response

Returns available phone numbers with import status

sid
string | null
required

Twilio Phone Number SID. Unique identifier for the phone number in Twilio. Format: PN[a-f0-9]{32} (e.g., PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx).

phoneNumber
string | null
required

Phone number in E.164 format (e.g., +14155551234). The actual dialable phone number.

friendlyName
string | null
required

Human-readable name for the phone number from Twilio. May include formatting or descriptive text.

imported
boolean

Whether this phone number has already been imported into the system. True if imported, false if available for import.