# List Contacts

{% get /%}
{% path text="/v1/contacts/list" /%}

This API allows you to get a list of contacts with access to the specified account. If a SearchKey query is added to this API, you will get a response based on the SearchKey keyword.

## Code snippet

{% codetab %}

cURL

```shell
curl -X 'GET' \
  'https://api.boldsign.com/v1/contacts/list?pageSize=10&page=1&searchKey=xxxx&contactType=MyContacts' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {your API key}'
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var contactClient = new ContactClient(apiClient);

var contactList = contactClient.ListContacts(1);
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:  

    contacts_api = boldsign.ContactsApi(api_client)
    contact_list = contacts_api.contact_user_list(page=1)
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\ContactsApi;

$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$contacts_api = new ContactsApi($config);
$contact_list = $contacts_api->contactUserList($page=1);
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
            
ContactsApi contactsApi = new ContactsApi(client);

int page = 1;         
ContactsList contactList = contactsApi.contactUserList(page, null, null, null);
```

NodeJS

```js
import { ContactsApi } from "boldsign";

const contactsApi = new ContactsApi("https://api.boldsign.com");
contactsApi.setApiKey("YOUR_API_KEY");

const contactList = contactsApi.contactUserList(1);
```

{% /codetab %}

## Query paramters

{% nestedtable %}

- {% arguments name="pageSize" /%}{% batch datatype="integer" /%}
- The number of results returned per page. The value must be between 1 and 100. The default value is 10.

---

- {% arguments name="page" /%}{% batch datatype="integer" /%}{% required /%}
- The page number of the contact page to return.

---

- {% arguments name="searchKey" /%}{% batch datatype="string" /%}
- Returns contacts of the searchKey results for a keyword.

---

- {% arguments name="contactType" /%}{% batch datatype="string" /%}
- Type of Contacts such as `MyContacts` and `AllContacts`. The default contact type is `AllContacts`.

{% /nestedtable %}

{% note %} **Note:** Please note that, the **All Contacts** folder in the web application displays all contacts added through both the web app and API. Additionally, if a user has been invited and has accepted the invitation, they will also be listed in the **All Contacts** page.{% /note %}

## Example response

**_200 Success_**

```json
{
  "pageDetails": {
    "pageSize": 10,
    "page": 1,
    "totalRecordsCount": 1
  },
  "result": [
    {
      "id": "e892ea92-xxxx-xxxx-xxxx-bbdbcaa5xxxxc_pgVgo",
      "name": "xxxxx",
      "email": "cooper@cubeflakes.com",
      "companyName": "syncfusion",
      "role": "Engineer",
      "phoneNumber": {
        "countryCode": "+91",
        "number": "xxxxx78901"
      }
    }
  ]
}
```
