# 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](/help-desk/contacts/introduction.md#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="/files/UDrXCxpP7Pv9VeBW5YPd" alt="" width="244"><figcaption><p>This feature is not yet available</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.whapi.cloud/help-desk/contacts/add-contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
