Check whether a phone number is registered on WhatsApp.
GET/whatsapp/check-number/{your_number}/{number_to_check}
- Takes: Phone number
- Active: contacts the target
- Cost: 1 credit; 2 credits with extra-information=true
Returns validity, region and on_whatsapp for the number. With extra-information=true it also returns whatsapp_info fields the target's privacy settings allow. If the number is malformed, is_valid is false and nothing else is returned. If number_id differs from the number checked, send messages to number_id.
Path parameters
your_numberYour own WhatsApp number, already connected to 2Chat, with country code
number_to_checkThe phone number to check, with country code
Query parameters
extra-informationSet to true to return the whatsapp_info details (billed at 2 credits)
Response fields · 14ShowHide
is_valid
Whether the number is syntactically valid
iso_country_code
Two-letter country code
region
Approximate region
carrier
First carrier that issued the number
timezone[]
Likely timezones based on region
on_whatsapp
Whether the number uses WhatsApp
number_id
The number's form in WhatsApp's network; use as the message recipient
is_business
Whether it is a Business Account with a public profile
is_enterprise
Whether it has an Enterprise Account
contact_profile_pic
URL of the public profile picture, if any
verified_level
0 (unverified) to 2 (green badge)
verified_name
Business name of a verified account
status_text
Owner's status text (needs a connected WhatsApp Business number)
business_information
Extra business details such as language, currency, hours and website; business accounts only
curl 'https://api.p.2chat.io/open/whatsapp/check-number/%2B15550100/%2B15550101' \
-H 'X-User-API-Key: YOUR_API_KEY'{
"is_valid": true,
"number": {
"iso_country_code": "US",
"region": "Texas",
"carrier": "",
"timezone": [
"America/Chicago"
]
},
"on_whatsapp": true,
"whatsapp_info": {
"number_id": "15550101",
"is_business": true,
"is_enterprise": false,
"verified_name": "Example Co",
"verified_level": 0
}
}