> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.hellosign.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.hellosign.com/_mcp/server.

# Create Embedded Signature Request with Template

POST https://api.hellosign.com/v3/signature_request/create_embedded_with_template
Content-Type: application/json

Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.

Reference: https://developers.hellosign.com/api/signature-request/create-embedded-with-template

## Authentication

- `Authorization` header (basic auth, required) — Use your API key with HTTP Basic authentication in the form `Basic <api_key>`. See [Authentication](/api/reference/authentication) for more information. ✅ Supported by Try it console (calls sent in `test_mode` only).
- `Authorization` header (bearer token, required) — You can use an Access Token issued through an OAuth flow to send calls to the Dropbox Sign API from your app. The access scopes required by this endpoint are listed in the gray box above. See [Authentication](/api/reference/authentication) for more information. ❌ **Not supported** by Try it console.

## Request

### Body (application/json)

This endpoint expects a SignatureRequestCreateEmbeddedWithTemplateRequest.

- `template_ids` (list of string, required) — Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.
- `client_id` (string, required) — Client id of the app you're using to create this embedded signature request. Used for security purposes.
- `signers` (list of SubSignatureRequestTemplateSigner, required) — Add Signers to your Templated-based Signature Request.
- `allow_decline` (boolean, optional, default: false) — Allows signers to decline to sign a document if `true`. Defaults to `false`.
- `ccs` (list of SubCC, optional) — Add CC email recipients. Required when a CC role exists for the Template.
- `custom_fields` (list of SubCustomField, optional) — An array defining values and options for custom fields. Required when a custom field exists in the Template.
- `files` (list of string, optional) — Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.
- `file_urls` (list of string, optional) — Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.
- `message` (string, optional) — The custom message in the email that will be sent to the signers.
- `metadata` (map from string to any, optional) — Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.
- `signing_options` (SubSigningOptions, optional) — This allows the requester to specify the types allowed for creating a signature and specify another signing options. **NOTE:** If `signing_options` are not defined in the request, the allowed types will default to those specified in the account settings. **NOTE:** If `force_advanced_signature_details` is set, allowed types has to be defined too.
- `subject` (string, optional) — The subject in the email that will be sent to the signers.
- `test_mode` (boolean, optional, default: false) — Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.
- `title` (string, optional) — The title you want to assign to the SignatureRequest.
- `populate_auto_fill_fields` (boolean, optional, default: false) — Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.
- `expires_at` (integer, optional, nullable) — When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

## Response

### 200

successful operation

- `signature_request` (SignatureRequestResponse, required) — Contains information about a signature request.
- `warnings` (list of WarningResponse, optional) — A list of warnings.

## Errors

### 400 Client Request Error

failed_operation

- `error` (ErrorResponseError, required) — Contains information about an error that occurred.

## Types

### SubSignatureRequestTemplateSigner

- `role` (string, required) — Must match an existing role in chosen Template(s). It's case-sensitive.
- `name` (string, required) — The name of the signer.
- `email_address` (string, required) — The email address of the signer.
- `pin` (string, optional) — The 4- to 12-character access code that will secure this signer's signature page.
- `sms_phone_number` (string, optional) — An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher.
- `sms_phone_number_type` (enum, optional) — Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email).
  - Allowed values: `authentication`, `delivery`

### SubCC

- `role` (string, required) — Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role.
- `email_address` (string, required) — The email address of the CC recipient.

### SubCustomField

When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.

- `name` (string, required) — The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing.
- `editor` (string, optional) — Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`. **NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable.
- `required` (boolean, optional, default: false) — Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`.
- `value` (string, optional) — The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing.

### SubSigningOptions

This allows the requester to specify the types allowed for creating a signature and specify another signing options. **NOTE:** If `signing_options` are not defined in the request, the allowed types will default to those specified in the account settings. **NOTE:** If `force_advanced_signature_details` is set, allowed types has to be defined too.

- `default_type` (enum, required) — The default type shown (limited to the listed types)
  - Allowed values: `draw`, `phone`, `type`, `upload`
- `draw` (boolean, optional, default: false) — Allows drawing the signature
- `phone` (boolean, optional, default: false) — Allows using a smartphone to email the signature
- `type` (boolean, optional, default: false) — Allows typing the signature
- `upload` (boolean, optional, default: false) — Allows uploading the signature
- `force_advanced_signature_details` (boolean, optional, default: false) — Turning on advanced signature details for the signature request

### SignatureRequestResponse

Contains information about a signature request.

- `test_mode` (boolean, optional, default: false) — Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.
- `signature_request_id` (string, optional) — The id of the SignatureRequest.
- `requester_email_address` (string, optional, nullable) — The email address of the initiator of the SignatureRequest.
- `title` (string, optional) — The title the specified Account uses for the SignatureRequest.
- `original_title` (string, optional) — Default Label for account.
- `subject` (string, optional, nullable) — The subject in the email that was initially sent to the signers.
- `message` (string, optional, nullable) — The custom message in the email that was initially sent to the signers.
- `metadata` (map from string to any, optional) — The metadata attached to the signature request.
- `created_at` (integer, optional) — Time the signature request was created.
- `expires_at` (integer, optional, nullable) — The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.
- `is_complete` (boolean, optional) — Whether or not the SignatureRequest has been fully executed by all signers.
- `is_declined` (boolean, optional) — Whether or not the SignatureRequest has been declined by a signer.
- `has_error` (boolean, optional) — Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).
- `files_url` (string, optional) — The URL where a copy of the request's documents can be downloaded.
- `signing_url` (string, optional, nullable) — The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing.
- `details_url` (string, optional) — The URL where the requester and the signers can view the current status of the SignatureRequest.
- `cc_email_addresses` (list of string, optional) — A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed.
- `signing_redirect_url` (string, optional, nullable) — The URL you want the signer redirected to after they successfully sign.
- `final_copy_uri` (string, optional, nullable) — The path where the completed document can be downloaded
- `template_ids` (list of string, optional, nullable) — Templates IDs used in this SignatureRequest (if any).
- `custom_fields` (list of SignatureRequestResponseCustomFieldBase, optional, nullable) — An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`
- `attachments` (list of SignatureRequestResponseAttachment, optional, nullable) — Signer attachments.
- `response_data` (list of SignatureRequestResponseDataBase, optional, nullable) — An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.
- `signatures` (list of SignatureRequestResponseSignatures, optional) — An array of signature objects, 1 for each signer.
- `bulk_send_job_id` (string, optional, nullable) — The ID of the Bulk Send job which sent the signature request, if applicable.

### WarningResponse

A list of warnings.

- `warning_msg` (string, required) — Warning message
- `warning_name` (string, required) — Warning name

### ErrorResponseError

Contains information about an error that occurred.

- `error_msg` (string, required) — Message describing an error.
- `error_name` (string, required) — Name of the error. See the `x-error-codes` catalog in openapi file for a complete list of possible error codes with detailed information including HTTP status codes, causes, remediation steps, and retry guidance.
- `error_path` (string, optional) — Path at which an error occurred.

### SignatureRequestResponseCustomFieldBase

An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`

- `type`: `text` (text)
  - `name` (string, required) — The name of the Custom Field.
  - `api_id` (string, optional) — The unique ID for this field.
  - `editor` (string, optional, nullable) — The name of the Role that is able to edit this field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
  - `value` (string, optional) — A text string for text fields
- `type`: `checkbox` (checkbox)
  - `name` (string, required) — The name of the Custom Field.
  - `api_id` (string, optional) — The unique ID for this field.
  - `editor` (string, optional, nullable) — The name of the Role that is able to edit this field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
  - `value` (boolean, optional) — A true/false for checkbox fields

### SignatureRequestResponseAttachment

Signer attachments.

- `id` (string, required) — The unique ID for this attachment.
- `signer` (string, required) — The Signer this attachment is assigned to.
- `name` (string, required) — The name of this attachment.
- `required` (boolean, required) — A boolean value denoting if this attachment is required.
- `instructions` (string, optional, nullable) — Instructions for Signer.
- `uploaded_at` (integer, optional, nullable) — Timestamp when attachment was uploaded by Signer.

### SignatureRequestResponseDataBase

An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.

- `type`: `text` (text)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
- `type`: `checkbox` (checkbox)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
- `type`: `dropdown` (dropdown)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
- `type`: `radio` (radio)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
- `type`: `signature` (signature)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
- `type`: `date_signed` (date_signed)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
- `type`: `initials` (initials)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
- `type`: `text-merge` (text-merge)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.
- `type`: `checkbox-merge` (checkbox-merge)
  - `api_id` (string, optional) — The unique ID for this field.
  - `signature_id` (string, optional) — The ID of the signature to which this response is linked.
  - `name` (string, optional) — The name of the form field.
  - `required` (boolean, optional) — A boolean value denoting if this field is required.

### SignatureRequestResponseSignatures

An array of signature objects, 1 for each signer.

- `signature_id` (string, optional) — Signature identifier.
- `signer_group_guid` (string, optional, nullable) — Signer Group GUID
- `signer_email_address` (string, optional) — The email address of the signer.
- `signer_name` (string, optional, nullable) — The name of the signer.
- `signer_role` (string, optional, nullable) — The role of the signer.
- `order` (integer, optional, nullable) — If signer order is assigned this is the 0-based index for this signer.
- `status_code` (string, optional) — The current status of the signature. eg: awaiting_signature, signed, declined.
- `decline_reason` (string, optional, nullable) — The reason provided by the signer for declining the request.
- `signed_at` (integer, optional, nullable) — Time that the document was signed or null.
- `last_viewed_at` (integer, optional, nullable) — The time that the document was last viewed by this signer or null.
- `last_reminded_at` (integer, optional, nullable) — The time the last reminder email was sent to the signer or null.
- `has_pin` (boolean, optional) — Boolean to indicate whether this signature requires a PIN to access.
- `has_sms_auth` (boolean, optional, nullable) — Boolean to indicate whether this signature has SMS authentication enabled.
- `has_sms_delivery` (boolean, optional, nullable) — Boolean to indicate whether this signature has SMS delivery enabled.
- `sms_phone_number` (string, optional, nullable) — The SMS phone number used for authentication or signature request delivery.
- `reassigned_by` (string, optional, nullable) — Email address of original signer who reassigned to this signer.
- `reassignment_reason` (string, optional, nullable) — Reason provided by original signer who reassigned to this signer.
- `reassigned_from` (string, optional, nullable) — Previous signature identifier.
- `error` (string, optional, nullable) — Error message pertaining to this signer, or null.

## Examples

### Create Embedded Signature Request With Template

**Response**

```json
{
  "signature_request": {
    "signature_request_id": "17d163069282df5eb63857d31ff4a3bffa9e46c0",
    "requester_email_address": "me@dropboxsign.com",
    "title": "Purchase Order",
    "original_title": "Purchase Order",
    "subject": "Purchase Order",
    "message": "Glad we could come to an agreement.",
    "metadata": {},
    "is_complete": false,
    "is_declined": false,
    "has_error": false,
    "signing_url": null,
    "details_url": "https://app.hellosign.com/home/manage?guid=17d163069282df5eb63857d31ff4a3bffa9e46c0",
    "cc_email_addresses": [
      "accounting@dropboxsign.com"
    ],
    "signing_redirect_url": null,
    "custom_fields": [
      {
        "type": "text",
        "name": "Cost",
        "editor": "Client",
        "required": true,
        "value": "$20,000"
      }
    ],
    "response_data": [],
    "signatures": [
      {
        "signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3",
        "signer_email_address": "george@example.com",
        "signer_name": "George",
        "signer_role": "Client",
        "order": null,
        "status_code": "awaiting_signature",
        "signed_at": null,
        "last_viewed_at": null,
        "last_reminded_at": null,
        "has_pin": false,
        "has_sms_auth": false
      }
    ]
  }
}
```

**SDK Code**

```php PHP
<?php

namespace Dropbox\SignSandbox;

require_once __DIR__ . '/../vendor/autoload.php';

use SplFileObject;
use Dropbox;

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();
$config->setUsername("YOUR_API_KEY");
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$signing_options = (new Dropbox\Sign\Model\SubSigningOptions())
    ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW)
    ->setDraw(true)
    ->setPhone(false)
    ->setType(true)
    ->setUpload(true)
    ->setForceAdvancedSignatureDetails(false);

$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner())
    ->setRole("Client")
    ->setName("George")
    ->setEmailAddress("george@example.com");

$signers = [
    $signers_1,
];

$signature_request_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest())
    ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a")
    ->setTemplateIds([
        "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
    ])
    ->setMessage("Glad we could come to an agreement.")
    ->setSubject("Purchase Order")
    ->setTestMode(true)
    ->setSigningOptions($signing_options)
    ->setSigners($signers);

try {
    $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbeddedWithTemplate(
        signature_request_create_embedded_with_template_request: $signature_request_create_embedded_with_template_request,
    );

    print_r($response);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate: {$e->getMessage()}";
}

```

```csharp C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class SignatureRequestCreateEmbeddedWithTemplateExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";
        // config.AccessToken = "YOUR_ACCESS_TOKEN";

        var signingOptions = new SubSigningOptions(
            defaultType: SubSigningOptions.DefaultTypeEnum.Draw,
            draw: true,
            phone: false,
            type: true,
            upload: true,
            force_advanced_signature_details: false
        );

        var signers1 = new SubSignatureRequestTemplateSigner(
            role: "Client",
            name: "George",
            emailAddress: "george@example.com"
        );

        var signers = new List<SubSignatureRequestTemplateSigner>
        {
            signers1,
        };

        var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest(
            clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a",
            templateIds: [
                "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
            ],
            message: "Glad we could come to an agreement.",
            subject: "Purchase Order",
            testMode: true,
            signingOptions: signingOptions,
            signers: signers
        );

        try
        {
            var response = new SignatureRequestApi(config).SignatureRequestCreateEmbeddedWithTemplate(
                signatureRequestCreateEmbeddedWithTemplateRequest: signatureRequestCreateEmbeddedWithTemplateRequest
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbeddedWithTemplate: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

```

```typescript TypeScript
import * as fs from 'fs';
import api from "@dropbox/sign"
import models from "@dropbox/sign"

const apiCaller = new api.SignatureRequestApi();
apiCaller.username = "YOUR_API_KEY";
// apiCaller.accessToken = "YOUR_ACCESS_TOKEN";

const signingOptions: models.SubSigningOptions = {
  defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw,
  draw: true,
  phone: false,
  type: true,
  upload: true,
  force_advanced_signature_details: false,
};

const signers1: models.SubSignatureRequestTemplateSigner = {
  role: "Client",
  name: "George",
  emailAddress: "george@example.com",
};

const signers = [
  signers1,
];

const signatureRequestCreateEmbeddedWithTemplateRequest: models.SignatureRequestCreateEmbeddedWithTemplateRequest = {
  clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a",
  templateIds: [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
  ],
  message: "Glad we could come to an agreement.",
  subject: "Purchase Order",
  testMode: true,
  signingOptions: signingOptions,
  signers: signers,
};

apiCaller.signatureRequestCreateEmbeddedWithTemplate(
  signatureRequestCreateEmbeddedWithTemplateRequest,
).then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate:");
  console.log(error.body);
});

```

```java Java
package com.dropbox.sign_sandbox;

import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;

import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class SignatureRequestCreateEmbeddedWithTemplateExample
{
    public static void main(String[] args)
    {
        var config = Configuration.getDefaultApiClient();
        ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
        // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");

        var signingOptions = new SubSigningOptions();
        signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW);
        signingOptions.draw(true);
        signingOptions.phone(false);
        signingOptions.type(true);
        signingOptions.upload(true);
        signingOptions.forceAdvancedSignatureDetails(false);

        var signers1 = new SubSignatureRequestTemplateSigner();
        signers1.role("Client");
        signers1.name("George");
        signers1.emailAddress("george@example.com");

        var signers = new ArrayList<SubSignatureRequestTemplateSigner>(List.of (
            signers1
        ));

        var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest();
        signatureRequestCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a");
        signatureRequestCreateEmbeddedWithTemplateRequest.templateIds(List.of (
            "c26b8a16784a872da37ea946b9ddec7c1e11dff6"
        ));
        signatureRequestCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement.");
        signatureRequestCreateEmbeddedWithTemplateRequest.subject("Purchase Order");
        signatureRequestCreateEmbeddedWithTemplateRequest.testMode(true);
        signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions(signingOptions);
        signatureRequestCreateEmbeddedWithTemplateRequest.signers(signers);

        try
        {
            var response = new SignatureRequestApi(config).signatureRequestCreateEmbeddedWithTemplate(
                signatureRequestCreateEmbeddedWithTemplateRequest
            );

            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

```

```ruby Ruby
require "json"
require "dropbox-sign"

Dropbox::Sign.configure do |config|
    config.username = "YOUR_API_KEY"
    # config.access_token = "YOUR_ACCESS_TOKEN"
end

signing_options = Dropbox::Sign::SubSigningOptions.new
signing_options.default_type = "draw"
signing_options.draw = true
signing_options.phone = false
signing_options.type = true
signing_options.upload = true
signing_options.force_advanced_signature_details = false

signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new
signers_1.role = "Client"
signers_1.name = "George"
signers_1.email_address = "george@example.com"

signers = [
    signers_1,
]

signature_request_create_embedded_with_template_request = Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest.new
signature_request_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"
signature_request_create_embedded_with_template_request.template_ids = [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
]
signature_request_create_embedded_with_template_request.message = "Glad we could come to an agreement."
signature_request_create_embedded_with_template_request.subject = "Purchase Order"
signature_request_create_embedded_with_template_request.test_mode = true
signature_request_create_embedded_with_template_request.signing_options = signing_options
signature_request_create_embedded_with_template_request.signers = signers

begin
    response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded_with_template(
        signature_request_create_embedded_with_template_request,
    )

    p response
rescue Dropbox::Sign::ApiError => e
    puts "Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: #{e}"
end

```

```python Python
import json
from datetime import date, datetime
from pprint import pprint

from dropbox_sign import ApiClient, ApiException, Configuration, api, models

configuration = Configuration(
    username="YOUR_API_KEY",
    # access_token="YOUR_ACCESS_TOKEN",
)

with ApiClient(configuration) as api_client:
    signing_options = models.SubSigningOptions(
        default_type="draw",
        draw=True,
        phone=False,
        type=True,
        upload=True,
        force_advanced_signature_details=False,
    )

    signers_1 = models.SubSignatureRequestTemplateSigner(
        role="Client",
        name="George",
        email_address="george@example.com",
    )

    signers = [
        signers_1,
    ]

    signature_request_create_embedded_with_template_request = models.SignatureRequestCreateEmbeddedWithTemplateRequest(
        client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a",
        template_ids=[
            "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
        ],
        message="Glad we could come to an agreement.",
        subject="Purchase Order",
        test_mode=True,
        signing_options=signing_options,
        signers=signers,
    )

    try:
        response = api.SignatureRequestApi(api_client).signature_request_create_embedded_with_template(
            signature_request_create_embedded_with_template_request=signature_request_create_embedded_with_template_request,
        )

        pprint(response)
    except ApiException as e:
        print("Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: %s\n" % e)

```

```go Create Embedded Signature Request With Template
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hellosign.com/v3/signature_request/create_embedded_with_template"

	req, _ := http.NewRequest("POST", url, nil)

	req.SetBasicAuth("<api_key>", "")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```swift Create Embedded Signature Request With Template
import Foundation

let credentials = Data("<api_key>:".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/signature_request/create_embedded_with_template")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Default Example

**Request**

```json
{
  "template_ids": [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6"
  ],
  "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a",
  "signers": [
    {
      "role": "Client",
      "name": "George",
      "email_address": "george@example.com"
    }
  ],
  "message": "Glad we could come to an agreement.",
  "signing_options": {
    "default_type": "draw",
    "draw": true,
    "phone": false,
    "type": true,
    "upload": true,
    "force_advanced_signature_details": false
  },
  "subject": "Purchase Order",
  "test_mode": true
}
```

**Response**

```json
{
  "signature_request": {
    "signature_request_id": "17d163069282df5eb63857d31ff4a3bffa9e46c0",
    "requester_email_address": "me@dropboxsign.com",
    "title": "Purchase Order",
    "original_title": "Purchase Order",
    "subject": "Purchase Order",
    "message": "Glad we could come to an agreement.",
    "metadata": {},
    "is_complete": false,
    "is_declined": false,
    "has_error": false,
    "signing_url": null,
    "details_url": "https://app.hellosign.com/home/manage?guid=17d163069282df5eb63857d31ff4a3bffa9e46c0",
    "cc_email_addresses": [
      "accounting@dropboxsign.com"
    ],
    "signing_redirect_url": null,
    "custom_fields": [
      {
        "type": "text",
        "name": "Cost",
        "editor": "Client",
        "required": true,
        "value": "$20,000"
      }
    ],
    "response_data": [],
    "signatures": [
      {
        "signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3",
        "signer_email_address": "george@example.com",
        "signer_name": "George",
        "signer_role": "Client",
        "order": null,
        "status_code": "awaiting_signature",
        "signed_at": null,
        "last_viewed_at": null,
        "last_reminded_at": null,
        "has_pin": false,
        "has_sms_auth": false
      }
    ]
  }
}
```

**SDK Code**

```php PHP
<?php

namespace Dropbox\SignSandbox;

require_once __DIR__ . '/../vendor/autoload.php';

use SplFileObject;
use Dropbox;

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();
$config->setUsername("YOUR_API_KEY");
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$signing_options = (new Dropbox\Sign\Model\SubSigningOptions())
    ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW)
    ->setDraw(true)
    ->setPhone(false)
    ->setType(true)
    ->setUpload(true)
    ->setForceAdvancedSignatureDetails(false);

$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner())
    ->setRole("Client")
    ->setName("George")
    ->setEmailAddress("george@example.com");

$signers = [
    $signers_1,
];

$signature_request_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest())
    ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a")
    ->setTemplateIds([
        "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
    ])
    ->setMessage("Glad we could come to an agreement.")
    ->setSubject("Purchase Order")
    ->setTestMode(true)
    ->setSigningOptions($signing_options)
    ->setSigners($signers);

try {
    $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbeddedWithTemplate(
        signature_request_create_embedded_with_template_request: $signature_request_create_embedded_with_template_request,
    );

    print_r($response);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate: {$e->getMessage()}";
}

```

```csharp C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class SignatureRequestCreateEmbeddedWithTemplateExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";
        // config.AccessToken = "YOUR_ACCESS_TOKEN";

        var signingOptions = new SubSigningOptions(
            defaultType: SubSigningOptions.DefaultTypeEnum.Draw,
            draw: true,
            phone: false,
            type: true,
            upload: true,
            force_advanced_signature_details: false
        );

        var signers1 = new SubSignatureRequestTemplateSigner(
            role: "Client",
            name: "George",
            emailAddress: "george@example.com"
        );

        var signers = new List<SubSignatureRequestTemplateSigner>
        {
            signers1,
        };

        var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest(
            clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a",
            templateIds: [
                "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
            ],
            message: "Glad we could come to an agreement.",
            subject: "Purchase Order",
            testMode: true,
            signingOptions: signingOptions,
            signers: signers
        );

        try
        {
            var response = new SignatureRequestApi(config).SignatureRequestCreateEmbeddedWithTemplate(
                signatureRequestCreateEmbeddedWithTemplateRequest: signatureRequestCreateEmbeddedWithTemplateRequest
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbeddedWithTemplate: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

```

```typescript TypeScript
import * as fs from 'fs';
import api from "@dropbox/sign"
import models from "@dropbox/sign"

const apiCaller = new api.SignatureRequestApi();
apiCaller.username = "YOUR_API_KEY";
// apiCaller.accessToken = "YOUR_ACCESS_TOKEN";

const signingOptions: models.SubSigningOptions = {
  defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw,
  draw: true,
  phone: false,
  type: true,
  upload: true,
  force_advanced_signature_details: false,
};

const signers1: models.SubSignatureRequestTemplateSigner = {
  role: "Client",
  name: "George",
  emailAddress: "george@example.com",
};

const signers = [
  signers1,
];

const signatureRequestCreateEmbeddedWithTemplateRequest: models.SignatureRequestCreateEmbeddedWithTemplateRequest = {
  clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a",
  templateIds: [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
  ],
  message: "Glad we could come to an agreement.",
  subject: "Purchase Order",
  testMode: true,
  signingOptions: signingOptions,
  signers: signers,
};

apiCaller.signatureRequestCreateEmbeddedWithTemplate(
  signatureRequestCreateEmbeddedWithTemplateRequest,
).then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate:");
  console.log(error.body);
});

```

```java Java
package com.dropbox.sign_sandbox;

import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;

import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class SignatureRequestCreateEmbeddedWithTemplateExample
{
    public static void main(String[] args)
    {
        var config = Configuration.getDefaultApiClient();
        ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
        // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");

        var signingOptions = new SubSigningOptions();
        signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW);
        signingOptions.draw(true);
        signingOptions.phone(false);
        signingOptions.type(true);
        signingOptions.upload(true);
        signingOptions.forceAdvancedSignatureDetails(false);

        var signers1 = new SubSignatureRequestTemplateSigner();
        signers1.role("Client");
        signers1.name("George");
        signers1.emailAddress("george@example.com");

        var signers = new ArrayList<SubSignatureRequestTemplateSigner>(List.of (
            signers1
        ));

        var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest();
        signatureRequestCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a");
        signatureRequestCreateEmbeddedWithTemplateRequest.templateIds(List.of (
            "c26b8a16784a872da37ea946b9ddec7c1e11dff6"
        ));
        signatureRequestCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement.");
        signatureRequestCreateEmbeddedWithTemplateRequest.subject("Purchase Order");
        signatureRequestCreateEmbeddedWithTemplateRequest.testMode(true);
        signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions(signingOptions);
        signatureRequestCreateEmbeddedWithTemplateRequest.signers(signers);

        try
        {
            var response = new SignatureRequestApi(config).signatureRequestCreateEmbeddedWithTemplate(
                signatureRequestCreateEmbeddedWithTemplateRequest
            );

            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

```

```ruby Ruby
require "json"
require "dropbox-sign"

Dropbox::Sign.configure do |config|
    config.username = "YOUR_API_KEY"
    # config.access_token = "YOUR_ACCESS_TOKEN"
end

signing_options = Dropbox::Sign::SubSigningOptions.new
signing_options.default_type = "draw"
signing_options.draw = true
signing_options.phone = false
signing_options.type = true
signing_options.upload = true
signing_options.force_advanced_signature_details = false

signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new
signers_1.role = "Client"
signers_1.name = "George"
signers_1.email_address = "george@example.com"

signers = [
    signers_1,
]

signature_request_create_embedded_with_template_request = Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest.new
signature_request_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"
signature_request_create_embedded_with_template_request.template_ids = [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
]
signature_request_create_embedded_with_template_request.message = "Glad we could come to an agreement."
signature_request_create_embedded_with_template_request.subject = "Purchase Order"
signature_request_create_embedded_with_template_request.test_mode = true
signature_request_create_embedded_with_template_request.signing_options = signing_options
signature_request_create_embedded_with_template_request.signers = signers

begin
    response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded_with_template(
        signature_request_create_embedded_with_template_request,
    )

    p response
rescue Dropbox::Sign::ApiError => e
    puts "Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: #{e}"
end

```

```python Python
import json
from datetime import date, datetime
from pprint import pprint

from dropbox_sign import ApiClient, ApiException, Configuration, api, models

configuration = Configuration(
    username="YOUR_API_KEY",
    # access_token="YOUR_ACCESS_TOKEN",
)

with ApiClient(configuration) as api_client:
    signing_options = models.SubSigningOptions(
        default_type="draw",
        draw=True,
        phone=False,
        type=True,
        upload=True,
        force_advanced_signature_details=False,
    )

    signers_1 = models.SubSignatureRequestTemplateSigner(
        role="Client",
        name="George",
        email_address="george@example.com",
    )

    signers = [
        signers_1,
    ]

    signature_request_create_embedded_with_template_request = models.SignatureRequestCreateEmbeddedWithTemplateRequest(
        client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a",
        template_ids=[
            "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
        ],
        message="Glad we could come to an agreement.",
        subject="Purchase Order",
        test_mode=True,
        signing_options=signing_options,
        signers=signers,
    )

    try:
        response = api.SignatureRequestApi(api_client).signature_request_create_embedded_with_template(
            signature_request_create_embedded_with_template_request=signature_request_create_embedded_with_template_request,
        )

        pprint(response)
    except ApiException as e:
        print("Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: %s\n" % e)

```

```go Default Example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hellosign.com/v3/signature_request/create_embedded_with_template"

	payload := strings.NewReader("{\n  \"template_ids\": [\n    \"c26b8a16784a872da37ea946b9ddec7c1e11dff6\"\n  ],\n  \"client_id\": \"b6b8e7deaf8f0b95c029dca049356d4a2cf9710a\",\n  \"signers\": [\n    {\n      \"role\": \"Client\",\n      \"name\": \"George\",\n      \"email_address\": \"george@example.com\"\n    }\n  ],\n  \"message\": \"Glad we could come to an agreement.\",\n  \"signing_options\": {\n    \"default_type\": \"draw\",\n    \"draw\": true,\n    \"phone\": false,\n    \"type\": true,\n    \"upload\": true,\n    \"force_advanced_signature_details\": false\n  },\n  \"subject\": \"Purchase Order\",\n  \"test_mode\": true\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.SetBasicAuth("<api_key>", "")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```swift Default Example
import Foundation

let credentials = Data("<api_key>:".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "template_ids": ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"],
  "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a",
  "signers": [
    [
      "role": "Client",
      "name": "George",
      "email_address": "george@example.com"
    ]
  ],
  "message": "Glad we could come to an agreement.",
  "signing_options": [
    "default_type": "draw",
    "draw": true,
    "phone": false,
    "type": true,
    "upload": true,
    "force_advanced_signature_details": false
  ],
  "subject": "Purchase Order",
  "test_mode": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/signature_request/create_embedded_with_template")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```