Passer au contenu principal
POST
/
whatsapp
/
contacts
/
check
Vérifier des numéros
curl --request POST \
  --url https://api.wachap.com/v1/whatsapp/contacts/check \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "<string>",
  "phones": [
    "<string>"
  ]
}
'

Endpoint

/v1/whatsapp/contacts/check

Headers

Authorization
string
requis
Bearer token avec votre Secret Key (format: Bearer sk_...)

Body Parameters

accountId
string
requis
L’identifiant du compte WhatsApp
phones
array
requis
Liste des numéros à vérifier (format international)

Notes

  • Les numéros peuvent être au format international (+33…) ou local (33…)
  • Le champ verifiedName n’apparaît que pour les comptes business vérifiés
  • Cette vérification est utile avant d’envoyer des campagnes

Exemples de requêtes

curl -X POST https://api.wachap.com/v1/whatsapp/contacts/check \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE" \
  -d '{
    "accountId": "account_xxx",
    "phones": ["+22962861571", "+33612345678", "22961234567"]
  }'

Exemple de réponse

{
  "success": true,
  "total": 3,
  "onWhatsApp": 2,
  "message": "2/3 numéro(s) sur WhatsApp",
  "results": [
    {
      "phone": "+22962861571",
      "isOnWhatsApp": true,
      "jid": "[email protected]",
      "verifiedName": "Official Name"
    },
    {
      "phone": "+33612345678",
      "isOnWhatsApp": false
    },
    {
      "phone": "22961234567",
      "isOnWhatsApp": true,
      "jid": "[email protected]"
    }
  ]
}

Codes d’erreur

CodeDescription
400MISSING_ACCOUNT_ID - accountId manquant
400MISSING_PHONES - phones manquant ou vide
401INVALID_SECRET_KEY - Clé secrète invalide
404ACCOUNT_NOT_FOUND - Compte WhatsApp non trouvé

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

application/json
accountId
string
phones
string[]

Réponse

200

OK