Purchase a phone-number for the account.
POST
/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json https://api.twilio.com
Purchase a phone-number for the account.
Parameters
path Path Parameters
| Name | Type |
|---|---|
AccountSid
required
The SID of the Account that will create the resource. | `AC${string}` |
Request Body
application/x-www-form-urlencoded
{
ApiVersion?: string;
FriendlyName?: string;
SmsApplicationSid?: `AP${string}`;
SmsFallbackMethod?: "GET" | "POST";
SmsFallbackUrl?: string;
SmsMethod?: "GET" | "POST";
SmsUrl?: string;
StatusCallback?: string;
StatusCallbackMethod?: "GET" | "POST";
VoiceApplicationSid?: `AP${string}`;
VoiceCallerIdLookup?: boolean;
VoiceFallbackMethod?: "GET" | "POST";
VoiceFallbackUrl?: string;
VoiceMethod?: "GET" | "POST";
VoiceUrl?: string;
EmergencyStatus?:IncomingPhoneNumberEnumEmergencyStatus ;
EmergencyAddressSid?: `AD${string}`;
TrunkSid?: `TK${string}`;
IdentitySid?: `RI${string}`;
AddressSid?: `AD${string}`;
VoiceReceiveMode?:IncomingPhoneNumberEnumVoiceReceiveMode ;
BundleSid?: `BU${string}`;
PhoneNumber?: string;
AreaCode?: string;
}
ApiVersion?: string;
FriendlyName?: string;
SmsApplicationSid?: `AP${string}`;
SmsFallbackMethod?: "GET" | "POST";
SmsFallbackUrl?: string;
SmsMethod?: "GET" | "POST";
SmsUrl?: string;
StatusCallback?: string;
StatusCallbackMethod?: "GET" | "POST";
VoiceApplicationSid?: `AP${string}`;
VoiceCallerIdLookup?: boolean;
VoiceFallbackMethod?: "GET" | "POST";
VoiceFallbackUrl?: string;
VoiceMethod?: "GET" | "POST";
VoiceUrl?: string;
EmergencyStatus?:
EmergencyAddressSid?: `AD${string}`;
TrunkSid?: `TK${string}`;
IdentitySid?: `RI${string}`;
AddressSid?: `AD${string}`;
VoiceReceiveMode?:
BundleSid?: `BU${string}`;
PhoneNumber?: string;
AreaCode?: string;
}
Responses
201 application/json
Created
interface ApiV2010AccountIncomingPhoneNumber {
account_sid?: `AC${string}` | null;
address_sid?: `AD${string}` | null;
address_requirements?:IncomingPhoneNumberEnumAddressRequirement ;
api_version?: string | null;
beta?: boolean | null;
capabilities?: {
mms?: boolean;
sms?: boolean;
voice?: boolean;
fax?: boolean;
} | null;
date_created?: string | null;
date_updated?: string | null;
friendly_name?: string | null;
identity_sid?: `RI${string}` | null;
phone_number?: string | null;
origin?: string | null;
sid?: `PN${string}` | null;
sms_application_sid?: `AP${string}` | null;
sms_fallback_method?: "GET" | "POST" | null;
sms_fallback_url?: string | null;
sms_method?: "GET" | "POST" | null;
sms_url?: string | null;
status_callback?: string | null;
status_callback_method?: "GET" | "POST" | null;
trunk_sid?: `TK${string}` | null;
uri?: string | null;
voice_receive_mode?:IncomingPhoneNumberEnumVoiceReceiveMode ;
voice_application_sid?: `AP${string}` | null;
voice_caller_id_lookup?: boolean | null;
voice_fallback_method?: "GET" | "POST" | null;
voice_fallback_url?: string | null;
voice_method?: "GET" | "POST" | null;
voice_url?: string | null;
emergency_status?:IncomingPhoneNumberEnumEmergencyStatus ;
emergency_address_sid?: `AD${string}` | null;
emergency_address_status?:IncomingPhoneNumberEnumEmergencyAddressStatus ;
bundle_sid?: `BU${string}` | null;
status?: string | null;
}
account_sid?: `AC${string}` | null;
address_sid?: `AD${string}` | null;
address_requirements?:
api_version?: string | null;
beta?: boolean | null;
capabilities?: {
mms?: boolean;
sms?: boolean;
voice?: boolean;
fax?: boolean;
} | null;
date_created?: string | null;
date_updated?: string | null;
friendly_name?: string | null;
identity_sid?: `RI${string}` | null;
phone_number?: string | null;
origin?: string | null;
sid?: `PN${string}` | null;
sms_application_sid?: `AP${string}` | null;
sms_fallback_method?: "GET" | "POST" | null;
sms_fallback_url?: string | null;
sms_method?: "GET" | "POST" | null;
sms_url?: string | null;
status_callback?: string | null;
status_callback_method?: "GET" | "POST" | null;
trunk_sid?: `TK${string}` | null;
uri?: string | null;
voice_receive_mode?:
voice_application_sid?: `AP${string}` | null;
voice_caller_id_lookup?: boolean | null;
voice_fallback_method?: "GET" | "POST" | null;
voice_fallback_url?: string | null;
voice_method?: "GET" | "POST" | null;
voice_url?: string | null;
emergency_status?:
emergency_address_sid?: `AD${string}` | null;
emergency_address_status?:
bundle_sid?: `BU${string}` | null;
status?: string | null;
}