> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# How to list envelope recipients

> Demonstrates how to get data on the recipients of an already-defined envelope.

This topic demonstrates how to retrieve a list of all envelope recipients and their associated status details, such as the signing status for each envelope document.

> **Note**
>
> Run this code example from our [Quickstart](/docs/esign-rest-api/quickstart) or launcher projects: [Bash](https://github.com/docusign/code-examples-bash), [C#](https://github.com/docusign/code-examples-csharp), [Java](https://github.com/docusign/code-examples-java), [Node.js](https://github.com/docusign/code-examples-node), [PHP](https://github.com/docusign/code-examples-php), [PowerShell](https://github.com/docusign/code-examples-powershell), [Python](https://github.com/docusign/code-examples-python), or [Ruby](https://github.com/docusign/code-examples-ruby).

## Required data

Running the code in this how-to requires this data:

| Data element      | Description                                                                                                                                                                                                                                                                                                            |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \{API_ACCOUNT_ID} | A [GUID](http://guid.one/) value that identifies your account. This value is automatically generated by Docusign for any account you create. Copy the value from the **API Account ID** field on the [Apps and Keys](https://admindemo.docusign.com/authenticate?goTo=appsAndKeys) page.                               |
| \{BASE_PATH}      | A string value that forms the root of the URL required to make API calls. The base path value in the example code is set to target the developer environment at https\://\<domain>/restapi Where \<domain> is demo.docusign.net for the developer environment and is the result of the GetUserInfo call in production. |
| \{ENVELOPE_ID}    | A [GUID](http://guid.one/) value that identifies a Docusign [envelope](/docs/esign-rest-api/esign101/concepts/envelopes). This value is automatically generated by Docusign when the envelope is created.                                                                                                              |

## Step 1. Obtain your OAuth token

To make the API call shown in this how-to, you need a valid OAuth access token. Docusign supports access tokens for three different recommended OAuth grant types: Public Authorization Code Grant, Confidential Authorization Code Grant, and JSON Web Token (JWT) Grant. Choose the OAuth grant type appropriate for your scenario.

> **Note**
>
> See [Confidential Authorization Code Grant](/platform/auth/authcode#confidential-authorization-code-grant) for guidance on your options to get an Confidential Authorization Code Grant  OAuth token.

![Three icons that represent the three methods a user can use to obtain an OAuth token: JSON Web Token (JWT), Public Authorization Code Grant (ACG), and Confidential Authorization Code grant](/_fern-files/_img/64f473773042ee439449a096bf7673292b1585b86a4ccc55f82ba0dda41f61a1.webp)

## Step 2. List envelope recipients

List the recipient data for a given envelope using the following steps:

* Instantiate the Docusign API client.
* Set the following default request header to add your access token.
  `"Authorization" : "Bearer {ACCESS TOKEN}"`
* Initialize the Envelopes API.
* Call the [EnvelopeRecipients:list](/docs/esign-rest-api/reference/envelopes/enveloperecipients/list) method with the ID of the envelope whose recipients you want to list. Depending on the complexity of your document, the amount of data returned could be vast and include attributes such as `agents`, `editors`, `inPersonSigners`, `intermediaries`, and more.

> **Note:** The `currentRoutingOrder` parameter specifies which current step in the signing order is active. Completed documents will reveal the Signer information including signed name and initials. Keep in mind that confidential data such as a Social Security number is not returned through the API and must be returned via the form data link on the Developer Console.
>
> **Note:** When tracking your users, a client user ID can be specified on your side for ease of granularity. Recipient GUIDs are generated on a per-envelope basis, which should help when troubleshooting potential issues within your workflow,

> **Note**
>
> View the source code for this how-to on GitHub: [Bash](https://github.com/docusign/code-examples-bash/blob/master/examples/eSignature/eg005EnvelopeRecipients.sh), [C#](https://github.com/docusign/code-examples-csharp/blob/master/launcher-csharp/eSignature/Examples/ListEnvelopeRecipients.cs), [Java](https://github.com/docusign/code-examples-java/blob/master/src/main/java/com/docusign/controller/eSignature/examples/EG005ControllerEnvelopeRecipients.java), [Node.js](https://github.com/docusign/code-examples-node/blob/master/lib/eSignature/examples/envelopeRecipients.js), [PHP](https://github.com/docusign/code-examples-php/blob/master/src/Services/Examples/eSignature/EnvelopeRecipientsService.php), [PowerShell](https://github.com/docusign/code-examples-powershell/blob/master/examples/eSignature/eg005EnvelopeRecipients.ps1), [Python](https://github.com/docusign/code-examples-python/blob/master/app/eSignature/examples/eg005_envelope_recipients.py),  or [Ruby](https://github.com/docusign/code-examples-ruby/blob/master/app/services/e_sign/eg005_envelope_recipients_service.rb)

**`Bash`**

```bash title="Bash"
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
     --header "Content-Type: application/json" \
     --request GET ${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}/recipients
```

**`C#`**

```csharp title="C#"
var docuSignClient = new DocuSignClient(basePath);
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
EnvelopesApi envelopesApi = new EnvelopesApi(docuSignClient);
var results = envelopesApi.ListRecipientsWithHttpInfo(accountId, envelopeId);
results.Headers.TryGetValue("X-RateLimit-Remaining", out string remaining);
results.Headers.TryGetValue("X-RateLimit-Reset", out string reset);

if (reset != null && remaining != null)
{
    DateTime resetDate = DateTimeOffset.FromUnixTimeSeconds(long.Parse(reset)).UtcDateTime;
    Console.WriteLine("API calls remaining: " + remaining);
    Console.WriteLine("Next Reset: " + resetDate);
}
```

**`Java`**

```java title="Java"
EnvelopesApi envelopesApi = createEnvelopesApi(session.getBasePath(), user.getAccessToken());
Recipients recipients = EnvelopeRecipientsService.envelopeRecipients(
        envelopesApi,
        session.getAccountId(),
        session.getEnvelopeId());
DoneExample.createDefault(getTextForCodeExampleByApiType().ExampleName)
        .withJsonObject(recipients)
        .withMessage(getTextForCodeExampleByApiType().ResultsPageText)
        .addToModel(model, config);
return DONE_EXAMPLE_PAGE;
```

**`Node.js`**

```javascript title="Node.js"
let dsApiClient = new docusign.ApiClient();
dsApiClient.setBasePath(args.basePath);
dsApiClient.addDefaultHeader('Authorization', 'Bearer ' + args.accessToken);
let envelopesApi = new docusign.EnvelopesApi(dsApiClient);
  let results = null;
// Step 1. EnvelopeRecipients::list.
// Exceptions will be caught by the calling function
results = await envelopesApi.listRecipients(
  args.accountId,
  args.envelopeId,
  null,
  (error, data, response) => {
    const headers = response?.headers;

    const remaining = headers?.['x-ratelimit-remaining'];
    const reset = headers?.['x-ratelimit-reset'];

    if (remaining && reset) {
      const resetInstant = new Date(Number(reset) * 1000);

      console.log(`API calls remaining: ${remaining}`);
      console.log(`Next Reset: ${resetInstant.toISOString()}`);
    }
});
```

**`PHP`**

```php title="PHP"
$envelope_api = $clientService->getEnvelopeApi();
try {
    $listRecipients = $envelope_api->listRecipientsWithHttpInfo($args['account_id'], $args['envelope_id']);

    $remaining = $listRecipients[2]['X-RateLimit-Remaining'] ?? null;
    $reset = $listRecipients[2]['X-RateLimit-Reset'] ?? null;

    if ($remaining !== null && $reset !== null) {
        $resetInstant = (new DateTime())->setTimestamp((int)$reset);
        error_log("API calls remaining: $remaining");
        error_log("Next Reset: " . $resetInstant->format(\DateTime::ATOM));
    }
} catch (ApiException $e) {
    $clientService->showErrorTemplate($e);
    exit;
}

return $listRecipients[0];
```

**`PowerShell`**

```text title="PowerShell"
Invoke-RestMethod `
  -Uri "${apiUri}/v2.1/accounts/${accountId}/envelopes/${envelopeId}/recipients" `
  -Method 'GET' `
  -Headers @{
  'Authorization' = "Bearer $accessToken";
  'Content-Type'  = "application/json";
}
```

**`Python`**

```python title="Python"
def worker(args):
    """
    Call the envelope recipients list method
    """

    # Exceptions will be caught by the calling function
    api_client = create_api_client(base_path=args["base_path"], access_token=args["access_token"])

    envelope_api = EnvelopesApi(api_client)
    # Call the envelope recipients list method
    (data, status, headers) = envelope_api.list_recipients_with_http_info(account_id=args["account_id"], envelope_id=args["envelope_id"])

    remaining = headers.get("X-RateLimit-Remaining")
    reset = headers.get("X-RateLimit-Reset")

    if remaining is not None and reset is not None:
        reset_date = dt.fromtimestamp(int(reset), tz=timezone.utc)
        print(f"API calls remaining: {remaining}")
        print(f"Next Reset: {reset_date}")

    return data
```

**`Ruby`**

```ruby title="Ruby"
envelope_api = create_envelope_api(args)
results, _status, headers = envelope_api.list_recipients_with_http_info args[:account_id], args[:envelope_id]

remaining = headers['X-RateLimit-Remaining']
reset = headers['X-RateLimit-Reset']

if remaining && reset
  reset_date = Time.at(reset.to_i).utc
  puts "API calls remaining: #{remaining}"
  puts "Next Reset: #{reset_date}"
end
envelope_api = create_envelope_api(args)
results, _status, headers = envelope_api.list_recipients_with_http_info args[:account_id], args[:envelope_id]

remaining = headers['X-RateLimit-Remaining']
reset = headers['X-RateLimit-Reset']

if remaining && reset
  reset_date = Time.at(reset.to_i).utc
  puts "API calls remaining: #{remaining}"
  puts "Next Reset: #{reset_date}"
end
```

## Expected response

If you run this code example from our Quickstart or launcher projects, you should see a JSON response similar to the code shown.

**`Sample response`**

```json title="Sample response"
{
  "signers":
  [
    {
      "creationReason": "sender",
      "isBulkRecipient": "false",
      "requireUploadSignature": "false",
      "name": "Test One",
      "firstName": "",
      "lastName": "",
      "email": "test1@anyemail.com",
      "recipientId": "1",
      "recipientIdGuid": "7805c51d-xxxx-xxxx-xxxx-3da130b68252",
      "requireIdLookup": "false",
      "userId": "728df083-xxxx-xxxx-xxxx-ee46a1a65f43",
      "routingOrder": "1",
      "status": "completed",
      "completedCount": "1",
      "signedDateTime": "2020-08-13T22:03:04.4130000Z",
      "deliveredDateTime": "2020-08-13T22:02:52.1970000Z",
      "deliveryMethod": "email",
      "recipientType": "signer"
    }
  ],
  "agents": [],
  "editors": [],
  "intermediaries": [],
  "carbonCopies":
  [
    {
      "name": "Test Two",
      "firstName": "",
      "lastName": "",
      "email": "test2@anyemail.com",
      "recipientId": "2",
      "recipientIdGuid": "b743faf9-xxxx-xxxx-xxxx-0720dfe8118f",
      "requireIdLookup": "false",
      "userId": "0724cab8-xxxx-xxxx-xxxx-82e55f5b02fa",
      "routingOrder": "2",
      "status": "completed",
      "completedCount": "0",
      "deliveryMethod": "email",
      "recipientType": "carboncopy"
    }
  ],
  "certifiedDeliveries": [],
  "inPersonSigners": [],
  "seals": [],
  "witnesses": [],
  "recipientCount": "2",
  "currentRoutingOrder": "1"
}
```

## Next steps

* Run this code example from our [Quickstart](/docs/esign-rest-api/quickstart) or launcher projects:    [Bash](https://github.com/docusign/code-examples-bash), [C#](https://github.com/docusign/code-examples-csharp), [Java](https://github.com/docusign/code-examples-java), [Node.js](https://github.com/docusign/code-examples-node), [PHP](https://github.com/docusign/code-examples-php), [PowerShell](https://github.com/docusign/code-examples-powershell), [Python](https://github.com/docusign/code-examples-python), or [Ruby](https://github.com/docusign/code-examples-ruby).
* See [Envelopes](/docs/esign-rest-api/esign101/concepts/envelopes) for context.
* Learn more about [envelope status](/docs/esign-rest-api/reference/envelopes/envelopes/liststatus) in the API reference.
* See how to [Go-Live](/docs/esign-rest-api/go-live) with a completed app and find the base path for API calls in the production environment.