🔍 Check WhatsApp Contacts
Verify if phone numbers are registered on WhatsApp before sending messages using the Whatspie API with bulk contact validation support.
📱 Contact Verification
Validate phone numbers before messaging to ensure delivery success and avoid errors. Perfect for contact list cleanup and pre-send validation.
🌐 Endpoint
POST https://api.whatspie.com/contacts/check
🔐 Authentication
Bearer token required in the Authorization
header.
📋 Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
device | string | ✅ | Your registered WhatsApp device number |
phones | array | ✅ | Array of phone numbers to verify (international format) |
Phone Number Format
- Format: International format without leading zeros or + sign
- Examples:
"6281776521626"
,"1234567890"
,"447123456789"
- Invalid:
"+6281776521626"
,"081776521626"
,"0081776521626"
🚀 Request Examples
Single Contact Check
curl -L -X POST 'https://api.whatspie.com/contacts/check' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json; charset=utf-8' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
--data-raw '{
"device": "6281776521626",
"phones": [
"6281776521626"
]
}'
Multiple Contacts Check
curl -L -X POST 'https://api.whatspie.com/contacts/check' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json; charset=utf-8' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
--data-raw '{
"device": "6281776521626",
"phones": [
"6281776521626",
"6285603051722",
"6281234567890",
"6289876543210"
]
}'
International Numbers Check
curl -L -X POST 'https://api.whatspie.com/contacts/check' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json; charset=utf-8' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
--data-raw '{
"device": "6281776521626",
"phones": [
"6281776521626",
"60123456789",
"65123456789",
"91987654321",
"1234567890",
"447123456789"
]
}'
📊 Response Format
Success Response
{
"status": 200,
"message": "OK",
"data": [
{
"phone": "6281776521626",
"is_on_whatsapp": false
},
{
"phone": "6285603051722",
"is_on_whatsapp": true
},
{
"phone": "6281234567890",
"is_on_whatsapp": false
},
{
"phone": "6289876543210",
"is_on_whatsapp": false
}
]
}
Error Response - Invalid Phone Format
{
"code": 400,
"message": "Invalid phone number format"
}
Error Response - Too Many Numbers
{
"code": 400,
"message": "Too many phone numbers"
}
Error Response - Device Not Connected
{
"code": 404,
"message": "Device not found"
}
🔗 Related Endpoints
- Send Text Messages - Send messages to verified contacts
- Send Image Messages - Send media to validated numbers
- Device Management - Manage your WhatsApp devices
- Group Management - Add verified contacts to groups