> 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 send an envelope via your app

> Demonstrates how to embed the Docusign UI in your web app to finalize or update the envelope and documents before they are sent.

eSignature REST API 2.1 only

This topic demonstrates how to embed the Docusign Sender UI within your web app. For the best user experience, Docusign recommends using the API to construct draft envelopes and add recipients and tabs to those envelopes. After envelopes have been created, the Sender View enables your app’s users to edit the tabs, documents, recipients, and other envelope settings within your app before sending them out for approval.

**Important**: This example requires that you have created an envelope with `created` status or implemented the code from the [embedded signing how-to](/docs/esign-rest-api/how-to/request-signature-in-app-embedded), to generate a new envelope with `created` status.

> **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.            |
| \{CC_RECIPIENT_EMAIL} | A string value for the email address of the carbon copy recipient.                                                                                                                                                                                                                                                                |
| \{CC_RECIPIENT_NAME}  | A string value for the name of the carbon copy recipient.                                                                                                                                                                                                                                                                         |
| Return URL            | A URL to which the user will be forwarded after signing is complete.                                                                                                                                                                                                                                                              |
| \{SIGNER_EMAIL}       | A string value for the email address where the signer will receive a notification of the signing request.                                                                                                                                                                                                                         |
| \{SIGNER_NAME}        | A string value for the full name of the signer.                                                                                                                                                                                                                                                                                   |
| \{STARTING_VIEW}      | The starting view value determines where the web app will open. You can set the `starting_view` to a specific envelope ID to open the web app to view that envelope or with the embedded console, you can choose to route a user to a specific envelope ID, if available, or to the front page of Docusign eSignature by default. |

## Step 1. Obtain your OAuth token

To make the API calls 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. Create the envelope

Use the following steps to create the envelope:

* Instantiate the Docusign API client.
* Set the following default request header to add your access token. `"Authorization" : "Bearer {ACCESS_TOKEN}"`
* Initialize the Envelopes API.
* Create a new draft envelope and set the `status` property to `created`.

> **Important:** This how-to draws on the code defined in the embedded signing how-to (which is part of the same code example launcher) to generate a new envelope with `created` status.

**`Bash`**

```bash title="Bash"
# temp files:
request_data=$(mktemp /tmp/request-eg-011.XXXXXX)
response=$(mktemp /tmp/response-eg-011.XXXXXX)
doc1_base64=$(mktemp /tmp/eg-011-doc1.XXXXXX)
doc2_base64=$(mktemp /tmp/eg-011-doc2.XXXXXX)
doc3_base64=$(mktemp /tmp/eg-011-doc3.XXXXXX)

# Fetch docs and encode
cat demo_documents/doc_1.html | base64 > $doc1_base64
cat demo_documents/World_Wide_Corp_Battle_Plan_Trafalgar.docx | base64 > $doc2_base64
cat demo_documents/World_Wide_Corp_lorem.pdf | base64 > $doc3_base64

echo ""
echo "Sending the envelope request to DocuSign..."
echo "The envelope has three documents. Processing time will be about 15 seconds."
echo "Results:"
echo ""

# Concatenate the different parts of the request
printf \
'{
    "emailSubject": "Please sign this document set",
    "documents": [
        {
            "documentBase64": "' > $request_data
            cat $doc1_base64 >> $request_data
            printf '",
            "name": "Order acknowledgement",
            "fileExtension": "html", "documentId": "1"
        },
        {
            "documentBase64": "' >> $request_data
            cat $doc2_base64 >> $request_data
            printf '",
            "name": "Battle Plan",
            "fileExtension": "docx", "documentId": "2"
        },
        {
            "documentBase64": "' >> $request_data
            cat $doc3_base64 >> $request_data
            printf '",
            "name": "Lorem Ipsum",
            "fileExtension": "pdf", "documentId": "3"
        }
    ],
    "recipients": {
        "carbonCopies": [
            {
                "email": "'${CC_EMAIL}'", "name": "'"${CC_NAME}"'",
                "recipientId": "2", "routingOrder": "2"
            }
        ],
        "signers": [
            {
                "email": "'${SIGNER_EMAIL}'", "name": "'"${SIGNER_NAME}"'",
                "recipientId": "1", "routingOrder": "1",
                "tabs": {
                    "signHereTabs": [
                        {
                            "anchorString": "**signature_1**",
                            "anchorUnits": "pixels", "anchorXOffset": "20",
                            "anchorYOffset": "10"
                        },
                        {
                            "anchorString": "/sn1/",
                            "anchorUnits": "pixels", "anchorXOffset": "20",
                            "anchorYOffset": "10"
                        }
                    ]
                }
            }
        ]
    },
    "status": "created"
}' >> $request_data

curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
     --header "Content-Type: application/json" \
     --data-binary @${request_data} \
     --request POST ${base_path}/v2.1/accounts/${account_id}/envelopes \
     --output $response

echo ""
cat $response
```

**`C#`**

```csharp title="C#"
var docuSignClient = new DocuSignClient(basePath);
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
EnvelopesApi envelopesApi = new EnvelopesApi(docuSignClient);

// Step 2. Make the envelope with "created" (draft) status
EnvelopeDefinition env = MakeEnvelope(signerEmail, signerName, ccEmail, ccName, docDocx, docPdf, "created");
var results = envelopesApi.CreateEnvelopeWithHttpInfo(accountId, env);
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);
}

string envelopeId = results.Data.EnvelopeId;
        private static EnvelopeDefinition MakeEnvelope(string signerEmail, string signerName, string ccEmail, string ccName, string docDocx, string docPdf, string envStatus)
        {
// Data for this method
// signerEmail
// signerName
// ccEmail
// ccName
// Config.docDocx
// Config.docPdf
// RequestItemsService.Status -- the envelope status ('created' or 'sent')

// document 1 (html) has tag **signature_1**
// document 2 (docx) has tag /sn1/
// document 3 (pdf) has tag /sn1/
//
// The envelope has two recipients.
// recipient 1 - signer
// recipient 2 - cc
// The envelope will be sent first to the signer.
// After it is signed, a copy is sent to the cc person.
// read files from a local directory
// The reads could raise an exception if the file is not available!
string doc2DocxBytes = Convert.ToBase64String(System.IO.File.ReadAllBytes(docDocx));
string doc3PdfBytes = Convert.ToBase64String(System.IO.File.ReadAllBytes(docPdf));

// create the envelope definition
EnvelopeDefinition env = new EnvelopeDefinition();
env.EmailSubject = "Please sign this document set";

// Create document objects, one per document
Document doc1 = new Document();
string b64 = Convert.ToBase64String(Document1(signerEmail, signerName, ccEmail, ccName));
doc1.DocumentBase64 = b64;
doc1.Name = "Order acknowledgement"; // can be different from actual file name
doc1.FileExtension = "html"; // Source data format. Signed docs are always pdf.
doc1.DocumentId = "1"; // a label used to reference the doc
Document doc2 = new Document
{
    DocumentBase64 = doc2DocxBytes,
    Name = "Battle Plan", // can be different from actual file name
    FileExtension = "docx",
    DocumentId = "2",
};
Document doc3 = new Document
{
    DocumentBase64 = doc3PdfBytes,
    Name = "Lorem Ipsum", // can be different from actual file name
    FileExtension = "pdf",
    DocumentId = "3",
};

// The order in the docs array determines the order in the envelope
env.Documents = new List<Document> { doc1, doc2, doc3 };

// create a signer recipient to sign the document, identified by name and email
// We're setting the parameters via the object creation
Signer signer1 = new Signer
{
    Email = signerEmail,
    Name = signerName,
    RecipientId = "1",
    RoutingOrder = "1",
};

// routingOrder (lower means earlier) determines the order of deliveries
// to the recipients. Parallel routing order is supported by using the
// same integer as the order for two or more recipients.

// create a cc recipient to receive a copy of the documents, identified by name and email
// We're setting the parameters via setters
CarbonCopy cc1 = new CarbonCopy
{
    Email = ccEmail,
    Name = ccName,
    RecipientId = "2",
    RoutingOrder = "2",
};

// Create signHere fields (also known as tabs) on the documents,
// We're using anchor (autoPlace) positioning
//
// The DocuSign platform searches throughout your envelope's
// documents for matching anchor strings. So the
// signHere2 tab will be used in both document 2 and 3 since they
// use the same anchor string for their "signer 1" tabs.
SignHere signHere1 = new SignHere
{
    AnchorString = "**signature_1**",
    AnchorUnits = "pixels",
    AnchorYOffset = "10",
    AnchorXOffset = "20",
};

SignHere signHere2 = new SignHere
{
    AnchorString = "/sn1/",
    AnchorUnits = "pixels",
    AnchorYOffset = "10",
    AnchorXOffset = "20",
};

// Tabs are set per recipient / signer
Tabs signer1Tabs = new Tabs
{
    SignHereTabs = new List<SignHere> { signHere1, signHere2 },
};
signer1.Tabs = signer1Tabs;

// Add the recipients to the envelope object
Recipients recipients = new Recipients
{
    Signers = new List<Signer> { signer1 },
    CarbonCopies = new List<CarbonCopy> { cc1 },
};
env.Recipients = recipients;

// Request that the envelope be sent by setting |status| to "sent".
// To request that the envelope be created as a draft, set to "created"
env.Status = envStatus;

return env;
        }

        private static byte[] Document1(string signerEmail, string signerName, string ccEmail, string ccName)
        {
// Data for this method
// signerEmail
// signerName
// ccEmail
// ccName
return Encoding.UTF8.GetBytes(
" <!DOCTYPE html>\n" +
    "    <html>\n" +
    "        <head>\n" +
    "          <meta charset=\"UTF-8\">\n" +
    "        </head>\n" +
    "        <body style=\"font-family:sans-serif;margin-left:2em;\">\n" +
    "        <h1 style=\"font-family: 'Trebuchet MS', Helvetica, sans-serif;\n" +
    "            color: darkblue;margin-bottom: 0;\">World Wide Corp</h1>\n" +
    "        <h2 style=\"font-family: 'Trebuchet MS', Helvetica, sans-serif;\n" +
    "          margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;\n" +
    "          color: darkblue;\">Order Processing Division</h2>\n" +
    "        <h4>Ordered by " + signerName + "</h4>\n" +
    "        <p style=\"margin-top:0em; margin-bottom:0em;\">Email: " + signerEmail + "</p>\n" +
    "        <p style=\"margin-top:0em; margin-bottom:0em;\">Copy to: " + ccName + ", " + ccEmail + "</p>\n" +
    "        <p style=\"margin-top:3em;\">\n" +
    "  Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie. Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée. Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice. Donut jujubes oat cake jelly-o. Dessert bear claw chocolate cake gummies lollipop sugar plum ice cream gummies cheesecake.\n" +
    "        </p>\n" +
    "        <!-- Note the anchor tag for the signature field is in white. -->\n" +
    "        <h3 style=\"margin-top:3em;\">Agreed: <span style=\"color:white;\">**signature_1**/</span></h3>\n" +
    "        </body>\n" +
    "    </html>");
        }
```

**`Java`**

```java title="Java"
public static EnvelopeSummary createEnvelopeWithDraftStatus(
        EnvelopesApi envelopesApi,
        String signerEmail,
        String signerName,
        String ccEmail,
        String ccName,
        String status,
        WorkArguments args,
        String accountId) throws IOException, ApiException {
    args.setStatus(EnvelopeHelpers.ENVELOPE_STATUS_CREATED);
    EnvelopeDefinition env = SigningViaEmailService.makeEnvelope(
            signerEmail,
            signerName,
            ccEmail,
            ccName,
            status,
            args);
    var createEnvelope = envelopesApi.createEnvelopeWithHttpInfo(accountId, env,
            envelopesApi.new CreateEnvelopeOptions());
    Map<String, List<String>> headers = createEnvelope.getHeaders();
    java.util.List<String> remaining = headers.get("X-RateLimit-Remaining");
    java.util.List<String> reset = headers.get("X-RateLimit-Reset");

    if (remaining != null & reset != null) {
        Instant resetInstant = Instant.ofEpochSecond(Long.parseLong(reset.get(0)));
        System.out.println("API calls remaining: " + remaining);
        System.out.println("Next Reset: " + resetInstant);
    }
    return createEnvelope.getData();
}
```

**`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);

// Make the envelope with "created" (draft) status
args.envelopeArgs.status = 'created'; // We want a draft envelope

let envelope = makeEnvelope(args.envelopeArgs);

let results = await envelopesApi.createEnvelope(args.accountId, {
  envelopeDefinition: envelope,
}, (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()}`);
    }
});
let envelopeId = results.data.envelopeId;

let viewRequest = makeSenderViewRequest(args.envelopeArgs);
// Call the CreateSenderView API
// Exceptions will be caught by the calling function
results = await envelopesApi.createSenderView(args.accountId, envelopeId, {
  envelopeViewRequest: viewRequest,
}, (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()}`);
    }
});

// Switch to Recipient and Documents view if requested by the user
let url = results.data.url;
console.log(`startingView: ${args.envelopeArgs.startingView}`);

return { envelopeId: envelopeId, redirectUrl: url };
};

function makeEnvelope(args) {
// Data for this method
// args.signerEmail
// args.signerName
// args.ccEmail
// args.ccName
// args.status
// doc2File
// doc3File

// document 1 (html) has tag **signature_1**
// document 2 (docx) has tag /sn1/
// document 3 (pdf) has tag /sn1/
//
// The envelope has two recipients.
// recipient 1 - signer
// recipient 2 - cc
// The envelope will be sent first to the signer.
// After it is signed, a copy is sent to the cc person.

let doc2DocxBytes, doc3PdfBytes;
// read files from a local directory
// The reads could raise an exception if the file is not available!
doc2DocxBytes = fs.readFileSync(args.doc2File);
doc3PdfBytes = fs.readFileSync(args.doc3File);

// create the envelope definition
let env = new docusign.EnvelopeDefinition();
env.emailSubject = 'Please sign this document set';

// add the documents
let doc1 = new docusign.Document();
  let doc1b64 = Buffer.from(document1(args)).toString('base64');
  let doc2b64 = Buffer.from(doc2DocxBytes).toString('base64');
  let doc3b64 = Buffer.from(doc3PdfBytes).toString('base64');
doc1.documentBase64 = doc1b64;
doc1.name = 'Order acknowledgement'; // can be different from actual file name
doc1.fileExtension = 'html'; // Source data format. Signed docs are always pdf.
doc1.documentId = '1'; // a label used to reference the doc

// Alternate pattern: using constructors for docs 2 and 3...
let doc2 = new docusign.Document.constructFromObject({
  documentBase64: doc2b64,
  name: 'Battle Plan', // can be different from actual file name
  fileExtension: 'docx',
  documentId: '2',
});

let doc3 = new docusign.Document.constructFromObject({
  documentBase64: doc3b64,
  name: 'Lorem Ipsum', // can be different from actual file name
  fileExtension: 'pdf',
  documentId: '3',
});

// The order in the docs array determines the order in the envelope
env.documents = [doc1, doc2, doc3];

// create a signer recipient to sign the document, identified by name and email
// We're setting the parameters via the object constructor
let signer1 = docusign.Signer.constructFromObject({
  email: args.signerEmail,
  name: args.signerName,
  recipientId: '1',
  routingOrder: '1',
});
// routingOrder (lower means earlier) determines the order of deliveries
// to the recipients. Parallel routing order is supported by using the
// same integer as the order for two or more recipients.

// create a cc recipient to receive a copy of the documents, identified by name and email
// We're setting the parameters via setters
let cc1 = new docusign.CarbonCopy();
cc1.email = args.ccEmail;
cc1.name = args.ccName;
cc1.routingOrder = '2';
cc1.recipientId = '2';

// Create signHere fields (also known as tabs) on the documents,
// We're using anchor (autoPlace) positioning
//
// The DocuSign platform searches throughout your envelope's
// documents for matching anchor strings. So the
// signHere2 tab will be used in both document 2 and 3 since they
// use the same anchor string for their "signer 1" tabs.
let signHere1 = docusign.SignHere.constructFromObject({
    anchorString: '**signature_1**',
    anchorYOffset: '10',
    anchorUnits: 'pixels',
    anchorXOffset: '20',
  });
  let signHere2 = docusign.SignHere.constructFromObject({
    anchorString: '/sn1/',
    anchorYOffset: '10',
    anchorUnits: 'pixels',
    anchorXOffset: '20',
  });
// Tabs are set per recipient / signer
let signer1Tabs = docusign.Tabs.constructFromObject({
  signHereTabs: [signHere1, signHere2],
});
signer1.tabs = signer1Tabs;

// Add the recipients to the envelope object
let recipients = docusign.Recipients.constructFromObject({
  signers: [signer1],
  carbonCopies: [cc1],
});
env.recipients = recipients;

// Request that the envelope be sent by setting |status| to "sent".
// To request that the envelope be created as a draft, set to "created"
env.status = args.status;

return env;
}
```

**`PHP`**

```php title="PHP"
# Create the envelope as a draft using eg002's worker
# Exceptions will be caught by the calling function
$args['envelope_args']['status'] = 'created';
$demoDocsPath = SigningViaEmailService::signingViaEmail($args, $clientService, $demoDocsPath, $docxFile, $pdfFile);
$envelope_id = $demoDocsPath['envelope_id'];
```

**`PowerShell`**

```text title="PowerShell"
# temp files:
$requestData = New-TemporaryFile
$senderViewRequestData = New-TemporaryFile
$response = New-TemporaryFile
$doc1Base64 = New-TemporaryFile
$doc2Base64 = New-TemporaryFile
$doc3Base64 = New-TemporaryFile

# Fetch docs and encode
$doc1String = [System.IO.File]::ReadAllText((Resolve-Path ".\demo_documents\doc_1.html"))
$doc1String = $doc1String.Replace("{USER_EMAIL}", $SIGNER_EMAIL)
$doc1String = $doc1String.Replace("{USER_FULLNAME}", $SIGNER_NAME)
$doc1String = $doc1String.Replace("{CC_EMAIL}", $CC_EMAIL)
$doc1String = $doc1String.Replace("{CC_NAME}", $CC_NAME)
[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($doc1String)) > $doc1Base64
[Convert]::ToBase64String([System.IO.File]::ReadAllBytes((Resolve-Path ".\demo_documents\World_Wide_Corp_Battle_Plan_Trafalgar.docx"))) > $doc2Base64
[Convert]::ToBase64String([System.IO.File]::ReadAllBytes((Resolve-Path ".\demo_documents\World_Wide_Corp_lorem.pdf"))) > $doc3Base64

Write-Output "Sending the envelope request to Docusign..."
Write-Output "The envelope has three documents. Processing time will be about 15 seconds."
Write-Output "Results:"

@{
    emailSubject = "Please sign this document set";
    documents    = @(
        @{
            documentBase64 = "$(Get-Content $doc1Base64)";
            name           = "Order acknowledgement";
            fileExtension  = "html";
            documentId     = "1";
        };
        @{
            documentBase64 = "$(Get-Content $doc2Base64)";
            name           = "Battle Plan";
            fileExtension  = "docx";
            documentId     = "2";
        };
        @{
            documentBase64 = "$(Get-Content $doc3Base64)";
            name           = "Lorem Ipsum";
            fileExtension  = "pdf";
            documentId     = "3";
        }; );
    recipients   = @{
        carbonCopies = @(
            @{
                email        = $CC_EMAIL;
                name         = $CC_NAME;
                recipientId  = "2";
                routingOrder = "2";
            };
        );
        signers      = @(
            @{
                email        = $SIGNER_EMAIL;
                name         = $SIGNER_NAME;
                recipientId  = "1";
                routingOrder = "1";
                tabs         = @{
                    signHereTabs = @(
                        @{
                            anchorString  = "**signature_1**";
                            anchorUnits   = "pixels";
                            anchorXOffset = "20";
                            anchorYOffset = "10";
                        };
                        @{
                            anchorString  = "/sn1/";
                            anchorUnits   = "pixels";
                            anchorXOffset = "20";
                            anchorYOffset = "10";
                        };
                    );
                };
            };
        );
    };
    status       = "created";
} | ConvertTo-Json -Depth 32 >> $requestData

Invoke-RestMethod `
    -Uri "${apiUri}/v2.1/accounts/${accountId}/envelopes" `
    -Method 'POST' `
    -Headers @{
    'Authorization' = "Bearer $accessToken";
    'Content-Type'  = "application/json";
} `
    -InFile (Resolve-Path $requestData).Path `
    -OutFile $response
```

**`Python`**

```python title="Python"
def create_envelope(cls, args, doc_docx_path, doc_pdf_path):
    envelope_args = args["envelope_args"]
    # Create the envelope request object
    envelope_definition = cls.make_envelope(envelope_args, doc_docx_path, doc_pdf_path)
    api_client = create_api_client(base_path=args["base_path"], access_token=args["access_token"])
    # Call Envelopes::create API method
    # Exceptions will be caught by the calling function
    envelopes_api = EnvelopesApi(api_client)
    (envelope, status, headers) = envelopes_api.create_envelope_with_http_info(account_id=args["account_id"], envelope_definition=envelope_definition)

    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 envelope

@classmethod
def make_envelope(cls, args, doc_docx_path, doc_pdf_path):
    """
    Creates envelope
    Document 1: An HTML document.
    Document 2: A Word .docx document.
    Document 3: A PDF document.
    DocuSign will convert all of the documents to the PDF format.
    The recipients" field tags are placed using <b>anchor</b> strings.
    """

    # document 1 (html) has sign here anchor tag **signature_1**
    # document 2 (docx) has sign here anchor tag /sn1/
    # document 3 (pdf)  has sign here anchor tag /sn1/
    #
    # The envelope has two recipients.
    # recipient 1 - signer
    # recipient 2 - cc
    # The envelope will be sent first to the signer.
    # After it is signed, a copy is sent to the cc person.

    # create the envelope definition
    env = EnvelopeDefinition(
        email_subject="Please sign this document set"
    )
    doc1_b64 = base64.b64encode(bytes(cls.create_document1(args), "utf-8")).decode("ascii")
    # read files 2 and 3 from a local directory
    # The reads could raise an exception if the file is not available!
    with open(path.join(demo_docs_path, doc_docx_path), "rb") as file:
        doc2_docx_bytes = file.read()
    doc2_b64 = base64.b64encode(doc2_docx_bytes).decode("ascii")
    with open(path.join(demo_docs_path, doc_pdf_path), "rb") as file:
        doc3_pdf_bytes = file.read()
    doc3_b64 = base64.b64encode(doc3_pdf_bytes).decode("ascii")

    # Create the document models
    document1 = Document(  # create the DocuSign document object
        document_base64=doc1_b64,
        name="Order acknowledgement",  # can be different from actual file name
        file_extension="html",  # many different document types are accepted
        document_id="1"  # a label used to reference the doc
    )
    document2 = Document(  # create the DocuSign document object
        document_base64=doc2_b64,
        name="Battle Plan",  # can be different from actual file name
        file_extension="docx",  # many different document types are accepted
        document_id="2"  # a label used to reference the doc
    )
    document3 = Document(  # create the DocuSign document object
        document_base64=doc3_b64,
        name="Lorem Ipsum",  # can be different from actual file name
        file_extension="pdf",  # many different document types are accepted
        document_id="3"  # a label used to reference the doc
    )
    # The order in the docs array determines the order in the envelope
    env.documents = [document1, document2, document3]

    # Create the signer recipient model
    signer1 = Signer(
        email=args["signer_email"],
        name=args["signer_name"],
        recipient_id="1",
        routing_order="1"
    )
    # routingOrder (lower means earlier) determines the order of deliveries
    # to the recipients. Parallel routing order is supported by using the
    # same integer as the order for two or more recipients.

    # create a cc recipient to receive a copy of the documents
    cc1 = CarbonCopy(
        email=args["cc_email"],
        name=args["cc_name"],
        recipient_id="2",
        routing_order="2"
    )

    # Create signHere fields (also known as tabs) on the documents,
    # We"re using anchor (autoPlace) positioning
    #
    # The DocuSign platform searches throughout your envelope"s
    # documents for matching anchor strings. So the
    # signHere2 tab will be used in both document 2 and 3 since they
    # use the same anchor string for their "signer 1" tabs.
    sign_here1 = SignHere(
        anchor_string="**signature_1**",
        anchor_units="pixels",
        anchor_y_offset="10",
        anchor_x_offset="20"
    )

    sign_here2 = SignHere(
        anchor_string="/sn1/",
        anchor_units="pixels",
        anchor_y_offset="10",
        anchor_x_offset="20"
    )

    # Add the tabs model (including the sign_here tabs) to the signer
    # The Tabs object wants arrays of the different field/tab types
    signer1.tabs = Tabs(sign_here_tabs=[sign_here1, sign_here2])

    # Add the recipients to the envelope object
    recipients = Recipients(signers=[signer1], carbon_copies=[cc1])
    env.recipients = recipients

    # Request that the envelope be sent by setting |status| to "sent".
    # To request that the envelope be created as a draft, set to "created"
    env.status = args["status"]

    return env

@classmethod
def create_document1(cls, args):
    """ Creates document 1 -- an html document"""

    return f"""
    <!DOCTYPE html>
    <html>
        <head>
          <meta charset="UTF-8">
        </head>
        <body style="font-family:sans-serif;margin-left:2em;">
        <h1 style="font-family: "Trebuchet MS", Helvetica, sans-serif;
            color: darkblue;margin-bottom: 0;">World Wide Corp</h1>
        <h2 style="font-family: "Trebuchet MS", Helvetica, sans-serif;
          margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;
          color: darkblue;">Order Processing Division</h2>
        <h4>Ordered by {args["signer_name"]}</h4>
        <p style="margin-top:0em; margin-bottom:0em;">Email: {args["signer_email"]}</p>
        <p style="margin-top:0em; margin-bottom:0em;">Copy to: {args["cc_name"]}, {args["cc_email"]}</p>
        <p style="margin-top:3em;">
            Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie.
            Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée.
            Gummi bears cupcake biscuit tiramisu sugar plum pastry. Dragée gummies applicake pudding liquorice.
            Donut jujubes oat cake jelly-o.
            Dessert bear claw chocolate cake gummies lollipop sugar plum ice cream gummies cheesecake.
        </p>
        <!-- Note the anchor tag for the signature field is in white. -->
        <h3 style="margin-top:3em;">Agreed: <span style="color:white;">**signature_1**/</span></h3>
        </body>
    </html>
    """
```

**`Ruby`**

```ruby title="Ruby"
results = create_envelope(args)
envelope_id = results['envelope_id']
```

## Step 3. Create the sender view

To create the sender view, first create an `EnvelopeViewRequest` object. This object contains the return URL to which the sender will be directed after they have sent the envelope. The `viewAccess` property is also required for this object and should be set to `"envelope"`. The `EnvelopeSettingsView` object contains UX settings for the sender view. See [EnvelopeViews:createSender](/docs/esign-rest-api/reference/envelopes/envelopeviews/createsender) for details on all of these settings.

Next, call the [EnvelopeViews:createSender](/docs/esign-rest-api/reference/envelopes/envelopeviews/createsender) method with your API account ID, the ID of the draft envelope, and the `EnvelopeViewRequest` object. The code will return the URL for the embedded sending session at your requested starting view.

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

**`Bash`**

```bash title="Bash"
# pull out the envelopeId
envelope_id=`cat $response | grep envelopeId | sed 's/.*\"envelopeId\":\"//' | sed 's/\",.*//'`

echo ""
echo "Requesting the sender view url"

sender_view_request_data=$(mktemp /tmp/request-eg-002.XXXXXX)

printf \
'{
    "returnUrl": "http://httpbin.org/get",
    "viewAccess": "envelope",
    "settings": {
        "startingScreen": "'${starting_view}'",
        "sendButtonAction": "send",
        "showBackButton": "false",
        "backButtonAction": "previousPage",
        "showHeaderActions": "false",
        "showDiscardAction": "false",
        "lockToken": "",
        "recipientSettings": {
            "showEditRecipients": "false",
            "showContactsList": "false"
        },
        "documentSettings": {
            "showEditDocuments": "false",
            "showEditDocumentVisibility": "false",
            "showEditPages": "false"
        },
        "taggerSettings": {
            "paletteSections": "default",
            "paletteDefault": "custom"
        },
        "templateSettings": {
            "showMatchingTemplatesPrompt": "true"
        }
    }
}' >> $sender_view_request_data

# The returnUrl is normally your own web app. DocuSign will redirect
# the signer to returnUrl when the embedded sending completes.
# For this example, we'll use http://httpbin.org/get to show the
# query parameters passed back from DocuSign
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
     --header "Content-Type: application/json" \
     --data-binary @${sender_view_request_data} \
     --request POST ${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}/views/sender \
     --output $response

echo ""
cat $response
sending_url=`cat $response | grep url | sed 's/.*\"url\":\"//' | sed 's/\".*//'`
```

**`C#`**

```csharp title="C#"
EnvelopeViewRequest viewRequest = PrepareViewRequest(startingView, returnUrl);

var result1 = envelopesApi.CreateSenderViewWithHttpInfo(accountId, envelopeId, viewRequest);
result1.Headers.TryGetValue("X-RateLimit-Remaining", out remaining);
result1.Headers.TryGetValue("X-RateLimit-Reset", out 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);
}

// Switch to Recipient and Documents view if requested by the user
string redirectUrl = result1.Data.Url;
Console.WriteLine("startingView: " + startingView);
if ("recipient".Equals(startingView))
{
    redirectUrl = redirectUrl.Replace("send=1", "send=0");
}

        private static EnvelopeViewRequest PrepareViewRequest(string startingView, string returnUrl)
        {
EnvelopeViewSettings viewSettings = new EnvelopeViewSettings
{
    StartingScreen = startingView,
    SendButtonAction = "send",
    ShowBackButton = "false",
    BackButtonAction = "previousPage",
    ShowHeaderActions = "false",
    ShowDiscardAction = "false",
    LockToken = string.Empty,
    RecipientSettings = new EnvelopeViewRecipientSettings
    {
        ShowEditRecipients = "false",
        ShowContactsList = "false",
    },
    DocumentSettings = new EnvelopeViewDocumentSettings
    {
        ShowEditDocuments = "false",
        ShowEditDocumentVisibility = "false",
        ShowEditPages = "false",
    },
    TaggerSettings = new EnvelopeViewTaggerSettings
    {
        PaletteSections = "default",
        PaletteDefault = "custom",
    },
    TemplateSettings = new EnvelopeViewTemplateSettings
    {
        ShowMatchingTemplatesPrompt = "true",
    },
};

EnvelopeViewRequest viewRequest = new EnvelopeViewRequest
{
    ReturnUrl = returnUrl,
    ViewAccess = "envelope",
    Settings = viewSettings,
};
return viewRequest;
        }
```

**`Java`**

```java title="Java"
public static ViewUrl createSenderView(
        EnvelopesApi envelopesApi,
        String accountId,
        String envelopeId,
        String dsReturnUrl,
        String startingScreen) throws ApiException {
    // Create the sender view.
    // Set the url where you want the recipient to go once they are done
    // signing should typically be a callback route somewhere in your app.
    EnvelopeViewRecipientSettings recipientSettings = new EnvelopeViewRecipientSettings();
    recipientSettings.setShowEditRecipients("false");
    recipientSettings.setShowContactsList("false");

    EnvelopeViewDocumentSettings documentSettings = new EnvelopeViewDocumentSettings();
    documentSettings.setShowEditDocuments("false");
    documentSettings.setShowEditDocumentVisibility("false");
    documentSettings.setShowEditPages("false");

    EnvelopeViewTaggerSettings taggerSettings = new EnvelopeViewTaggerSettings();
    taggerSettings.setPaletteSections("default");
    taggerSettings.setPaletteDefault("custom");

    EnvelopeViewTemplateSettings templateSettings = new EnvelopeViewTemplateSettings();
    templateSettings.setShowMatchingTemplatesPrompt("true");

    EnvelopeViewSettings viewSettings = new EnvelopeViewSettings();
    viewSettings.setStartingScreen(startingScreen);
    viewSettings.setSendButtonAction("send");
    viewSettings.setShowBackButton("false");
    viewSettings.setBackButtonAction("previousPage");
    viewSettings.setShowHeaderActions("false");
    viewSettings.setShowDiscardAction("false");
    viewSettings.setLockToken("");
    viewSettings.setRecipientSettings(recipientSettings);
    viewSettings.setDocumentSettings(documentSettings);
    viewSettings.setTaggerSettings(taggerSettings);
    viewSettings.setTemplateSettings(templateSettings);

    EnvelopeViewRequest viewRequest = new EnvelopeViewRequest();
    viewRequest.setReturnUrl(dsReturnUrl);
    viewRequest.setViewAccess("envelope");
    viewRequest.setSettings(viewSettings);

    var senderViewResponse = envelopesApi.createSenderViewWithHttpInfo(accountId, envelopeId, viewRequest);
    Map<String, List<String>> headers = senderViewResponse.getHeaders();
    java.util.List<String> remaining = headers.get("X-RateLimit-Remaining");
    java.util.List<String> reset = headers.get("X-RateLimit-Reset");

    if (remaining != null & reset != null) {
        Instant resetInstant = Instant.ofEpochSecond(Long.parseLong(reset.get(0)));
        System.out.println("API calls remaining: " + remaining);
        System.out.println("Next Reset: " + resetInstant);
    }
    return senderViewResponse.getData();
}
```

**`Node.js`**

```javascript title="Node.js"
function makeSenderViewRequest(args) {
  // Data for this method
  // args.dsReturnUrl

  // Set the url where you want the recipient to go once they are done signing
  // should typically be a callback route somewhere in your app.
  let viewRequest = docusign.EnvelopeViewRequest.constructFromObject({
    returnUrl: args.dsReturnUrl,
    viewAccess: 'envelope',
    settings: docusign.EnvelopeViewSettings.constructFromObject({
      startingScreen: args.startingView,
      sendButtonAction: 'send',
      showBackButton: 'false',
      backButtonAction: 'previousPage',
      showHeaderActions: 'false',
      showDiscardAction: 'false',
      lockToken: '',
      recipientSettings: docusign.EnvelopeViewRecipientSettings.constructFromObject({
        showEditRecipients: 'false',
        showContactsList: 'false'
      }),
      documentSettings: docusign.EnvelopeViewDocumentSettings.constructFromObject({
        showEditDocuments: 'false',
        showEditDocumentVisibility: 'false',
        showEditPages: 'false'
      }),
      taggerSettings: docusign.EnvelopeViewTaggerSettings.constructFromObject({
        paletteSections: 'default',
        paletteDefault: 'custom'
      }),
      templateSettings: docusign.EnvelopeViewTemplateSettings.constructFromObject({
        showMatchingTemplatesPrompt: 'true'
      })
    })
  });

  return viewRequest;
}
```

**`PHP`**

```php title="PHP"
$view_request = EmbeddedSendingService::prepareViewRequest($args['starting_view'], $args['ds_return_url']);
$envelope_api = $clientService->getEnvelopeApi();
$senderView = $envelope_api->createSenderViewWithHttpInfo($args['account_id'], $envelope_id, $view_request);

$remaining = $senderView[2]['X-RateLimit-Remaining'] ?? null;
$reset = $senderView[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));
}
# Switch to the Recipients / Documents view if requested by the user in the form
$url = $senderView[0]['url'];
if ($args['starting_view'] == "recipient") {
    $url = str_replace('send=1', 'send=0', $url);
}

return ['envelope_id' => $envelope_id, 'redirect_url' =>  $url];
    private static function prepareViewRequest(string $startingView, string $returnUrl): EnvelopeViewRequest
    {
$viewSettings = new EnvelopeViewSettings([
    'starting_screen' => $startingView,
    'send_button_action' => 'send',
    'show_back_button' => 'false',
    'back_button_action' => 'previousPage',
    'show_header_actions' => 'false',
    'show_discard_action' => 'false',
    'lock_token' => '',
    'recipient_settings' => new EnvelopeViewRecipientSettings([
        'show_edit_recipients' => 'false',
        'show_contacts_list' => 'false'
    ]),
    'document_settings' => new EnvelopeViewDocumentSettings([
        'show_edit_documents' => 'false',
        'show_edit_document_visibility' => 'false',
        'show_edit_pages' => 'false',
    ]),
    'tagger_settings' => new EnvelopeViewTaggerSettings([
        'palette_sections' => 'default',
        'palette_default' => 'custom'
    ]),
    'template_settings' => new EnvelopeViewTemplateSettings([
        'show_matching_templates_prompt' => 'true'
    ])
]);

$viewRequest = new EnvelopeViewRequest([
    'return_url' => $returnUrl,
    'view_access' => 'envelope',
    'settings' => $viewSettings
]);

return $viewRequest;
    }
```

**`PowerShell`**

```text title="PowerShell"
# pull out the envelopeId
$envelop = $response | Get-Content | ConvertFrom-Json
Write-Output "Envelope received: $envelop"
$envelopeId = $envelop.envelopeId

Write-Output "Requesting the sender view url"

@{
    returnUrl = "http://httpbin.org/get";
    viewAccess = "envelope";
    settings = @{
        startingScreen = $startingView;
        sendButtonAction = "send";
        showBackButton = "false";
        backButtonAction = "previousPage";
        showHeaderActions = "false";
        showDiscardAction = "false";
        lockToken = "";
        recipientSettings = @{
            showEditRecipients = "false";
            showContactsList = "false";
        };
        documentSettings = @{
            showEditDocuments = "false";
            showEditDocumentVisibility = "false";
            showEditPages = "false";
        };
        taggerSettings = @{
            paletteSections = "default";
            paletteDefault = "custom";
        };
        templateSettings = @{
            showMatchingTemplatesPrompt = "true";
        };
    };
} | ConvertTo-Json -Depth 32 >> $senderViewRequestData

# The returnUrl is normally your own web app. Docusign will redirect
# the signer to returnUrl when the embedded sending completes.
# For this example, we'll use http://httpbin.org/get to show the
# query parameters passed back from Docusign
Invoke-RestMethod `
    -Uri "${apiUri}/v2.1/accounts/${accountId}/envelopes/${envelopeId}/views/sender" `
    -Method 'POST' `
    -Headers @{
    'Authorization' = "Bearer $accessToken";
    'Content-Type'  = "application/json";
} `
    -InFile (Resolve-Path $senderViewRequestData).Path `
    -OutFile $response

$sendingObj = $response | Get-Content | ConvertFrom-Json
$sendingUrl = $sendingObj.url
```

**`Python`**

```python title="Python"
def create_sender_view(cls, args, envelope_id):
    view_request = cls.make_envelope_view_request(args)
    # 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)
    (sender_view, status, headers) = envelope_api.create_sender_view_with_http_info(
        account_id=args["account_id"],
        envelope_id=envelope_id,
        envelope_view_request=view_request
    )

    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}")

    # Switch to Recipient and Documents view if requested by the user
    url = sender_view.url

    return url

@classmethod
def make_envelope_view_request(cls, args):
    view_request = EnvelopeViewRequest(
        return_url=args["ds_return_url"],
        view_access="envelope",
        settings=EnvelopeViewSettings(
            starting_screen=args["starting_view"],
            send_button_action="send",
            show_back_button="false",
            back_button_action="previousPage",
            show_header_actions="false",
            show_discard_action="false",
            lock_token="",
            recipient_settings=EnvelopeViewRecipientSettings(
                show_edit_recipients="false",
                show_contacts_list="false"
            ),
            document_settings=EnvelopeViewDocumentSettings(
                show_edit_documents="false",
                show_edit_document_visibility="false",
                show_edit_pages="false"
            ),
            tagger_settings=EnvelopeViewTaggerSettings(
                palette_sections="default",
                palette_default="custom"
            ),
            template_settings=EnvelopeViewTemplateSettings(
                show_matching_templates_prompt="true"
            )
        )
    )

    return view_request
```

**`Ruby`**

```ruby title="Ruby"
# Create the sender view
view_request = envelope_view_request(args)
envelope_api = create_envelope_api(args)
results, _status, headers = envelope_api.create_sender_view_with_http_info args[:account_id], envelope_id, view_request

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

url = results.url
{ 'envelope_id' => envelope_id, 'redirect_url' => url }
  def envelope_view_request(args)
DocuSign_eSign::EnvelopeViewRequest.new(
  returnUrl: args[:ds_return_url],
  viewAccess: 'envelope',
  settings: DocuSign_eSign::EnvelopeViewSettings.new(
    startingScreen: args[:starting_view],
    sendButtonAction: 'send',
    showBackButton: 'false',
    backButtonAction: 'previousPage',
    showHeaderActions: 'false',
    showDiscardAction: 'false',
    lockToken: '',
    recipientSettings: DocuSign_eSign::EnvelopeViewRecipientSettings.new(
      showEditRecipients: 'false',
      showContactsList: 'false'
    ),
    documentSettings: DocuSign_eSign::EnvelopeViewDocumentSettings.new(
      showEditDocuments: 'false',
      showEditDocumentVisibility: 'false',
      showEditPages: 'false'
    ),
    taggerSettings: DocuSign_eSign::EnvelopeViewTaggerSettings.new(
      paletteSections: 'default',
      paletteDefault: 'custom'
    ),
    templateSettings: DocuSign_eSign::EnvelopeViewTemplateSettings.new(
      showMatchingTemplatesPrompt: 'true'
    )
  )
)
  end
```

## Expected response

Use the return URL in the JSON response to start the embedded sending session in your browser.

**`Sample response`**

```json title="Sample response"
{
  "url": "https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=cf3f5e5c-xxxx-xxxx-xxxx-d77d174fcee0&DocuEnvelope=0254dae7-xxxx-xxxx-xxxx-277abdc9bbc3&send=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).
* Learn more about [Embedded signing and sending](/docs/esign-rest-api/esign101/concepts/embedding/embedded-signing).
* 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.