# List users

{% get /%}
{% path text="/v1/users/list" /%}

This API allows you to get a list of users with access to the specified account. If a search query is added to this API, you will get a response based on the search keyword.

Also, if a userId query is provided, the response will be filtered based on the specified user ID.

## Code snippet

{% codetab %}

cURL

```shell
curl -X 'GET' \
  'https://api.boldsign.com/v1/users/list?pageSize=10&page=1&search=xxxx' \
  -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 userClient = new UserClient(apiClient);

var userRecords = userClient.ListUsers(1, 10);
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    
    user_api = boldsign.UserApi(api_client)
    user_records = user_api.list_users(page=1)
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\UserApi;

$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$user_api = new UserApi($config);
$user_records = $user_api->listUsers($page = 1);
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");

UserApi userApi = new UserApi(client);

int page = 1;
UserRecords userRecords = userApi.listUsers(page, null, null);  
```

NodeJS

```js
import { UserApi } from "boldsign";

const userApi = new UserApi("https://api.boldsign.com");
userApi.setApiKey("YOUR_API_KEY");

const userRecords = userApi.listUsers(1);
```

{% /codetab %}

## Query parameters

{% 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 /%}
- Returns the page number of the user page.

---

- {% arguments name="search" /%}{% batch datatype="string" /%}
- Returns users from the search results based on a keyword.

---

- {% arguments name="userId" /%}{% batch datatype="array" /%}
- ID of the user. One or more user IDs can be specified.

{% /nestedtable %}

## Example response

**_200 Success_**

```json
{
  "pageDetails": {
    "pageSize": 10,
    "page": 1
  },
  "result": [
    {
      "userId": "e892ea92-xxxx-xxxx-xxxx-bbdbcaa5xxxx",
      "email": "luthercooper@cubeflakes.com",
      "firstName": "luther",
      "lastName": "cooper",
      "teamId": "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx",
      "teamName": "Default",
      "role": "Member",
      "userStatus": "Active",
      "createdDate": 1646824225,
      "modifiedDate": 1647323111,
      "metaData": {
        "Employee": "Permanent",
        "Department": "Sales",
        "Designation": "Sales Manager"
      }
    }
  ]
}
```
