---
title: "Contacts"
description: "Create, list, and look up contacts with @wazapin/sdk."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.wazapin.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Contacts

Store customer phone numbers, sync profiles from WhatsApp, and look up who is messaging you — all through `wazapin.contacts`.

## List contacts

```ts
const { data } = await wazapin.contacts.list({ limit: 20 });
```

For automatic pagination:

```ts
for await (const contact of wazapin.contacts.listPaginated({ limit: 50 })) {
  console.log(contact.id);
}
```

## Create a contact

```ts
const { data: contact } = await wazapin.contacts.create({
  phone_number: "6281234567890",
  name: "Ujang",
});

console.log(contact.id);
```

## Get a contact

```ts
const byId = await wazapin.contacts.get("contact_123");
const byPhone = await wazapin.contacts.getByPhone("6281234567890");
```

## Lookup a WhatsApp profile

```ts
const profile = await wazapin.contacts.lookup({
  channel_id: "wzp_ch_123",
  phone: "6281234567890",
});
```

`lookup()` returns profile information for the channel lookup response. It is not the same shape as a stored contact record.

Source: https://docs.wazapin.id/sdk/contacts/index.mdx
