Skip to main content
POST
/
v2
/
sandbox
/
phone-number
Generate a test phone number
curl --request POST \
  --url https://api.connect.verifyyou.com/v2/sandbox/phone-number \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "us",
  "area_code": "210"
}
'
{
  "phone_number": "+12105550142",
  "verification_code": "550142"
}

Authorizations

API-KEY
string
header
required

Your VerifyYou API key.

Body

application/json
type
enum<string>
default:global

Type of test phone number to generate.

Available options:
us,
global
Example:

"us"

area_code
string
default:210

3-digit US area code (only used when type is us).

Example:

"210"

Response

Test phone number generated successfully.

phone_number
string

The generated test phone number in E.164 format.

Example:

"+12105550142"

verification_code
string

The verification code for this test number (last 6 digits).

Example:

"550142"