> For the complete documentation index, see [llms.txt](https://help.pickyassist.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pickyassist.com/api-documentation-v2/whatsapp-settings-apis/whatsapp-contact-and-group-fetching.md).

# WhatsApp Contact & Group Fetching

Fetching Contact & Group Details from WhatsApp Connected Number

This API allows you to fetch contact and groups of your Connected WhatsApp Number and this API is supported only in WhatsApp Web Automation Channel&#x20;

{% hint style="danger" %}

### **Works only with WhatsApp Web Automation Channel and this feature is not stable, use at your own risk**&#x20;

{% endhint %}

## WhatsApp Contact & Group Fetching API

<mark style="color:green;">`POST`</mark> `https://pickyassist.com/app/api/v2/fetch-contacts`

API to fetch WhatsApp Contacts & Groups

#### Request Body

| Name        | Type   | Description                              |
| ----------- | ------ | ---------------------------------------- |
| token       | string | Your API Token for authentication        |
| application | number | <p>10 = WhatsApp Web Automation <br></p> |

{% tabs %}
{% tab title="200 " %}

```javascript
[
   {
      "number":"9194055074-16099455",
      "name":"API Group",
      "type":"group"
   },
   {
      "number":"9194055074-16161719",
      "name":"NEW SUBBB",
      "type":"group"
   },
   {
      "number":"1809723725",
      "name":"Joan Miranda",
      "type":"contact"
   },
   {
      "number":"2347076688",
      "name":"P.Tosin",
      "type":"contact"
   },
   {
      "number":"2347000485",
      "name":"Geraldox Gerry",
      "type":"contact"
   }
]
```

{% endtab %}
{% endtabs %}

## Sample Request Body JSON

```javascript
{
    	"token": "e16e32e750cf865fae95752a9f1d0898cb",
    	"application": "10"
 }

```

## Sample Response

```javascript
[
   {
      "number":"9194055074-16099455",
      "name":"API Group",
      "type":"group"
   },
   {
      "number":"9194055074-16161719",
      "name":"NEW SUBBB",
      "type":"group"
   },
   {
      "number":"1809723725",
      "name":"Joan Miranda",
      "type":"contact"
   },
   {
      "number":"2347076688",
      "name":"P.Tosin",
      "type":"contact"
   },
   {
      "number":"2347000485",
      "name":"Geraldox Gerry",
      "type":"contact"
   }
]
```

## Response Variables

| Variable Name | Type   | Description                                                |
| ------------- | ------ | ---------------------------------------------------------- |
| number        | String | WhatsApp Number or WhatsApp Group ID if the type=group     |
| name          | String | Name of the Contact / Group                                |
| type          | String | <p>contact = It's a contact</p><p>group = It's a group</p> |


---

# 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 dynamically by asking a question.

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

```
GET https://help.pickyassist.com/api-documentation-v2/whatsapp-settings-apis/whatsapp-contact-and-group-fetching.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
