> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/docusign.md).

# DocuSign

Connect to DocuSign to manage envelopes, documents, and e-signatures. Supports sending documents for signature, managing templates, and tracking envelope status.

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector      | Authentication              |
| -------------- | --------------------------- |
| DocuSign       | OAuth sign-in               |
| DocuSign (JWT) | JWT with an RSA private key |

#### DocuSign

Connect to DocuSign to manage envelopes, documents, and e-signatures. Supports sending documents for signature, managing templates, and tracking envelope status.

**Set up in DocuSign**

1. Sign in to DocuSign with the account whose envelopes and templates you want to use.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **DocuSign**.
2. Complete the connector configuration below. If you do not have access to these settings, ask your StackAI administrator to configure the connector.
3. Select **Connect**, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.
4. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connector configuration**

| StackAI field    | Required                 | What to enter                                                                                                                       |
| ---------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| OAuth Scopes     | Read-only                | OAuth scopes for DocuSign API access. This value is shown for reference; it is not an editable credential.                          |
| Client ID        | Yes                      | OAuth 2.0 Client ID from DocuSign developer settings. [Provider instructions](https://developers.docusign.com/).                    |
| Client Secret    | Yes                      | OAuth 2.0 Client Secret from DocuSign developer settings.                                                                           |
| Redirect URI     | Read-only                | Use this redirect URI when configuring your OAuth application. This value is shown for reference; it is not an editable credential. |
| Demo Environment | Optional / as applicable | Use the DocuSign demo environment (account-d). Disable for production.                                                              |

**Provider documentation:** [Setup reference](https://developers.docusign.com/platform/auth/authcode/).

#### DocuSign (JWT)

Connect to DocuSign using JWT Grant for server-side authentication. Uses an integration key and RSA private key to mint short-lived access tokens automatically. Ideal for unattended workflows and enterprise integrations.

**Set up in DocuSign**

1. In DocuSign’s Apps and Keys settings, select the integration and obtain its Integration Key. Add an RSA key pair and retain the private key.
2. Record the API user ID of the user to impersonate and the account ID. Grant consent for the integration to use the signature and impersonation scopes.
3. Use the API base URI for the same DocuSign account and environment.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **DocuSign (JWT)**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field   | Required                 | What to enter                                                                                                                                                                                                   |
| --------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Integration Key | Yes                      | Your DocuSign Integration Key (client ID), found in DocuSign Admin Console under Apps and Keys.                                                                                                                 |
| User ID         | Yes                      | API user ID (GUID) of the DocuSign user to impersonate. Find it in Admin Console under Users -> select user -> API Username.                                                                                    |
| RSA Private Key | Yes                      | RSA private key in PEM format. Generate one in Admin Console under Apps and Keys -> \[your app] -> Add RSA Keypair, then paste the contents of the downloaded private key file here.                            |
| Account ID      | Yes                      | Your DocuSign account ID (GUID). Find it in Admin Console under Apps and Keys -> My Account Information.                                                                                                        |
| Base URI        | Optional / as applicable | DocuSign base URI for API requests. Use <https://demo.docusign.net> for sandbox or your production base URI (e.g. <https://na3.docusign.net>). The environment (demo vs. production) is inferred from this URI. |

**Connection notes**

* Paste the complete RSA private key in PEM format. A public key cannot be used in this field.
* JWT authorization requires user or administrator consent before the connection can act on behalf of the selected user.

**Provider documentation:** [Setup reference 1](https://developers.docusign.com/platform/auth/jwt/jwt-get-token/), [Setup reference 2](https://developers.docusign.com/platform/auth/jwt/).

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

#### Detailed setup guides

* [Connect DocuSign](/integrations/catalog/docusign/connect-docusign.md)

## Use an action

1. Add the required **DocuSign** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### List Envelopes

Search and list DocuSign envelopes

**Inputs**

| Field       | Type            | Required | Description                                                                                                                                            |
| ----------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| From Date   | date            | Yes      | Start date for the envelope search.                                                                                                                    |
| To Date     | date            | No       | End date for the envelope search.                                                                                                                      |
| Folder      | select (string) | No       | Which DocuSign folder to pull from. Mirrors the tabs in the DocuSign UI. Available values: Inbox (received), Sent, Action required, Completed, Drafts. |
| Status      | select (string) | No       | Filter by envelope status. Available values: Created, Sent, Delivered, Signed, Completed, Declined, Voided, Timed out.                                 |
| Search Text | string          | No       | Search envelopes by subject or recipient name.                                                                                                         |

**Outputs**

| Field       | Type   | Description                                      |
| ----------- | ------ | ------------------------------------------------ |
| Envelopes   | array  | List of envelopes matching the search criteria.  |
| Total Count | number | Total number of envelopes matching the criteria. |

#### Get Envelope

Get details for a specific DocuSign envelope

**Inputs**

| Field    | Type            | Required | Description                                                                            |
| -------- | --------------- | -------- | -------------------------------------------------------------------------------------- |
| Envelope | select (string) | Yes      | Select an envelope or enter an envelope ID. Options load from the selected connection. |

**Outputs**

| Field    | Type   | Description           |
| -------- | ------ | --------------------- |
| Envelope | object | The envelope details. |

#### Download Document

Download a document from a DocuSign envelope

**Inputs**

| Field    | Type            | Required | Description                                                                                                                                                        |
| -------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Envelope | select (string) | Yes      | Select an envelope or enter an envelope ID. Options load from the selected connection.                                                                             |
| Document | select (string) | Yes      | Select a document. Use 'combined' for all documents as a single PDF or 'certificate' for the certificate of completion. Options load from the selected connection. |

**Outputs**

| Field        | Type   | Description                                                 |
| ------------ | ------ | ----------------------------------------------------------- |
| Download URL | string | Temporary URL to download the document (expires in 1 hour). |
| Content Type | string | The MIME type of the document.                              |
| Envelope ID  | string | The envelope the document belongs to.                       |
| Document ID  | string | The downloaded document ID.                                 |

#### Send Envelope from Template

Create and send a DocuSign envelope from a template

**Inputs**

| Field                 | Type            | Required | Description                                                                                                                                |
| --------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Template              | select (string) | Yes      | Select a DocuSign template to use. Options load from the selected connection.                                                              |
| Email Subject         | string          | Yes      | The subject line of the email sent to recipients.                                                                                          |
| Template Roles (JSON) | textarea        | Yes      | JSON array of template role assignments. Each object needs roleName, name, and email. Optionally include tabs to pre-fill document fields. |

**Outputs**

| Field        | Type   | Description                              |
| ------------ | ------ | ---------------------------------------- |
| Envelope ID  | string | The ID of the created envelope.          |
| Status       | string | The status of the envelope (e.g., sent). |
| Envelope URI | string | The URI path for the envelope.           |

#### Get Recipient Status

Get the signing status of all recipients in a DocuSign envelope

**Inputs**

| Field    | Type            | Required | Description                                                                            |
| -------- | --------------- | -------- | -------------------------------------------------------------------------------------- |
| Envelope | select (string) | Yes      | Select an envelope or enter an envelope ID. Options load from the selected connection. |

**Outputs**

| Field       | Type   | Description                                  |
| ----------- | ------ | -------------------------------------------- |
| Recipients  | array  | List of recipients and their signing status. |
| Envelope ID | string | The envelope ID queried.                     |

#### List Templates

List available DocuSign templates

**Inputs**

| Field       | Type   | Required | Description               |
| ----------- | ------ | -------- | ------------------------- |
| Search Text | string | No       | Search templates by name. |

**Outputs**

| Field       | Type   | Description                      |
| ----------- | ------ | -------------------------------- |
| Templates   | array  | List of available templates.     |
| Total Count | number | Total number of templates found. |

#### Get Template Roles

Get the recipient roles and field labels defined on a DocuSign template

**Inputs**

| Field    | Type            | Required | Description                                                                     |
| -------- | --------------- | -------- | ------------------------------------------------------------------------------- |
| Template | select (string) | Yes      | Select a template to view its roles. Options load from the selected connection. |

**Outputs**

| Field          | Type   | Description                              |
| -------------- | ------ | ---------------------------------------- |
| Template Roles | array  | Recipient roles defined on the template. |
| Template Name  | string | The name of the template.                |

#### Get Tab Values

Get the field values filled in by a recipient on a DocuSign envelope

**Inputs**

| Field     | Type            | Required | Description                                                                            |
| --------- | --------------- | -------- | -------------------------------------------------------------------------------------- |
| Envelope  | select (string) | Yes      | Select an envelope or enter an envelope ID. Options load from the selected connection. |
| Recipient | select (string) | Yes      | Select a recipient or enter a recipient ID. Options load from the selected connection. |

**Outputs**

| Field        | Type   | Description                              |
| ------------ | ------ | ---------------------------------------- |
| Tab Values   | array  | Field values filled in by the recipient. |
| Envelope ID  | string | The envelope queried.                    |
| Recipient ID | string | The recipient queried.                   |

#### Void Envelope

Void (cancel) a DocuSign envelope that is still in progress

**Inputs**

| Field              | Type            | Required | Description                                                                                    |
| ------------------ | --------------- | -------- | ---------------------------------------------------------------------------------------------- |
| Envelope           | select (string) | Yes      | Select an envelope to void or enter an envelope ID. Options load from the selected connection. |
| Reason for Voiding | string          | Yes      | A reason for voiding the envelope (shown to recipients).                                       |

**Outputs**

| Field       | Type   | Description                              |
| ----------- | ------ | ---------------------------------------- |
| Envelope ID | string | The voided envelope ID.                  |
| Status      | string | The new status of the envelope (voided). |

### Triggers

A trigger starts a workflow when its configured event occurs. Configure the event and filters before enabling the trigger.

#### On Envelope Status Change

Trigger when a DocuSign envelope changes status (e.g., sent to completed, delivered to declined)

**Configuration**

| Field               | Type            | Required | Description                                                                                                                                                                                                          |
| ------------------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Folder              | select (string) | No       | Watch envelopes in a specific DocuSign folder (e.g., Sent, Inbox, Action required). Leave blank to watch envelopes across all folders. Available values: Inbox (received), Sent, Action required, Completed, Drafts. |
| Status              | select (string) | No       | Only fire when envelopes reach this status. Leave blank to watch all status changes. Available values: Created, Sent, Delivered, Signed, Completed, Declined, Voided, Timed out.                                     |
| Template (optional) | select (string) | No       | Only watch envelopes created from a specific template. Leave blank to watch all envelopes. Options load from the selected connection.                                                                                |

**Event inputs**

| Field               | Type   | Required | Description                                     |
| ------------------- | ------ | -------- | ----------------------------------------------- |
| Envelope ID         | string | Yes      | The ID of the envelope that changed. Default: . |
| Previous Status     | string | No       | The previous status of the envelope.            |
| New Status          | string | Yes      | The new status of the envelope. Default: .      |
| Email Subject       | string | No       | The subject line of the envelope.               |
| Status Changed Date | string | Yes      | When the status changed. Default: .             |
| Envelope Data       | string | Yes      | Full envelope data as JSON. Default: .          |

**Outputs**

| Field               | Type   | Description                          |
| ------------------- | ------ | ------------------------------------ |
| Envelope ID         | string | The ID of the envelope that changed. |
| Previous Status     | string | The previous status of the envelope. |
| New Status          | string | The new status of the envelope.      |
| Email Subject       | string | The subject line of the envelope.    |
| Status Changed Date | string | When the status changed.             |
| Envelope Data       | string | Full envelope data as JSON.          |

#### On Recipient Completed

Trigger when a recipient completes signing a DocuSign envelope. Optionally filter to a specific envelope.

**Configuration**

| Field               | Type            | Required | Description                                                                                                                           |
| ------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Envelope (optional) | select (string) | No       | Watch a specific envelope. Leave blank to watch all envelopes. Options load from the selected connection.                             |
| Template (optional) | select (string) | No       | Only watch envelopes created from a specific template. Leave blank to watch all envelopes. Options load from the selected connection. |

**Event inputs**

| Field             | Type   | Required | Description                                                           |
| ----------------- | ------ | -------- | --------------------------------------------------------------------- |
| Envelope ID       | string | Yes      | The envelope the recipient signed. Default: .                         |
| Recipient Email   | string | Yes      | Email of the recipient who completed signing. Default: .              |
| Recipient Name    | string | Yes      | Name of the recipient who completed signing. Default: .               |
| Signed Date       | string | Yes      | When the recipient completed signing. Default: .                      |
| Email Subject     | string | No       | The subject line of the envelope.                                     |
| Envelope Status   | string | Yes      | Current status of the envelope. Default: .                            |
| Tab Values (JSON) | string | No       | Field values filled in by the recipient, as a JSON string. Default: . |

**Outputs**

| Field             | Type   | Description                                                |
| ----------------- | ------ | ---------------------------------------------------------- |
| Envelope ID       | string | The envelope the recipient signed.                         |
| Recipient Email   | string | Email of the recipient who completed signing.              |
| Recipient Name    | string | Name of the recipient who completed signing.               |
| Signed Date       | string | When the recipient completed signing.                      |
| Email Subject     | string | The subject line of the envelope.                          |
| Envelope Status   | string | Current status of the envelope.                            |
| Tab Values (JSON) | string | Field values filled in by the recipient, as a JSON string. |

### Important behavior

If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/docusign.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
