# Add Contacts

To add a contact to your WhatsApp address book via API, use the following endpoint:

**PUT** `https://gate.whapi.cloud/contacts`

{% embed url="<https://whapi.readme.io/reference/addcontact>" %}

Before using this method, make sure that your WhatsApp application has permission to access and manage contacts on your device.\
You can read more about this in [our article](https://support.whapi.cloud/help-desk/introduction#before-using-these-methods-please-ensure-that).

#### Required parameters:

* **phone** — the phone number of the contact to be added (in international format, without the “+” sign)
* **name** — the display name of the contact

#### Example request:

```bash
curl --request PUT \
     --url https://gate.whapi.cloud/contacts \
     --header 'accept: application/json' \
     --header 'authorization: Bearer YOUR_TOKEN' \
     --header 'content-type: application/json' \
     --data '
{
  "phone": "919984351847",
  "name": "Gerald"
}'
```

#### Notes:

* If you want to add multiple contacts at once, simply loop this request for each contact.
* To stay safe, we recommend adding short pauses between each request to avoid triggering WhatsApp’s anti-spam algorithms for mass activity.

***

If your WhatsApp account has **not yet received the update** that enables contact management, the request will fail with the following error:

```json
{
  "error": {
    "code": 404,
    "message": "Internal Error"
  }
}
```

This means that your WhatsApp version does not currently support adding contacts directly through the API. Make sure that in the app settings, under Privacy -> Contacts, you really don't see permission to access contacts; there is no such item there at all.

<figure><img src="https://2417185145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhsdgGmVCG31mEaHyRvxC%2Fuploads%2F6Iuu6WuvevcZEzJFaQ00%2Fimage.png?alt=media&#x26;token=ba56b1a5-6696-4c27-87cb-4b2883338b24" alt="" width="244"><figcaption><p>This feature is not yet available</p></figcaption></figure>
