> For the complete documentation index, see [llms.txt](https://support.whapi.cloud/help-desk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.whapi.cloud/help-desk/contacts/add-contacts.md).

# Add Contacts

Add contact to WhatsApp

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
