Skip to main content
POST
/
contact
/
check
Verificar números
curl --request POST \
  --url https://apizap.loce.io/v1/contact/check \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sessionId": "<string>",
  "phones": [
    "5511999999999",
    "5511888888888"
  ]
}
'
import requests

url = "https://apizap.loce.io/v1/contact/check"

payload = {
"sessionId": "<string>",
"phones": ["5511999999999", "5511888888888"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sessionId: '<string>', phones: ['5511999999999', '5511888888888']})
};

fetch('https://apizap.loce.io/v1/contact/check', 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://apizap.loce.io/v1/contact/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sessionId' => '<string>',
'phones' => [
'5511999999999',
'5511888888888'
]
]),
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://apizap.loce.io/v1/contact/check"

payload := strings.NewReader("{\n \"sessionId\": \"<string>\",\n \"phones\": [\n \"5511999999999\",\n \"5511888888888\"\n ]\n}")

req, _ := http.NewRequest("POST", 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.post("https://apizap.loce.io/v1/contact/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sessionId\": \"<string>\",\n \"phones\": [\n \"5511999999999\",\n \"5511888888888\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://apizap.loce.io/v1/contact/check")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionId\": \"<string>\",\n \"phones\": [\n \"5511999999999\",\n \"5511888888888\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "results": [
    {
      "phone": "<string>",
      "exists": true,
      "jid": "<string>",
      "lid": "<string>"
    }
  ],
  "summary": {
    "total": 123,
    "exists": 123,
    "notExists": 123
  }
}
{
"error": "<string>",
"message": "<string>",
"details": {}
}
POST /contact/check Verifique quais números possuem conta no WhatsApp antes de disparar mensagens. Ideal para higienizar listas e evitar envios para números inválidos.
Limite diário (anti-ban): o plano free permite 20 verificações por dia, contadas por número. Ao estourar, a requisição inteira é rejeitada com 429 e a mensagem informa quantas restam. Planos pagos possuem limites maiores. Máximo de 50 números por requisição.
const { results, summary } = await zap.checkContacts('my-session-id', {
  phones: ['5564999999999', '5511888888888'],
});

console.log(summary); // { total: 2, exists: 1, notExists: 1 }

for (const contact of results) {
  if (contact.exists) {
    console.log(`${contact.phone} tem WhatsApp:`, contact.jid);
  }
}
import requests

response = requests.post(
    "https://apizap.loce.io/v1/contact/check",
    headers={"Authorization": "Bearer lz_xxxxxxxxxx"},
    json={
        "sessionId": "SESSION_ID",
        "phones": ["5564999999999", "5511888888888"],
    },
)

data = response.json()
print(data["summary"])  # {"total": 2, "exists": 1, "notExists": 1}
curl --request POST \
  --url https://apizap.loce.io/v1/contact/check \
  --header 'Authorization: Bearer lz_xxxxxxxxxx' \
  --header 'Content-Type: application/json'
  --data '{
  "sessionId": "string",
  "phones": ["5564999999999", "5511888888888"]
}'
Cada item de results traz { phone, exists, jid, lid }, onde phone é exatamente o número enviado e jid/lid só vêm preenchidos quando exists é true.

Authorizations

Authorization
string
header
required

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

Body

application/json
sessionId
string
required

ID externo de uma sessão conectada.

phones
string[]
required

Lista de números com DDI (formato E.164 sem o '+', 6 a 15 dígitos). Não aceita groupId (@g.us). Máximo de 50 por requisição.

Required array length: 1 - 50 elements
Example:
["5511999999999", "5511888888888"]

Response

Resultado da verificação.

success
boolean
results
object[]
summary
object