# List Documents Sent on Behalf of Users

Users can list all the documents sent on their behalf and those sent on behalf of others using the API. The documents you send on behalf of another user will be displayed under the "Behalf Documents" section in the BoldSign application. The documents can be fetched based on the `BehalfOfMe` or `BehalfOfOthers` filter in the query. After a successful retrieval, the entire details of all the queried documents will be displayed based on the specified filter value. Refer to this guide on how to send a document on behalf of others: [Send document on behalf of others - API Documentation - BoldSign](https://developers.boldsign.com/how-to-guides/send-document-onbehalf-of-others/)

Here are code examples demonstrating how to list document using `BehalfOfOthers` filter:

## Code snippet

{% codetab %}

cURL

```shell 
curl -X 'GET' \ 'https://api.boldsign.com/v1/document/behalfList?PageType=BehalfOfOthers&EmailAddress={onbehalf email}&Signers={signer email}&PageSize=10&Page=1&Status=None' \
  -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 documentClient = new DocumentClient(apiClient);
 var behalfDocuments = documentClient.ListBehalfDocuments(
     page: 1,
     pageSize: 10,
     emailAddress: new List<string> { "{on behalf of email}" },
     pageType: PageType.BehalfOfOthers,
     signers: new List<string> { "{signer email}" });

```

Python

```python
import requests
url = "https://api.boldsign.com/v1/document/behalflist?PageType=BehalfOfOthers&EmailAddress={onbehalf email}&Signers={signer email}&PageSize=10&Page=1"
payload={}
headers = {
  'accept': 'application/json',
  'X-API-KEY': '{your api key}'
}

response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)


```

NodeJS

```js
const axios = require('axios');
const fetchData = async () => {
    const config = {
        params: {
            'PageType':'BehalfOfOthers',
            'EmailAddress':'{onbehalf email}',
            'Signers':'{signer email}',
            'PageSize': '10',
            'Page': '1'
        },
        headers: {
            'accept': 'application/json',
            'X-API-KEY': '{your api key}'
        }
    };
    try {
        const response = await axios.get('https://api.boldsign.com/v1/document/behalflist', config);
        console.log(response.data);
    } catch (error) {
        console.error('Failed to make request:', error.response.status, error.response.statusText);
    }
};

fetchData();

```

{% /codetab %}

In the above example, replace `PageType` with either the `BehalfOfOthers` or `BehalfOfMe` filter, `PageSize` with the maximum number of behalf documents to be listed on a page, `Page` with the page number you would like to view, `EmailAddress` with the email address of the user on whose behalf you sent the document, and `Signers` with the recipient of the document.

Upon execution, the entire details of all the queried documents will be displayed based on the specified value.
