# Create Embedded Unclaimed Draft with Template POST https://api.hellosign.com/v3/unclaimed_draft/create_embedded_with_template Content-Type: application/json Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. Reference: https://developer.hellosign.com/api/unclaimed-draft/create-embedded-with-template ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Create Embedded Unclaimed Draft with Template version: endpoint_unclaimedDraft.createEmbeddedWithTemplate paths: /unclaimed_draft/create_embedded_with_template: post: operationId: create-embedded-with-template summary: Create Embedded Unclaimed Draft with Template description: >- Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. tags: - - subpackage_unclaimedDraft parameters: - name: Authorization in: header description: Basic authentication of the form `Basic `. required: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' '400': description: failed_operation content: {} requestBody: content: application/json: schema: $ref: >- #/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest components: schemas: SubCC: type: object properties: role: type: string description: >- Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. email_address: type: string format: email description: The email address of the CC recipient. required: - role - email_address SubCustomField: type: object properties: editor: type: string description: >- 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. name: type: string description: >- 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. required: type: boolean default: false description: >- 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: type: string description: >- The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. required: - name SubEditorOptions: type: object properties: allow_edit_signers: type: boolean default: false description: Allows requesters to edit the list of signers allow_edit_documents: type: boolean default: false description: Allows requesters to edit documents, including delete and add SubFieldOptionsDateFormat: type: string enum: - value: MM / DD / YYYY - value: MM - DD - YYYY - value: DD / MM / YYYY - value: DD - MM - YYYY - value: YYYY / MM / DD - value: YYYY - MM - DD SubFieldOptions: type: object properties: date_format: $ref: '#/components/schemas/SubFieldOptionsDateFormat' description: >- Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and higher. required: - date_format SubUnclaimedDraftTemplateSigner: type: object properties: role: type: string description: Must match an existing role in chosen Template(s). name: type: string description: The name of the signer filling the role of `role`. email_address: type: string format: email description: The email address of the signer filling the role of `role`. required: - role - name - email_address SubSigningOptionsDefaultType: type: string enum: - value: draw - value: phone - value: type - value: upload SubSigningOptions: type: object properties: default_type: $ref: '#/components/schemas/SubSigningOptionsDefaultType' description: The default type shown (limited to the listed types) draw: type: boolean default: false description: Allows drawing the signature phone: type: boolean default: false description: Allows using a smartphone to email the signature type: type: boolean default: false description: Allows typing the signature upload: type: boolean default: false description: Allows uploading the signature required: - default_type UnclaimedDraftCreateEmbeddedWithTemplateRequest: type: object properties: allow_decline: type: boolean default: false description: >- Allows signers to decline to sign a document if `true`. Defaults to `false`. allow_reassign: type: boolean default: false description: >- 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. ccs: type: array items: $ref: '#/components/schemas/SubCC' description: >- Add CC email recipients. Required when a CC role exists for the Template. client_id: type: string description: >- Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. custom_fields: type: array items: $ref: '#/components/schemas/SubCustomField' description: >- An array defining values and options for custom fields. Required when a custom field exists in the Template. editor_options: $ref: '#/components/schemas/SubEditorOptions' field_options: $ref: '#/components/schemas/SubFieldOptions' files: type: array items: type: string format: binary description: >- Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both. file_urls: type: array items: type: string description: >- Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both. force_signer_roles: type: boolean default: false description: Provide users the ability to review/edit the template signer roles. force_subject_message: type: boolean default: false description: >- Provide users the ability to review/edit the template subject and message. hold_request: type: boolean default: false description: >- The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. is_for_embedded_signing: type: boolean default: false description: >- The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. message: type: string description: The custom message in the email that will be sent to the signers. metadata: type: object additionalProperties: description: Any type description: >- 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. preview_only: type: boolean default: false description: >- This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set). requester_email_address: type: string format: email description: >- The email address of the user that should be designated as the requester of this draft. requesting_redirect_url: type: string description: >- The URL you want signers redirected to after they successfully request a signature. show_preview: type: boolean default: false description: >- 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: type: boolean default: true description: >- When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. signers: type: array items: $ref: '#/components/schemas/SubUnclaimedDraftTemplateSigner' description: Add Signers to your Templated-based Signature Request. signing_options: $ref: '#/components/schemas/SubSigningOptions' signing_redirect_url: type: string description: The URL you want signers redirected to after they successfully sign. skip_me_now: type: boolean default: false description: >- Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. subject: type: string description: The subject in the email that will be sent to the signers. template_ids: type: array items: type: string description: >- Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. test_mode: type: boolean default: false description: >- 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: type: string description: The title you want to assign to the SignatureRequest. populate_auto_fill_fields: type: boolean default: false description: >- 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. allow_ccs: type: boolean default: false description: >- This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. required: - client_id - requester_email_address - template_ids UnclaimedDraftResponse: type: object properties: signature_request_id: type: - string - 'null' description: >- The ID of the signature request that is represented by this UnclaimedDraft. claim_url: type: string description: The URL to be used to claim this UnclaimedDraft. signing_redirect_url: type: - string - 'null' description: The URL you want signers redirected to after they successfully sign. requesting_redirect_url: type: - string - 'null' description: >- The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.). expires_at: type: - integer - 'null' description: When the link expires. test_mode: type: boolean description: >- Whether this is a test draft. Signature requests made from test drafts have no legal value. WarningResponse: type: object properties: warning_msg: type: string description: Warning message warning_name: type: string description: Warning name required: - warning_msg - warning_name UnclaimedDraftCreateResponse: type: object properties: unclaimed_draft: $ref: '#/components/schemas/UnclaimedDraftResponse' warnings: type: array items: $ref: '#/components/schemas/WarningResponse' description: A list of warnings. required: - unclaimed_draft ``` ## SDK Code Examples ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); $ccs_1 = (new Dropbox\Sign\Model\SubCC()) ->setRole("Accounting") ->setEmailAddress("accounting@dropboxsign.com"); $ccs = [ $ccs_1, ]; $signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner()) ->setRole("Client") ->setName("George") ->setEmailAddress("george@example.com"); $signers = [ $signers_1, ]; $unclaimed_draft_create_embedded_with_template_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest()) ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") ->setRequesterEmailAddress("jack@dropboxsign.com") ->setTemplateIds([ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ]) ->setTestMode(false) ->setCcs($ccs) ->setSigners($signers); try { $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbeddedWithTemplate( unclaimed_draft_create_embedded_with_template_request: $unclaimed_draft_create_embedded_with_template_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate: {$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 UnclaimedDraftCreateEmbeddedWithTemplateExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; var ccs1 = new SubCC( role: "Accounting", emailAddress: "accounting@dropboxsign.com" ); var ccs = new List { ccs1, }; var signers1 = new SubUnclaimedDraftTemplateSigner( role: "Client", name: "George", emailAddress: "george@example.com" ); var signers = new List { signers1, }; var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest( clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", templateIds: [ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ], testMode: false, ccs: ccs, signers: signers ); try { var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbeddedWithTemplate( unclaimedDraftCreateEmbeddedWithTemplateRequest: unclaimedDraftCreateEmbeddedWithTemplateRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbeddedWithTemplate: " + 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.UnclaimedDraftApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@dropboxsign.com", }; const ccs = [ ccs1, ]; const signers1: models.SubUnclaimedDraftTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", }; const signers = [ signers1, ]; const unclaimedDraftCreateEmbeddedWithTemplateRequest: models.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", templateIds: [ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ], testMode: false, ccs: ccs, signers: signers, }; apiCaller.unclaimedDraftCreateEmbeddedWithTemplate( unclaimedDraftCreateEmbeddedWithTemplateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate:"); 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 UnclaimedDraftCreateEmbeddedWithTemplateExample { 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 ccs1 = new SubCC(); ccs1.role("Accounting"); ccs1.emailAddress("accounting@dropboxsign.com"); var ccs = new ArrayList(List.of ( ccs1 )); var signers1 = new SubUnclaimedDraftTemplateSigner(); signers1.role("Client"); signers1.name("George"); signers1.emailAddress("george@example.com"); var signers = new ArrayList(List.of ( signers1 )); var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest(); unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress("jack@dropboxsign.com"); unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds(List.of ( "61a832ff0d8423f91d503e76bfbcc750f7417c78" )); unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode(false); unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs(ccs); unclaimedDraftCreateEmbeddedWithTemplateRequest.signers(signers); try { var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbeddedWithTemplate( unclaimedDraftCreateEmbeddedWithTemplateRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate"); 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 ccs_1 = Dropbox::Sign::SubCC.new ccs_1.role = "Accounting" ccs_1.email_address = "accounting@dropboxsign.com" ccs = [ ccs_1, ] signers_1 = Dropbox::Sign::SubUnclaimedDraftTemplateSigner.new signers_1.role = "Client" signers_1.name = "George" signers_1.email_address = "george@example.com" signers = [ signers_1, ] unclaimed_draft_create_embedded_with_template_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest.new unclaimed_draft_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" unclaimed_draft_create_embedded_with_template_request.requester_email_address = "jack@dropboxsign.com" unclaimed_draft_create_embedded_with_template_request.template_ids = [ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ] unclaimed_draft_create_embedded_with_template_request.test_mode = false unclaimed_draft_create_embedded_with_template_request.ccs = ccs unclaimed_draft_create_embedded_with_template_request.signers = signers begin response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded_with_template( unclaimed_draft_create_embedded_with_template_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_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: ccs_1 = models.SubCC( role="Accounting", email_address="accounting@dropboxsign.com", ) ccs = [ ccs_1, ] signers_1 = models.SubUnclaimedDraftTemplateSigner( role="Client", name="George", email_address="george@example.com", ) signers = [ signers_1, ] unclaimed_draft_create_embedded_with_template_request = models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requester_email_address="jack@dropboxsign.com", template_ids=[ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ], test_mode=False, ccs=ccs, signers=signers, ) try: response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded_with_template( unclaimed_draft_create_embedded_with_template_request=unclaimed_draft_create_embedded_with_template_request, ) pprint(response) except ApiException as e: print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded_with_template: %s\n" % e) ``` ```go Unclaimed Draft Create Embedded With Template package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/unclaimed_draft/create_embedded_with_template" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Basic :") 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 Unclaimed Draft Create Embedded With Template import Foundation let headers = [ "Authorization": "Basic :", "Content-Type": "application/json" ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/unclaimed_draft/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() ``` ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); $ccs_1 = (new Dropbox\Sign\Model\SubCC()) ->setRole("Accounting") ->setEmailAddress("accounting@dropboxsign.com"); $ccs = [ $ccs_1, ]; $signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner()) ->setRole("Client") ->setName("George") ->setEmailAddress("george@example.com"); $signers = [ $signers_1, ]; $unclaimed_draft_create_embedded_with_template_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest()) ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") ->setRequesterEmailAddress("jack@dropboxsign.com") ->setTemplateIds([ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ]) ->setTestMode(false) ->setCcs($ccs) ->setSigners($signers); try { $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbeddedWithTemplate( unclaimed_draft_create_embedded_with_template_request: $unclaimed_draft_create_embedded_with_template_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate: {$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 UnclaimedDraftCreateEmbeddedWithTemplateExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; var ccs1 = new SubCC( role: "Accounting", emailAddress: "accounting@dropboxsign.com" ); var ccs = new List { ccs1, }; var signers1 = new SubUnclaimedDraftTemplateSigner( role: "Client", name: "George", emailAddress: "george@example.com" ); var signers = new List { signers1, }; var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest( clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", templateIds: [ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ], testMode: false, ccs: ccs, signers: signers ); try { var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbeddedWithTemplate( unclaimedDraftCreateEmbeddedWithTemplateRequest: unclaimedDraftCreateEmbeddedWithTemplateRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbeddedWithTemplate: " + 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.UnclaimedDraftApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@dropboxsign.com", }; const ccs = [ ccs1, ]; const signers1: models.SubUnclaimedDraftTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", }; const signers = [ signers1, ]; const unclaimedDraftCreateEmbeddedWithTemplateRequest: models.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", templateIds: [ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ], testMode: false, ccs: ccs, signers: signers, }; apiCaller.unclaimedDraftCreateEmbeddedWithTemplate( unclaimedDraftCreateEmbeddedWithTemplateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate:"); 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 UnclaimedDraftCreateEmbeddedWithTemplateExample { 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 ccs1 = new SubCC(); ccs1.role("Accounting"); ccs1.emailAddress("accounting@dropboxsign.com"); var ccs = new ArrayList(List.of ( ccs1 )); var signers1 = new SubUnclaimedDraftTemplateSigner(); signers1.role("Client"); signers1.name("George"); signers1.emailAddress("george@example.com"); var signers = new ArrayList(List.of ( signers1 )); var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest(); unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress("jack@dropboxsign.com"); unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds(List.of ( "61a832ff0d8423f91d503e76bfbcc750f7417c78" )); unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode(false); unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs(ccs); unclaimedDraftCreateEmbeddedWithTemplateRequest.signers(signers); try { var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbeddedWithTemplate( unclaimedDraftCreateEmbeddedWithTemplateRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate"); 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 ccs_1 = Dropbox::Sign::SubCC.new ccs_1.role = "Accounting" ccs_1.email_address = "accounting@dropboxsign.com" ccs = [ ccs_1, ] signers_1 = Dropbox::Sign::SubUnclaimedDraftTemplateSigner.new signers_1.role = "Client" signers_1.name = "George" signers_1.email_address = "george@example.com" signers = [ signers_1, ] unclaimed_draft_create_embedded_with_template_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest.new unclaimed_draft_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" unclaimed_draft_create_embedded_with_template_request.requester_email_address = "jack@dropboxsign.com" unclaimed_draft_create_embedded_with_template_request.template_ids = [ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ] unclaimed_draft_create_embedded_with_template_request.test_mode = false unclaimed_draft_create_embedded_with_template_request.ccs = ccs unclaimed_draft_create_embedded_with_template_request.signers = signers begin response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded_with_template( unclaimed_draft_create_embedded_with_template_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_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: ccs_1 = models.SubCC( role="Accounting", email_address="accounting@dropboxsign.com", ) ccs = [ ccs_1, ] signers_1 = models.SubUnclaimedDraftTemplateSigner( role="Client", name="George", email_address="george@example.com", ) signers = [ signers_1, ] unclaimed_draft_create_embedded_with_template_request = models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requester_email_address="jack@dropboxsign.com", template_ids=[ "61a832ff0d8423f91d503e76bfbcc750f7417c78", ], test_mode=False, ccs=ccs, signers=signers, ) try: response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded_with_template( unclaimed_draft_create_embedded_with_template_request=unclaimed_draft_create_embedded_with_template_request, ) pprint(response) except ApiException as e: print("Exception when calling UnclaimedDraftApi#unclaimed_draft_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/unclaimed_draft/create_embedded_with_template" payload := strings.NewReader("{\n \"client_id\": \"b6b8e7deaf8f0b95c029dca049356d4a2cf9710a\",\n \"requester_email_address\": \"jack@dropboxsign.com\",\n \"template_ids\": [\n \"61a832ff0d8423f91d503e76bfbcc750f7417c78\"\n ],\n \"ccs\": [\n {\n \"role\": \"Accounting\",\n \"email_address\": \"accounting@dropboxsign.com\"\n }\n ],\n \"signers\": [\n {\n \"role\": \"Client\",\n \"name\": \"George\",\n \"email_address\": \"george@example.com\"\n }\n ],\n \"test_mode\": false\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Basic :") 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 headers = [ "Authorization": "Basic :", "Content-Type": "application/json" ] let parameters = [ "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", "requester_email_address": "jack@dropboxsign.com", "template_ids": ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], "ccs": [ [ "role": "Accounting", "email_address": "accounting@dropboxsign.com" ] ], "signers": [ [ "role": "Client", "name": "George", "email_address": "george@example.com" ] ], "test_mode": false ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/unclaimed_draft/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() ```