2026/10/02 - Amazon Pinpoint SMS Voice V2 - 1 updated api methods
Changes AWS End User Messaging SMS CarrierLookup API now supports phone number cleansing on customer opt-in. when selected, the response includes the additional field "OriginalPhoneNumber". It can also return additional PhoneNumberType enums, VOIP and PREPAID.
{'EnableCleansing': 'boolean'}
Response {'OriginalPhoneNumber': 'string', 'PhoneNumberType': {'PREPAID', 'VOIP'}}
Returns information about a destination phone number, including whether the number type and whether it is valid, the carrier, and more.
See also: AWS API Documentation
Request Syntax
client.carrier_lookup(
PhoneNumber='string',
EnableCleansing=True|False
)
string
[REQUIRED]
The phone number that you want to retrieve information about. You can provide the phone number in various formats including special characters such as parentheses, brackets, spaces, hyphens, periods, and commas. The service automatically converts the input to E164 format for processing.
boolean
Specifies whether the service cleanses the phone number that you provide. When set to true, the service normalizes the phone number according to the destination country's national numbering plan and dialing rules. The service returns the cleansed number in E.164 format in the E164PhoneNumber field and returns the number that you provided in the OriginalPhoneNumber field.
dict
Response Syntax
{
'E164PhoneNumber': 'string',
'DialingCountryCode': 'string',
'IsoCountryCode': 'string',
'Country': 'string',
'MCC': 'string',
'MNC': 'string',
'Carrier': 'string',
'PhoneNumberType': 'MOBILE'|'LANDLINE'|'VOIP'|'PREPAID'|'OTHER'|'INVALID',
'OriginalPhoneNumber': 'string'
}
Response Structure
(dict) --
E164PhoneNumber (string) --
The phone number in E164 format, sanitized from the original input by removing any formatting characters.
DialingCountryCode (string) --
The country or region numeric dialing code for the phone number.
IsoCountryCode (string) --
The two-character country or region code, in ISO 3166-1 alpha-2 format, for the phone number.
Country (string) --
The name of the country or region for the phone number.
MCC (string) --
The phone number's mobile country code, for mobile phone number types
MNC (string) --
The phone number's mobile network code, for mobile phone number types.
Carrier (string) --
The carrier or service provider that the phone number is currently registered with. In some countries and regions, this value may be the carrier or service provider that the phone number was originally registered with.
PhoneNumberType (string) --
Describes the type of phone number. Valid values are: MOBILE, LANDLINE, VOIP, PREPAID, OTHER, and INVALID. Avoid sending SMS or voice messages to INVALID phone numbers, as these numbers are unlikely to belong to actual recipients.
OriginalPhoneNumber (string) --
The phone number exactly as you supplied it in the request. This field is returned only when you set EnableCleansing to true, the phone number was cleansed, and a normalized E.164 phone number was returned in the E164PhoneNumber field.