Menu
Amazon Pinpoint
REST API Reference

Phone Number Verify

Note

Phone number verification is an Amazon Pinpoint feature that's currently offered as a public preview. Before you use Amazon Pinpoint to verify phone numbers, apply to participate in the preview.

Use this resource to verify whether a phone number is a valid destination for SMS messages. This resource accepts a POST request that provides a phone number in the request body. It responds with data about the phone number that Amazon Pinpoint obtains from wireless carriers. This data indicates whether the number is valid and assigned to a mobile phone. It also includes information such as the carrier that the number is registered with and the location where the number was originally registered.

URI

/v1/phone/number/verify

HTTP Methods

POST

Body

Name Required Type

PhoneNumberVerifyRequest

true

PhoneNumberVerifyRequest

Header

Name Required Type

accept

false

string

Response

Status Code Schema

200

PhoneNumberVerifyResponse

Errors

Errors

Status Code Schema Error Type

400

MessageBody

BadRequestException

403

MessageBody

ForbiddenException

404

MessageBody

NotFoundException

405

MessageBody

MethodNotAllowedException

429

MessageBody

TooManyRequestsException

500

MessageBody

InternalServerErrorException

Schemas

Request Schemas

Example PhoneNumberVerifyRequest

{ "PhoneNumber": "string", "IsoCountryCode": "string" }

Response Schemas

Example PhoneNumberVerifyResponse

{ "CountryCodeIso2": "string", "CountryCodeNumeric": "string", "CountryName": "string", "City": "string", "Zip": "string", "County": "string", "Timezone": "string", "CleansedPhoneNumberNational": "string", "CleansedPhoneNumberE164": "string", "CarrierName": "string", "PhoneTypeCode": 0, "PhoneType": "string", "OriginalPhoneNumber": "string", "OriginalCountryCodeIso2": "string" }

Example MessageBody

{ "RequestID": "string", "Message": "string" }

Attributes

PhoneNumberVerifyRequest

Attribute Type Description

IsoCountryCode

string

(Optional) The two-character ISO country code for the country where the phone number was originally registered.

PhoneNumber

string

The phone number to get information about.

PhoneNumberVerifyResponse

Attribute Type Description

CarrierName

string

The carrier that the phone number is registered with.

City

string

The city where the phone number was originally registered.

CleansedPhoneNumberE164

string

The cleansed (standardized) phone number in E.164 format.

CleansedPhoneNumberNational

string

The cleansed phone number in national format.

CountryCodeIso2

string

The two-character ISO country code for the country where the phone number was originally registered.

CountryCodeNumeric

string

The numeric country code for the country where the phone number was originally registered.

CountryName

string

The country where the phone number was originally registered.

County

string

The county where the phone number was originally registered.

OriginalCountryCodeIso2

string

The two-character ISO country code that was included in the request body.

OriginalPhoneNumber

string

The phone number that you included in the request body.

PhoneType

string

A description of the phone type. Possible values include MOBILE, LANDLINE, VOIP, INVALID, and OTHER.

PhoneTypeCode

integer

The phone type as an integer. Possible values include 0 (MOBILE), 1 (LANDLINE), 2 (VOIP), 3 (INVALID), and 4 (OTHER).

Timezone

string

The time zone for the location where the phone number was originally registered.

Zip

string

The zip code for the location where the phone number was originally registered.

MessageBody

Attribute Type Description

Message

string

The error message that's returned from the API.

RequestID

string

The unique message body ID.