Skip to main content
GET
https://api.enviaai.app
/
v1
/
contacts
Listar Contatos
curl --request GET \
  --url https://api.enviaai.app/v1/contacts \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": [
    {
      "phone": "5511999999999",
      "name": "João Silva",
      "profilePicUrl": "https://pps.whatsapp.net/...",
      "about": "Disponível",
      "isBlocked": false
    },
    {
      "phone": "5511988888888",
      "name": "João Santos",
      "profilePicUrl": null,
      "about": null,
      "isBlocked": false
    }
  ],
  "pagination": {
    "total": 2,
    "limit": 100,
    "offset": 0
  }
}

Query Parameters

instanceId
string
required
ID da instância
limit
number
default:"100"
Máximo de contatos (1-500)
offset
number
default:"0"
Paginação
Buscar por nome ou número

Response

data[].phone
string
Número do contato
data[].name
string
Nome salvo no WhatsApp
data[].profilePicUrl
string
URL da foto de perfil
data[].isBlocked
boolean
Se está bloqueado

Exemplo

const contacts = await client.contacts.list({
  instanceId: 'inst_abc123',
  search: 'João'
});

contacts.data.forEach(contact => {
  console.log(`${contact.name}: ${contact.phone}`);
});
{
  "success": true,
  "data": [
    {
      "phone": "5511999999999",
      "name": "João Silva",
      "profilePicUrl": "https://pps.whatsapp.net/...",
      "about": "Disponível",
      "isBlocked": false
    },
    {
      "phone": "5511988888888",
      "name": "João Santos",
      "profilePicUrl": null,
      "about": null,
      "isBlocked": false
    }
  ],
  "pagination": {
    "total": 2,
    "limit": 100,
    "offset": 0
  }
}