Consultar telefones em lote
curl --request POST \
--url https://api.ararahq.com/v1/phone-lookup/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumbers": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phoneNumbers: ['<string>']})
};
fetch('https://api.ararahq.com/v1/phone-lookup/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ararahq.com/v1/phone-lookup/batch"
payload = { "phoneNumbers": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ararahq.com/v1/phone-lookup/batch",
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([
'phoneNumbers' => [
'<string>'
]
]),
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;
}{
"results": [
{
"phoneNumber": "<string>",
"isMobile": true,
"lineType": "<string>",
"carrier": "<string>",
"hasWhatsapp": true,
"costCharged": 123,
"error": "<string>"
}
],
"totalCharged": 123,
"insufficientFunds": true
}Consulta de telefone
Consultar telefones em lote
Processa em série. Ao faltar saldo, para de cobrar e marca as linhas
restantes com error = INSUFFICIENT_FUNDS. Permissão: ADMIN.
POST
/
v1
/
phone-lookup
/
batch
Consultar telefones em lote
curl --request POST \
--url https://api.ararahq.com/v1/phone-lookup/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumbers": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phoneNumbers: ['<string>']})
};
fetch('https://api.ararahq.com/v1/phone-lookup/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ararahq.com/v1/phone-lookup/batch"
payload = { "phoneNumbers": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ararahq.com/v1/phone-lookup/batch",
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([
'phoneNumbers' => [
'<string>'
]
]),
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;
}{
"results": [
{
"phoneNumber": "<string>",
"isMobile": true,
"lineType": "<string>",
"carrier": "<string>",
"hasWhatsapp": true,
"costCharged": 123,
"error": "<string>"
}
],
"totalCharged": 123,
"insufficientFunds": true
}Authorizations
Chave de API da Arara (ara_live_...), enviada no header Authorization: Bearer ara_live_.... Crie e gerencie as chaves no painel: https://app.ararahq.com/dashboard/apikeys. O valor completo aparece uma única vez, na criação.
Body
application/json