Check if contact exists on WhatsApp
curl --request GET \
--url https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "201553730661"
}
'import requests
url = "https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists"
payload = { "phone": "201553730661" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phone: '201553730661'})
};
fetch('https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '201553730661'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists"
payload := strings.NewReader("{\n \"phone\": \"201553730661\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"201553730661\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"201553730661\"\n}"
response = http.request(request)
puts response.read_body{
"numberExists": true,
"chatId": "[email protected]"
}Check Contact Exists
Verify if a phone number is registered on WhatsApp and retrieve its chatId for messaging purposes.
GET
/
{instance}
/
contacts
/
check-exists
Check if contact exists on WhatsApp
curl --request GET \
--url https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "201553730661"
}
'import requests
url = "https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists"
payload = { "phone": "201553730661" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phone: '201553730661'})
};
fetch('https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '201553730661'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists"
payload := strings.NewReader("{\n \"phone\": \"201553730661\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"201553730661\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v1/{instance}/contacts/check-exists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"201553730661\"\n}"
response = http.request(request)
puts response.read_body{
"numberExists": true,
"chatId": "[email protected]"
}Check if a phone number is registered on WhatsApp before attempting to send messages.
This endpoint allows you to:
- Verify if a phone number exists on WhatsApp
- Get the correct chatId format for messaging
- Prevent errors when sending messages to non-existent numbers
This is useful for validating contacts before sending messaging operations or when integrating with external systems.
Use Cases
Contact Validation
Before sending messages to a list of contacts, verify which numbers are actually registered on WhatsApp.CRM Integration
When syncing contacts from your CRM, check their WhatsApp availability to enable messaging features.User Onboarding
Verify if a user’s phone number is on WhatsApp during registration or account setup.This endpoint is very useful to avoid getting blocked by WhatsApp, As it prevent you from sending messages to non-existing numbers.
Response Examples
Existing Contact
When the phone number is registered on WhatsApp:{
"numberExists": true,
"chatId": "[email protected]"
}
Non-existing Contact
When the phone number is not registered on WhatsApp:{
"numberExists": false,
"chatId": null
}
The
chatId can be in any format +20123456789, 20123456789, 0123456789, or 123456789Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
application/json
Example:
"application/json"
application/json
Example:
"application/json"
Path Parameters
Instance UUID copied from hypersender dashboard
Example:
"{{ instance_id }}"
Body
application/json
Phone number to check (with country code, without + or spaces)
Example:
"201553730661"