> 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 URL to Docusign eSignature web application

POST https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/views/console
Content-Type: application/json

Returns a URL that enables you to embed the Docusign UI in your applications. To view a specific envelope, set the `envelopeId` property in the request body.

## Information security notice

This method provides full access to the sending account.

### Related topics

- [How to embed the Docusign UI in your app](/docs/esign-rest-api/how-to/embed-ui/)

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createconsole

## 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.

### Body (application/json)

This endpoint expects a consoleViewRequest.

- `envelopeId` (string, optional) — The ID of an envelope. If the envelope has been sent, the endpoint returns a URL for a view of the documents. If the envelope has not yet been sent, the endpoint returns a URL for the sender view. This property is optional. If no value is provided, the endpoint returns a URL for the front page of the demo UI.
- `returnUrl` (string, optional) — The URL to which the user should be redirected. This is only used when the `envelopeId` is specified as a draft envelope. In this case, the endpoint returns a URL for the sender view. When the user exits the sender view, they will be redirected to the `returnUrl` value. If no value is provided, there is no option to leave the sender view. In other cases, the user is not redirected out of the console view.

## Response

### 201

Successful response.

- `url` (string, optional) — URL for the template edit view.

## 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.

## Examples

### Getting a Console View URL and Setting a Return URL

**Request**

```json
{
  "returnUrl": "https://dsapp.example.com/return/from/console/view"
}
```

**Response**

```json
{
  "url": "https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=644ea697-xxxx-xxxx-xxxx-d95a5c23340b&accountid=624e3e00-xxxx-xxxx-xxxx-43918c520dab"
}
```

### Generic JSON Request/Response

**Request**

```json
{
  "envelopeId": "sample string 1",
  "returnUrl": "sample string 2"
}
```

**Response**

```json
{
  "url": "sample string 1"
}
```