Skip to main content
POST
Import Twilio Phone Number

Authorizations

Authorization
string
header
required

Specify the authorization token.

For more information, check out the Authorization Guide.

Body

The data required to import a phone number of your own Twilio account: the credentials of that account and the number to import.

accountSid
string
required

The Account SID of your Twilio account (starts with AC).

Minimum string length: 1
authToken
string
required

The Auth Token of your Twilio account, or the API Key Secret when apiKeySid is provided. The credentials must have full access: a Restricted API Key is rejected.

Minimum string length: 1
number
string
required

The phone number to import, in E.164 format (for example +14155550123), as returned when listing the numbers of the Twilio account.

Minimum string length: 1
apiKeySid
string | null

Optional SID of a Standard API Key of your Twilio account (starts with SK). Leave it empty to authenticate with the Auth Token.

Response

The imported phone number.

A phone number of the account as exposed by the API. For custom VoIP numbers it also carries the configured inbound and/or outbound SIP setup (passwords are never returned).

id
string | null

The unique identifier of the phone number.

number
string | null

The phone number, in E.164 format (a custom VoIP number is returned as it was entered).

displayName
string | null

The display name of the phone number. Falls back to the raw number when no display name is set.

direction
integer<int32>

Phone number direction (supported call capabilities).

  • InboundOutbound: Supports both inbound and outbound calls.
  • Inbound: Supports inbound calls only.
  • Outbound: Supports outbound calls only.
  • NotSet: Direction is not set.

1 - InboundOutbound

2 - Inbound

3 - Outbound

10 - NotSet

type
integer<int32>

Indicates how the phone number is provisioned and connected to NLPearl.

  • NLPearlDefault: a shared default number provided by NLPearl.
  • NLPearl: a number purchased and managed for you by NLPearl.
  • Twilio: a number from your own Twilio account that you connected.
  • CustomVoip: a custom VoIP number you connect over SIP.
  • Undefined: the type could not be determined.

1 - NLPearlDefault

2 - NLPearl

3 - Twilio

4 - CustomVoip

99 - Undefined

sipConfig
object | null

The inbound SIP configuration. Present only for custom VoIP numbers that have inbound configured; passwords are never returned.

sipTrunkConfig
object | null

The outbound SIP trunk configuration. Present only for custom VoIP numbers that have outbound configured; passwords are never returned.