2025/08/20 - Amazon Pinpoint SMS Voice V2 - 3 updated api methods
Changes This change added InternationalSendingEnbaled as part of describe/Update/Request phone number API response, and as part of update/Request phone number API request
{'PhoneNumbers': {'InternationalSendingEnabled': 'boolean'}}
Describes the specified origination phone number, or all the phone numbers in your account.
If you specify phone number IDs, the output includes information for only the specified phone numbers. If you specify filters, the output includes information for only those phone numbers that meet the filter criteria. If you don't specify phone number IDs or filters, the output includes information for all phone numbers.
If you specify a phone number ID that isn't valid, an error is returned.
See also: AWS API Documentation
Request Syntax
client.describe_phone_numbers( PhoneNumberIds=[ 'string', ], Filters=[ { 'Name': 'status'|'iso-country-code'|'message-type'|'number-capability'|'number-type'|'two-way-enabled'|'self-managed-opt-outs-enabled'|'opt-out-list-name'|'deletion-protection-enabled'|'two-way-channel-arn', 'Values': [ 'string', ] }, ], NextToken='string', MaxResults=123, Owner='SELF'|'SHARED' )
list
The unique identifier of phone numbers to find information about. This is an array of strings that can be either the PhoneNumberId or PhoneNumberArn.
(string) --
list
An array of PhoneNumberFilter objects to filter the results.
(dict) --
The information for a phone number that meets a specified criteria.
Name (string) -- [REQUIRED]
The name of the attribute to filter on.
Values (list) -- [REQUIRED]
An array values to filter for.
(string) --
string
The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.
integer
The maximum number of results to return per each request.
string
Use SELF to filter the list of phone numbers to ones your account owns or use SHARED to filter on phone numbers shared with your account. The Owner and PhoneNumberIds parameters can't be used at the same time.
dict
Response Syntax
{ 'PhoneNumbers': [ { 'PhoneNumberArn': 'string', 'PhoneNumberId': 'string', 'PhoneNumber': 'string', 'Status': 'PENDING'|'ACTIVE'|'ASSOCIATING'|'DISASSOCIATING'|'DELETED', 'IsoCountryCode': 'string', 'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL', 'NumberCapabilities': [ 'SMS'|'VOICE'|'MMS', ], 'NumberType': 'SHORT_CODE'|'LONG_CODE'|'TOLL_FREE'|'TEN_DLC'|'SIMULATOR', 'MonthlyLeasingPrice': 'string', 'TwoWayEnabled': True|False, 'TwoWayChannelArn': 'string', 'TwoWayChannelRole': 'string', 'SelfManagedOptOutsEnabled': True|False, 'OptOutListName': 'string', 'InternationalSendingEnabled': True|False, 'DeletionProtectionEnabled': True|False, 'PoolId': 'string', 'RegistrationId': 'string', 'CreatedTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
PhoneNumbers (list) --
An array of PhoneNumberInformation objects that contain the details for the requested phone numbers.
(dict) --
The information for a phone number, in E.164 format, in an Amazon Web Services account.
PhoneNumberArn (string) --
The Amazon Resource Name (ARN) associated with the phone number.
PhoneNumberId (string) --
The unique identifier for the phone number.
PhoneNumber (string) --
The phone number in E.164 format.
Status (string) --
The current status of the phone number.
IsoCountryCode (string) --
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
MessageType (string) --
The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
NumberCapabilities (list) --
Describes if the origination identity can be used for text messages, voice calls or both.
(string) --
NumberType (string) --
The type of phone number.
MonthlyLeasingPrice (string) --
The price, in US dollars, to lease the phone number.
TwoWayEnabled (boolean) --
By default this is set to false. When set to true you can receive incoming text messages from your end recipients using the TwoWayChannelArn.
TwoWayChannelArn (string) --
The Amazon Resource Name (ARN) of the two way channel.
TwoWayChannelRole (string) --
An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
SelfManagedOptOutsEnabled (boolean) --
When set to false an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out request. For more information see Self-managed opt-outs
OptOutListName (string) --
The name of the OptOutList associated with the phone number.
InternationalSendingEnabled (boolean) --
When set to true the international sending of phone number is Enabled.
DeletionProtectionEnabled (boolean) --
When set to true the phone number can't be deleted.
PoolId (string) --
The unique identifier of the pool associated with the phone number.
RegistrationId (string) --
The unique identifier for the registration.
CreatedTimestamp (datetime) --
The time when the phone number was created, in UNIX epoch time format.
NextToken (string) --
The token to be used for the next set of paginated results. If this field is empty then there are no more results.
{'InternationalSendingEnabled': 'boolean'}
Request an origination phone number for use in your account. For more information on phone number request see Request a phone number in the AWS End User Messaging SMS User Guide.
See also: AWS API Documentation
Request Syntax
client.request_phone_number( IsoCountryCode='string', MessageType='TRANSACTIONAL'|'PROMOTIONAL', NumberCapabilities=[ 'SMS'|'VOICE'|'MMS', ], NumberType='LONG_CODE'|'TOLL_FREE'|'TEN_DLC'|'SIMULATOR', OptOutListName='string', PoolId='string', RegistrationId='string', InternationalSendingEnabled=True|False, DeletionProtectionEnabled=True|False, Tags=[ { 'Key': 'string', 'Value': 'string' }, ], ClientToken='string' )
string
[REQUIRED]
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
string
[REQUIRED]
The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
list
[REQUIRED]
Indicates if the phone number will be used for text messages, voice messages, or both.
(string) --
string
[REQUIRED]
The type of phone number to request.
When you request a SIMULATOR phone number, you must set MessageType as TRANSACTIONAL.
string
The name of the OptOutList to associate with the phone number. You can use the OptOutListName or OptOutListArn.
string
The pool to associated with the phone number. You can use the PoolId or PoolArn.
string
Use this field to attach your phone number for an external registration process.
boolean
By default this is set to false. When set to true the international sending of phone number is Enabled.
boolean
By default this is set to false. When set to true the phone number can't be deleted.
list
An array of tags (key and value pairs) associate with the requested phone number.
(dict) --
The list of tags to be added to the specified topic.
Key (string) -- [REQUIRED]
The key identifier, or name, of the tag.
Value (string) -- [REQUIRED]
The string value associated with the key of the tag.
string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'PhoneNumberArn': 'string', 'PhoneNumberId': 'string', 'PhoneNumber': 'string', 'Status': 'PENDING'|'ACTIVE'|'ASSOCIATING'|'DISASSOCIATING'|'DELETED', 'IsoCountryCode': 'string', 'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL', 'NumberCapabilities': [ 'SMS'|'VOICE'|'MMS', ], 'NumberType': 'LONG_CODE'|'TOLL_FREE'|'TEN_DLC'|'SIMULATOR', 'MonthlyLeasingPrice': 'string', 'TwoWayEnabled': True|False, 'TwoWayChannelArn': 'string', 'TwoWayChannelRole': 'string', 'SelfManagedOptOutsEnabled': True|False, 'OptOutListName': 'string', 'InternationalSendingEnabled': True|False, 'DeletionProtectionEnabled': True|False, 'PoolId': 'string', 'RegistrationId': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'CreatedTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
PhoneNumberArn (string) --
The Amazon Resource Name (ARN) of the requested phone number.
PhoneNumberId (string) --
The unique identifier of the new phone number.
PhoneNumber (string) --
The new phone number that was requested.
Status (string) --
The current status of the request.
IsoCountryCode (string) --
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
MessageType (string) --
The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
NumberCapabilities (list) --
Indicates if the phone number will be used for text messages, voice messages or both.
(string) --
NumberType (string) --
The type of number that was released.
MonthlyLeasingPrice (string) --
The monthly price, in US dollars, to lease the phone number.
TwoWayEnabled (boolean) --
By default this is set to false. When set to true you can receive incoming text messages from your end recipients.
TwoWayChannelArn (string) --
The ARN used to identify the two way channel.
TwoWayChannelRole (string) --
An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
SelfManagedOptOutsEnabled (boolean) --
By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.
OptOutListName (string) --
The name of the OptOutList that is associated with the requested phone number.
InternationalSendingEnabled (boolean) --
By default this is set to false. When set to true the international sending of phone number is Enabled.
DeletionProtectionEnabled (boolean) --
By default this is set to false. When set to true the phone number can't be deleted.
PoolId (string) --
The unique identifier of the pool associated with the phone number
RegistrationId (string) --
The unique identifier for the registration.
Tags (list) --
An array of key and value pair tags that are associated with the phone number.
(dict) --
The list of tags to be added to the specified topic.
Key (string) --
The key identifier, or name, of the tag.
Value (string) --
The string value associated with the key of the tag.
CreatedTimestamp (datetime) --
The time when the phone number was created, in UNIX epoch time format.
{'InternationalSendingEnabled': 'boolean'}
Updates the configuration of an existing origination phone number. You can update the opt-out list, enable or disable two-way messaging, change the TwoWayChannelArn, enable or disable self-managed opt-outs, and enable or disable deletion protection.
If the origination phone number is associated with a pool, an error is returned.
See also: AWS API Documentation
Request Syntax
client.update_phone_number( PhoneNumberId='string', TwoWayEnabled=True|False, TwoWayChannelArn='string', TwoWayChannelRole='string', SelfManagedOptOutsEnabled=True|False, OptOutListName='string', InternationalSendingEnabled=True|False, DeletionProtectionEnabled=True|False )
string
[REQUIRED]
The unique identifier of the phone number. Valid values for this field can be either the PhoneNumberId or PhoneNumberArn.
boolean
By default this is set to false. When set to true you can receive incoming text messages from your end recipients.
string
The Amazon Resource Name (ARN) of the two way channel.
string
An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
boolean
By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.
string
The OptOutList to add the phone number to. Valid values for this field can be either the OutOutListName or OutOutListArn.
boolean
By default this is set to false. When set to true the international sending of phone number is Enabled.
boolean
By default this is set to false. When set to true the phone number can't be deleted.
dict
Response Syntax
{ 'PhoneNumberArn': 'string', 'PhoneNumberId': 'string', 'PhoneNumber': 'string', 'Status': 'PENDING'|'ACTIVE'|'ASSOCIATING'|'DISASSOCIATING'|'DELETED', 'IsoCountryCode': 'string', 'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL', 'NumberCapabilities': [ 'SMS'|'VOICE'|'MMS', ], 'NumberType': 'SHORT_CODE'|'LONG_CODE'|'TOLL_FREE'|'TEN_DLC'|'SIMULATOR', 'MonthlyLeasingPrice': 'string', 'TwoWayEnabled': True|False, 'TwoWayChannelArn': 'string', 'TwoWayChannelRole': 'string', 'SelfManagedOptOutsEnabled': True|False, 'OptOutListName': 'string', 'InternationalSendingEnabled': True|False, 'DeletionProtectionEnabled': True|False, 'RegistrationId': 'string', 'CreatedTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
PhoneNumberArn (string) --
The Amazon Resource Name (ARN) of the updated phone number.
PhoneNumberId (string) --
The unique identifier of the phone number.
PhoneNumber (string) --
The phone number that was updated.
Status (string) --
The current status of the request.
IsoCountryCode (string) --
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
MessageType (string) --
The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
NumberCapabilities (list) --
Specifies if the number could be used for text messages, voice or both.
(string) --
NumberType (string) --
The type of number that was requested.
MonthlyLeasingPrice (string) --
The monthly leasing price of the phone number, in US dollars.
TwoWayEnabled (boolean) --
By default this is set to false. When set to true you can receive incoming text messages from your end recipients.
TwoWayChannelArn (string) --
The Amazon Resource Name (ARN) of the two way channel.
TwoWayChannelRole (string) --
An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
SelfManagedOptOutsEnabled (boolean) --
This is true if self managed opt-out are enabled.
OptOutListName (string) --
The name of the OptOutList associated with the phone number.
InternationalSendingEnabled (boolean) --
When set to true the international sending of phone number is Enabled.
DeletionProtectionEnabled (boolean) --
When set to true the phone number can't be deleted.
RegistrationId (string) --
The unique identifier for the registration.
CreatedTimestamp (datetime) --
The time when the phone number was created, in UNIX epoch time format.