Skip to main content

Check if a phone number is on WhatsApp

Using this endpoint you can check if a given number is registered on WhatsApp or not. This can be useful to know if you can use WhatsApp to send messages to a contact number.

info

Check out our GitHub repository with an example script using this API.

tip

👉 You can see this API live in 2Chat's free number checker, and try it yourself.

Parameters

These are query-string parameters that should go on the URL you use to invoke the endpoint.

Considering https://api.p.2chat.io/open/whatsapp/check-number/<your-number>/<number-to-check>:

  • <your-number> must be replaced with your actual WhatsApp number that you connected to 2Chat, and...

  • <number-to-check> with the number you want to know if has WhatsApp enabled or not.

Example: https://api.p.2chat.io/open/whatsapp/check-number/+595981048477/+17137157533.

tip

Check this tutorial to connect your number to 2Chat.

Invocation


curl --location --request GET 'https://api.p.2chat.io/open/whatsapp/check-number/+595981048477/+17137157533' \
--header 'X-User-API-Key: your_api_key_here'
tip

Paid accounts can run up to 50 requests per minute per connected number.

For example: if you connect 1 number to 2Chat you can go as fast as 50 requests per minute, but with 2 numbers this limit jumps to 100 per minute, and so on with more numbers you connect.

caution

Trial accounts are rate-limited to 10 requests per minute and to up to 100 checks. To make requests at this speed, you must add a 6-second wait time between each request.

If you would like a faster throughput, please upgrade your account.

Billing

Making 1 request to this endpoint will be billed as 1 API call. If you include the query parameter extra-information=true, which can give you more detailed information about the number (see the whatsapp_info field below), the request will be billed as 2 API calls.

Example: https://api.p.2chat.io/open/whatsapp/check-number/+595981048477/+17137157533?extra-information=true

Response

If the phone number provided has a valid format, you will receive the output below. However, if the provided number is invalid in format or syntax, the field is_valid will return false without any further information.

info

You will need to connect a WhatsApp Business number to be able to pull status_text and the values inside business_information. You just need a free WhatsApp Business number. WhatsApp Business API is not required.

{
"is_valid": true,
"number": {
"iso_country_code": "US",
"region": "Texas",
"carrier": "",
"timezone": [
"America/Chicago"
]
},
"on_whatsapp": true,
"whatsapp_info": {
"contact_profile_pic": "https://2chat-user-data-dev.s3.amazonaws.com/chks/contacts/18321d356c7faf1e5f57cb03515fd0b71fdcf7e58f07a36dc530dcea47debb6c.jpeg",
"is_business": true,
"is_enterprise": false,
"verified_name": "2Chat",
"short_name": "2Chat",
"verified_level": 0,
"status_text": "How cool is this?",
"business_information": {
"verified_name": "2Chat",
"short_name": "2Chat",
"verified_level": 0,
"business_hours": {
"config": {
"sun": {
"mode": "open_24h"
},
"mon": {
"mode": "open_24h"
},
"tue": {
"mode": "open_24h"
},
"wed": {
"mode": "open_24h"
},
"thu": {
"mode": "open_24h"
},
"fri": {
"mode": "open_24h"
},
"sat": {
"mode": "open_24h"
}
},
"timezone": "America/Chicago"
},
"map_pin": "https://maps.google.com...",
"description": "Conversational Commerce automation software",
"email": "support@2chat.co",
"cart_enabled": true,
"website": [
"https://2chat.co"
],
"categories": [
{
"id": "1065597503495311",
"localized_display_name": "Software Company"
}
]
}
}
}
FieldDescription
is_validWhether the number is syntactically valid or not
number.iso_country_codeTwo-letter country code of the number
number.regionThe approximate region the number belongs to
number.carrierThe first carrier (phone provider) that issued this number
number.timezoneThe timezone this number is likely on based on its region
on_whatsapptrue when the number is using WhatsApp, false otherwise
whatsapp_info.is_businesstrue when the number is a Business Account and has its profile public
whatsapp_info.is_enterprisetrue when the number has an Enterprise Account
whatsapp_info.profile_picURL of the public (not hidden from people who aren't contacts) profile picture if it has any
whatsapp_info.verified_level0 to 2. Where 0 is not verified and 2 is verified with the green badge
whatsapp_info.verified_nameThe business name of a verified account
whatsapp_info.short_nameThe business short name of the account
whatsapp_info.status_textThe status text defined by the owner of the number
whatsapp_info.business_informationExtra information available only for numbers that have a business account: WhatsApp Business and WhatsApp Business API