---
title: "Create Embedded Template Draft"
method: POST
path: "/template/create_embedded_draft"
tags: ["Template"]
---

# Create Embedded Template Draft

`POST /template/create_embedded_draft`

The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage.

## Request body

- TemplateCreateEmbeddedDraftRequest
  - `files` string[] — 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` string[] — 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.
  - `allow_ccs` boolean — This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template.
  - `allow_reassign` boolean — Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.
  - `attachments` SubAttachment[] — A list describing the attachments
    - `instructions` string — The instructions for uploading the attachment.
    - `name` string, required — The name of attachment.
    - `required` boolean — Determines if the attachment must be uploaded.
    - `signer_index` integer, required — The signer's index in the `signers` parameter (0-based indexing). **NOTE:** Only one signer can be assigned per attachment.
  - `cc_roles` string[] — The CC roles that must be assigned when using the template to send a signature request
  - `client_id` string, required — Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app.
  - `editor_options` SubEditorOptions — This allows the requester to specify editor options when a preparing a document
    - `allow_edit_signers` boolean — Allows requesters to edit the list of signers
    - `allow_edit_documents` boolean — Allows requesters to edit documents, including delete and add
  - `field_options` SubFieldOptions — This allows the requester to specify field options for a signature request.
    - `date_format` 'MM / DD / YYYY' | 'MM - DD - YYYY' | 'DD / MM / YYYY' | 'DD - MM - YYYY' | 'YYYY / MM / DD' | 'YYYY - MM - DD', required — Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and higher.
  - `force_signer_roles` boolean — Provide users the ability to review/edit the template signer roles.
  - `force_subject_message` boolean — Provide users the ability to review/edit the template subject and message.
  - `form_field_groups` SubFormFieldGroup[] — Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.
    - `group_id` string, required — ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`.
    - `group_label` string, required — Name of the group
    - `requirement` string, required — Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group.
  - `form_field_rules` SubFormFieldRule[] — Conditional Logic rules for fields defined in `form_fields_per_document`.
    - `id` string, required — Must be unique across all defined rules.
    - `trigger_operator` string, required — Currently only `AND` is supported. Support for `OR` is being worked on.
    - `triggers` SubFormFieldRuleTrigger[], required — An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed.
      - `id` string, required — Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer.
      - `operator` 'any' | 'is' | 'match' | 'none' | 'not', required — Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value
      - `value` string — **value** or **values** is required, but not both. The value to match against **operator**. - When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match` Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1`
      - `values` string[] — **values** or **value** is required, but not both. The values to match against **operator** when it is one of the following: - `any` - `none`
    - `actions` SubFormFieldRuleAction[], required — An array of action definitions, the "then that" part of "if this, **then that**". Any number of actions may be attached to a single rule.
      - `field_id` string — **field_id** or **group_id** is required, but not both. Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Cannot use with `group_id`. Trigger and action fields must belong to the same signer.
      - `group_id` string — **group_id** or **field_id** is required, but not both. Must reference the ID of an existing group defined within `form_field_groups`. Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer.
      - `hidden` boolean, required — `true` to hide the target field when rule is satisfied, otherwise `false`.
      - `type` 'change-field-visibility' | 'change-group-visibility', required
  - `form_fields_per_document` SubFormFieldsPerDocumentBase[] — The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`
    - `document_index` integer, required — Represents the integer index of the `file` or `file_url` document the field should be attached to.
    - `api_id` string, required — An identifier for the field that is unique across all documents in the request.
    - `height` integer, required — Size of the field in pixels.
    - `name` string — Display name for the field.
    - `page` integer, nullable — Page in the document where the field should be placed (requires documents be PDF files). - When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them.
    - `required` boolean, required — Whether this field is required.
    - `signer` string, required — Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field. **NOTE:** To set the value of the field as the preparer you must set this to `me_now` **NOTE:** If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data.
    - `type` string, required
    - `width` integer, required — Size of the field in pixels.
    - `x` integer, required — Location coordinates of the field in pixels.
    - `y` integer, required — Location coordinates of the field in pixels.
  - `merge_fields` SubMergeField[] — Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document.
    - `name` string, required — The name of the merge field. Must be unique.
    - `type` 'text' | 'checkbox', required — The type of merge field.
  - `message` string — The default template email message.
  - `metadata` object — 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.
  - `show_preview` boolean — This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience.
  - `show_progress_stepper` boolean — When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.
  - `signer_roles` SubTemplateRole[] — An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.
    - `name` string — The role name of the signer that will be displayed when the template is used to create a signature request.
    - `order` integer, nullable — The order in which this signer role is required to sign.
  - `skip_me_now` boolean — Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.
  - `subject` string — The template title (alias).
  - `test_mode` boolean — Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.
  - `title` string — The title you want to assign to the SignatureRequest.
  - `use_preexisting_fields` boolean — Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).

## Response `200`

successful operation

- TemplateCreateEmbeddedDraftResponse
  - `template` TemplateCreateEmbeddedDraftResponseTemplate, required — Template object with parameters: `template_id`, `edit_url`, `expires_at`.
    - `template_id` string — The id of the Template.
    - `edit_url` string — Link to edit the template.
    - `expires_at` integer — When the link expires.
    - `warnings` WarningResponse[] — A list of warnings.
      - `warning_msg` string, required — Warning message
      - `warning_name` string, required — Warning name
  - `warnings` WarningResponse[] — A list of warnings.
    - `warning_msg` string, required — Warning message
    - `warning_name` string, required — Warning name

## Other responses

- `4XX` — failed_operation

---

[API](https://skmtc.net/hellosign/apis/dropbox-sign-api.md) · [All operations](https://skmtc.net/hellosign/apis/dropbox-sign-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hellosign/dropbox-sign-api/versions/2ea3f04008af/schema)
