POST /v1/contacts/count
POST
/v1/contacts/count
const url = 'https://seu-endereco-da-api/v1/contacts/count';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"filter":{},"reachable":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://seu-endereco-da-api/v1/contacts/count \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "filter": {}, "reachable": true }'Permissão que a Chave de acesso precisa: Ler contatos (contacts:read).
Authorizations
Seção intitulada “Authorizations”Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
filter
Same condition tree as POST /contacts/search
object
reachable
Count only who a campaign could reach: not opted out, not anonymized, not blocked
boolean
Example generated
{ "filter": {}, "reachable": true}Responses
Seção intitulada “Responses”Media typeapplication/json
object
total
required
number
Example generated
{ "total": 1}