Kapso keeps a directory of contacts observed in conversations. You can filter by tenant (customerId) and WA ID.
import { buildKapsoFields } from '@kapso/whatsapp-cloud-api';
const contacts = await client.contacts.list({
phoneNumberId: '123',
customerId: '00000000-0000-0000-0000-000000000000',
limit: 50,
fields: buildKapsoFields(['contact_name'])
});
contacts.data.forEach((c) => {
console.log(c.id, c.waId, c.profileName, c.customerId);
});
Optional filters
waId: WhatsApp ID (E.164 without plus). The SDK accepts 56911112222 and normalizes server-side.
customerId: UUID to scope contacts to a tenant.
hasCustomer: true | false to find linked/unlinked contacts.
const contact = await client.contacts.get({
phoneNumberId: '123',
waId: '56911112222'
});
await client.contacts.update({
phoneNumberId: '123',
waId: '56911112222',
profileName: 'Alice',
metadata: { tags: ['vip'], source: 'import' }
});
Contacts APIs are provided by Kapso. Use the proxy base URL to enable them.
For a complete list of Kapso fields and presets, see Kapso Extensions.