> 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

# Get templates used in envelope

GET https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/templates

This returns a list of the server-side templates, their name and ID, used in an envelope.


Reference: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopetemplates/list

## Authentication

- `Authorization` header (required) (prefixed with ` Bearer  `) — OAuth 2.0 access token (JWT or auth-code grant). Sent as `Authorization: Bearer <token>` on every request except `GET /v2.1` and `GET /service_information`, which are public discovery endpoints.

## Servers

- `https://demo.docusign.net/restapi` (Demo, default)
- `https://www.docusign.net/restapi` (Production)

## Request

### Path parameters

- `accountId` (string, required) — The external account number (int) or account ID Guid.
- `envelopeId` (string, required) — The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`

### Query parameters

- `include` (string, optional) — Filters the results by template type. Valid values: - `applied`: Returns the templates applied to an envelope. - `matching`: Returns the [matching templates](https://support.docusign.com/s/document-item?language=en_US&bundleId=jux1643235969954&topicId=far1578456612069.html&_LANG=enus) for an envelope. **Note**: The matching templates that are returned do not include templates shared with me only via shared folders. If the template has been shared to the user individually, or if it has been shared to a member group to which the user belongs, then it will show up in matching The default value is `applied`.

## Response

### 200

Successful response.

- `templates` (list of templateSummary, optional) — An array of `templateSummary` objects that contain information about templates.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Types

### templateSummary

Summary of a template request.

- `applied` (string, optional) — Reserved for Docusign.
- `documentId` (string, optional) — Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
- `documentName` (string, optional) — The name of the document.
- `errorDetails` (errorDetails, optional) — This object describes errors that occur. It is only valid for responses, and ignored in requests.
- `name` (string, optional) — The name of the template.
- `templateId` (string, optional) — The unique identifier of the template. If this is not provided, DocuSign will generate a value.
- `templateMatch` (templateMatch, optional)
- `uri` (string, optional) — A URI containing the user ID.

### errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

### templateMatch

- `documentEndPage` (string, optional)
- `documentStartPage` (string, optional)
- `matchPercentage` (string, optional)

## Examples

**Response**

```json
{
  "templates": [
    {
      "applied": "sample string 1",
      "documentId": "sample string 2",
      "documentName": "sample string 3",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      },
      "name": "sample string 4",
      "templateId": "sample string 5",
      "templateMatch": {
        "documentEndPage": "sample string 1",
        "documentStartPage": "sample string 2",
        "matchPercentage": "sample string 3"
      },
      "uri": "sample string 6"
    }
  ]
}
```