# Dropbox Sign API Quickstart > This quickstart will guide you through your first steps sending signature requests with the Dropbox Sign API. {/* // import { BlueBox } from "../../fern/components/BlueBox.tsx"; */} This quickstart will walk you through sending your first Dropbox Sign API request. Further down, we will also walk you through sending your first eSignature request using our API. This is mostly an interactive guide, meaning you will find embedded consoles along the way, which will allow you to send API requests without having to navigate away from the guide. You will also find code examples, which can be copied as-is and used in your development environment. ## The Dropbox Sign API at a Glance The Dropbox Sign API powers eSignature functionality that can be built into your applications. You can enable electronic signatures for your users with *non-embedded* or *embedded* signature flows. The endpoints are organized around specific classes. You can see the full range of classes and functionality by clicking the dropdown below: | Summary | Endpoint | Description | | -------------- | ---------------------- | ----------------------------------------------------------------------------------------- | | Get Account | `GET /account` | Returns the properties and settings of your Account. | | Update Account | `PUT /account` | Updates the properties and settings of your Account. | | Create Account | `POST /account/create` | Creates a new Dropbox Sign Account that is associated with the specified `email_address`. | | Verify Account | `POST /account/verify` | Verifies whether an Dropbox Sign Account exists for the given email address. | | Summary | Endpoint | Description | | ----------------------------------------------- | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Get Signature Request | /signature\_request/\{signature\_request\_id} | Returns the Signature Request specified by the signature\_request\_id parameter. | | List Signature Requests | /signature\_request/list | Returns a list of SignatureRequests that you can access. | | Download Files | /files/\{signature\_request\_id} | Obtain a copy of the current documents specified by the signature\_request\_id parameter. | | Download Files as Data Uri | /files\_as\_data\_uri/\{signature\_request\_id} | Returns a JSON object with a data\_uri representing the base64 encoded file (PDFs only). | | Download Files as File Url | /files\_as\_file\_url/\{signature\_request\_id} | Returns a JSON object with a url to the file (PDFs only). | | Send Signature Request | /signature\_request/send | Creates and sends a new SignatureRequest with the submitted documents. | | Send Signature Request with Template | /signature\_request/send\_with\_template | Creates and sends a new SignatureRequest based off of the Template(s) specified with the template\_ids parameter. | | Bulk Send with Template | /signature\_request/bulk\_send\_with\_template | Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the template\_ids parameter. | | Send Request Reminder | /remind/\{signature\_request\_id} | Sends an email to the signer reminding them to sign the signature request. | | Release On-Hold Signature Request | /release\_hold/\{signature\_request\_id} | Releases a held SignatureRequest that was claimed and prepared from an UnclaimedDraft. | | Update Signature Request | /update/\{signature\_request\_id} | Updates the email address and/or the name for a given signer on a signature request. | | Cancel Incomplete Signature Request | /cancel/\{signature\_request\_id} | Cancels an incomplete signature request. This action is not reversible. | | Remove Signature Request Access | /remove/\{signature\_request\_id} | Removes your access to a completed signature request. This action is not reversible. | | Create Embedded Signature Request | /signature\_request/create\_embedded | Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. | | Create Embedded Signature Request with Template | /create\_embedded\_with\_template | Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. | | Embedded Bulk Send with Template | /bulk\_create\_embedded\_with\_template | Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the template\_ids parameter to be signed in an embedded iFrame. | | Summary | Endpoint | Description | | ------------------------------ | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | Get Template | `/template/{template_id}` | Returns the Template specified by the `template_id` parameter. | | List Templates | `/template/list` | Returns a list of the Templates that are accessible by you. | | Create Template | `/template/create` | Creates a non-embedded template that can be used immediately. | | Create Embedded Template Draft | `/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. | | Delete Template | `/template/delete/{template_id}` | Completely deletes the template specified from the account. | | Get Template Files | `/template/files/{template_id}` | Obtain a copy of the current documents specified by the `template_id` parameter. | | Get Template Files as Data Uri | `/template/files_as_data_uri/{template_id}` | Returns a JSON object with a data\_uri representing the base64 encoded file (PDFs only). | | Get Template Files as File Url | `/template/files_as_file_url/{template_id}` | Returns a JSON object with a url to the file (PDFs only). | | Update Template Files | `/template/update_files/{template_id}` | Overlays a new file with the overlay of an existing template. | | Add User to Template | `/template/add_user/{template_id}` | Gives the specified Account access to the specified Template. | | Remove User from Template | `/template/remove_user/` | Removes the specified Account's access to the specified Template. | | Summary | Endpoint | Description | | ------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------- | | Get Bulk Send Job | `/bulk_send_job/{bulk_send_job_id}` | Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. | | List Bulk Send Jobs | `/bulk_send_job/list` | Returns a list of BulkSendJob that you can access. | | Summary | Endpoint | Description | | ------------- | ---------------- | ---------------------------------------------- | | Create Report | `/report/create` | Request the creation of one or more report(s). | | Summary | Endpoint | Description | | --------------------- | --------------------------- | ----------------------------------------------------------------------------------- | | Get Team | `/team` | Returns information about your Team as well as a list of its members. | | Get Team Info | `/team/info` | Provides information about a team. | | List Team Members | `/team/members/{team_id}` | Provides a paginated list of members (and their roles) that belong to a given team. | | List Sub Teams | `/team/sub_teams/{team_id}` | Provides a paginated list of sub teams that belong to a given team. | | Create Team | `/team/create` | Creates a new Team and makes you a member. | | Update Team | `/team` | Updates the name of your Team. | | Delete Team | `/team/destroy` | Deletes your Team. | | Add User to Team | `/team/add_member` | Invites a user (specified using the email\_address parameter) to your Team. | | Remove User from Team | `/team/remove_member` | Removes the provided user Account from your Team. | | Summary | Endpoint | Description | | --------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Create Embedded Draft | `/unclaimed_draft/create` | Creates a new Draft that can be claimed using the claim URL. | | Create Embedded Unclaimed Draft | `/unclaimed_draft/create_embedded` | Create a signature request "Draft" that can be embedded into your app -- allowing the user to edit, sign, or send a signature requests without ever leaving your app. | | Create Embedded Unclaimed Draft with Template | `/unclaimed_draft/create_embedded_with_template` | Create a new embedded Draft of a signature request based on an existing template. | | Edit and Resend Unclaimed Draft | `/edit_and_resend/{signature_request_id}` | Create a new Draft based on an existing signature request that can be edited, signed, or sent sent by the user completing the draft. | Summary Endpoint Description | Summary | Endpoint | Description | | ------------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------- | | Get Embedded Sign URL | `/embedded/sign_url/{signature_id}` | Retrieves an embedded object containing a signature url that can be opened in an iFrame. | | Get Embedded Template Edit URL | `/embedded/edit_url/{template_id}` | Retrieves an embedded object containing a template url that can be opened in an iFrame. | | Summary | Endpoint | Description | | -------------- | ---------------------- | ------------------------------------------------------ | | Get API App | `/api_app/{client_id}` | Returns an object with information about an API App. | | List API Apps | `/api_app/list` | Returns a list of API Apps that are accessible by you. | | Create API App | `/api_app` | Creates a new API App. | | Update API App | `/api_app/{client_id}` | Updates an existing API App. | | Delete API App | `/api_app/{client_id}` | Deletes an API App. | ### Things to know * [The difference between Embedded and Non-Embedded](https://faq.hellosign.com/hc/en-us/articles/216839377-The-difference-between-Embedded-and-Non-Embedded) * [How we charge](/#how-we-charge) * [Testing the Dropbox Sign API](/#testing-the-dropbox-sign-api) * [Rate Limits](/#rate-limits) * [Embedded Testing Tool](/additional-resources/embedded-testing-tool) ## Sending an API Request Let's send your first API request! ### Prerequisites - API Request You'll need the following:
**API Account** for Dropbox Sign. → Sign up for a free one on the [API Pricing](https://www.hellosign.com/info/api-pricing) page. **API Key** for your account. → See how to [Generate an API Key](/api/api-reference-authentication#api-key-management) or find an existing API Key in the [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) page.
### Calling the API There are two ways the documentation will help you send API requests: * Using the *Try it console* to send API requests directly from within the documentation. * Copying the *code examples* to send API requests using your development environment. That functionality is offered across all endpoints. #### Using the Try it Console This approach is great for exploration, discovery, and testing different combinations of parameters without the need to set up your own coding environment. **Step 1.** Grab your [API Key](/api/api-reference-authentication#generate-new-api-key) from the [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) page.
**Step 2.** Paste it into the *Try it console* below and click **Send**: **First API Request:** This banner will update when you send an API request using the Try it console above. **About Try it Console**: You can use the *Try it console*, whenever present across the developer documentation, for most endpoints. You can also resend requests using the same instance, there's no need to refresh or navigate away from the documentation. #### Using Code Examples This approach is great for building out your integration. Especially if you're using the [official SDKs](/docs/sdks/overview/). **Step 1.** Grab your [API Key](/api/api-reference-authentication#generate-new-api-key) from the [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) page. **Step 2.** Copy the code from the cURL tab below for the [Get Account](/api/account/get) endpoint: ```cURL cURL curl -X GET 'https://api.hellosign.com/v3/account?email_address=jack@example.com' \ -u 'YOUR_API_KEY:' ``` ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); try { $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountGet(); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling AccountApi#accountGet: {$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 AccountGetExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { var response = new AccountApi(config).AccountGet(); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling AccountApi#AccountGet: " + 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.AccountApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.accountGet().then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling AccountApi#accountGet:"); 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 AccountGetExample { 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"); try { var response = new AccountApi(config).accountGet( null, // accountId null // emailAddress ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling AccountApi#accountGet"); 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 begin response = Dropbox::Sign::AccountApi.new.account_get p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling AccountApi#account_get: #{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: try: response = api.AccountApi(api_client).account_get() pprint(response) except ApiException as e: print("Exception when calling AccountApi#account_get: %s\n" % e) ``` **Step 3.** Combine your API key with the cURL example and send the command from your terminal. **About Code Examples**: Every endpoint in our API Reference documentation contains code example for cURL along with all 6 officially supported SDKs. ## Sending Signature Requests The ability to create signature requests for your users to sign is a central concept of building with the Dropbox Sign API. All features, big and small, are connected by a shared need: allowing users to sign documents. Users have two ways they can sign and complete signature requests: * On dropboxsign.com — **Non-embedded Signing** flows. * On your app (or website) in an iFrame — **Embedded Signing** flows. You can fully test both signing flows by working through the sections below. ### Prerequisites - Signature Requests You'll need the following:
**API account** for Dropbox Sign.  → Sign up for a free one on the [API Pricing](https://www.hellosign.com/info/api-pricing) page. **API Key** for your account.  → See how to [Generate an API Key](/api/api-reference-authentication#api-key-management) or find an existing API Key in the [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) page. **Email address** for completing signature requests. **Client ID** for your own API App in Dropbox Sign.  → For completing embedded signature requests.→ Create an API App on [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) or by calling [Create API App](/api/api-app/create).
### Non-embedded Signing In non-embedded signing flows, you send the signature request via API and Dropbox Sign handles the rest. In this model, we notify the signer(s) via email, they follow a hyperlink, and we collect their eSignature on a Dropbox Sign-owned web page. This section contains three main parts: 1. Sending a Signature Request 2. Signing the document to complete the Signature Request 3. Checking the status of the Signature Request Follow the steps below using the *Try it console*. 1. Paste your API Key into the **Security** tab. 2. Open the **Body** tab and inspect the request payload. 3. Replace the first signer's `email_address` and `name` values with your own test data — make sure you have access to the email address entered. 4. Add a `metadata` property to the payload with a custom key-value pair. Like this: `"demo": "Hi from the demo"` 5. Add, edit or remove parameters in the payload as you wish — ensuring required parameters are included though. 6. Press **Send** to send your signature request! **Send Signature Request:** You'll need to send a signature request using the Try it console above before moving on to the next section. Want to try testing in your own environment? No problem, you can find code examples below to send cURL requests from your terminal or using one of our official SDKs: 1. Grab your [API Key](/api/api-reference-authentication#generate-new-api-key) from the [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) page. 2. Copy the code from the tab of your language of choice below for the [Send Signature Request](/api/signature-request/send) endpoint. 3. Use your API key and add or edit parameters to the copied code example and send the request. ```json title="Default Example" { "title": "NDA with Acme Co.", "subject": "The NDA we talked about", "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", "signers": [ { "email_address": "jack@example.com", "name": "Jack", "order": 0 }, { "email_address": "jill@example.com", "name": "Jill", "order": 1 } ], "cc_email_addresses": [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com" ], "file_urls": [ "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" ], "metadata": { "custom_id": 1234, "custom_text": "NDA #9" }, "signing_options": { "draw": true, "type": true, "upload": true, "phone": false, "default_type": "draw" }, "field_options": { "date_format": "DD - MM - YYYY" }, "test_mode": true } ``` ```json title="Grouped Signers Example" { "title": "NDA with Acme Co.", "subject": "The NDA we talked about", "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", "grouped_signers": [ { "group": "Group #1", "order": 0, "signers": [ { "email_address": "jack@example.com", "name": "Jack" }, { "email_address": "jill@example.com", "name": "Jill" } ] }, { "group": "Group #2", "order": 1, "signers": [ { "email_address": "bob@example.com", "name": "Bob" }, { "email_address": "charlie@example.com", "name": "Charlie" } ] } ], "cc_email_addresses": [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com" ], "file_urls": [ "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" ], "metadata": { "custom_id": 1234, "custom_text": "NDA #9" }, "signing_options": { "draw": true, "type": true, "upload": true, "phone": false, "default_type": "draw" }, "field_options": { "date_format": "DD - MM - YYYY" }, "test_mode": true } ``` {/* ```cURL cURL curl -X POST 'https://api.hellosign.com/v3/signature_request/send' \ -u 'YOUR_API_KEY:' \ -F 'files[0]=@mutual-NDA-example.pdf' \ -F 'title=NDA with Acme Co.' \ -F 'subject=The NDA we talked about' \ -F 'message=Please sign this NDA and then we can discuss more. Let me know if you have any questions.' \ -F 'signers[0][email_address]=jack@example.com' \ -F 'signers[0][name]=Jack' \ -F 'signers[0][order]=0' \ -F 'signers[1][email_address]=jill@example.com' \ -F 'signers[1][name]=Jill' \ -F 'signers[1][order]=1' \ -F 'cc_email_addresses[]=lawyer1@dropboxsign.com' \ -F 'cc_email_addresses[]=lawyer2@dropboxsign.com' \ -F 'metadata[custom_id]=1234' \ -F 'metadata[custom_text]=NDA #9' \ -F 'signing_options[draw]=1' \ -F 'signing_options[type]=1' \ -F 'signing_options[upload]=1' \ -F 'signing_options[phone]=1' \ -F 'signing_options[default_type]=draw' \ -F 'field_options[date_format]=DD - MM - YYYY' \ -F 'test_mode=1' ``` ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); $field_options = (new Dropbox\Sign\Model\SubFieldOptions()) ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); $signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) ->setDraw(true) ->setPhone(false) ->setType(true) ->setUpload(true); $signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jack") ->setEmailAddress("jack@example.com") ->setOrder(0); $signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jill") ->setEmailAddress("jill@example.com") ->setOrder(1); $signers = [ $signers_1, $signers_2, ]; $signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") ->setSubject("The NDA we talked about") ->setTestMode(true) ->setTitle("NDA with Acme Co.") ->setCcEmailAddresses([ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ]) ->setFiles([ ]) ->setMetadata(json_decode(<<<'EOD' { "custom_id": 1234, "custom_text": "NDA #9" } EOD, true)) ->setFieldOptions($field_options) ->setSigningOptions($signing_options) ->setSigners($signers); try { $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( signature_request_send_request: $signature_request_send_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$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 SignatureRequestSendExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; var fieldOptions = new SubFieldOptions( dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY ); var signingOptions = new SubSigningOptions( defaultType: SubSigningOptions.DefaultTypeEnum.Draw, draw: true, phone: false, type: true, upload: true ); var signers1 = new SubSignatureRequestSigner( name: "Jack", emailAddress: "jack@example.com", order: 0 ); var signers2 = new SubSignatureRequestSigner( name: "Jill", emailAddress: "jill@example.com", order: 1 ); var signers = new List { signers1, signers2, }; var signatureRequestSendRequest = new SignatureRequestSendRequest( message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", testMode: true, title: "NDA with Acme Co.", ccEmailAddresses: [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], files: new List { new FileStream( path: "./example_signature_request.pdf", mode: FileMode.Open ), }, metadata: JsonSerializer.Deserialize>(""" { "custom_id": 1234, "custom_text": "NDA #9" } """), fieldOptions: fieldOptions, signingOptions: signingOptions, signers: signers ); try { var response = new SignatureRequestApi(config).SignatureRequestSend( signatureRequestSendRequest: signatureRequestSendRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSend: " + 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 fieldOptions: models.SubFieldOptions = { dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, }; const signingOptions: models.SubSigningOptions = { defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, phone: false, type: true, upload: true, }; const signers1: models.SubSignatureRequestSigner = { name: "Jack", emailAddress: "jack@example.com", order: 0, }; const signers2: models.SubSignatureRequestSigner = { name: "Jill", emailAddress: "jill@example.com", order: 1, }; const signers = [ signers1, signers2, ]; const signatureRequestSendRequest: models.SignatureRequestSendRequest = { message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", testMode: true, title: "NDA with Acme Co.", ccEmailAddresses: [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], files: [ fs.createReadStream("./example_signature_request.pdf"), ], metadata: { "custom_id": 1234, "custom_text": "NDA #9" }, fieldOptions: fieldOptions, signingOptions: signingOptions, signers: signers, }; apiCaller.signatureRequestSend( signatureRequestSendRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); 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 SignatureRequestSendExample { 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 fieldOptions = new SubFieldOptions(); fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); var signingOptions = new SubSigningOptions(); signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); signingOptions.draw(true); signingOptions.phone(false); signingOptions.type(true); signingOptions.upload(true); var signers1 = new SubSignatureRequestSigner(); signers1.name("Jack"); signers1.emailAddress("jack@example.com"); signers1.order(0); var signers2 = new SubSignatureRequestSigner(); signers2.name("Jill"); signers2.emailAddress("jill@example.com"); signers2.order(1); var signers = new ArrayList(List.of ( signers1, signers2 )); var signatureRequestSendRequest = new SignatureRequestSendRequest(); signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); signatureRequestSendRequest.subject("The NDA we talked about"); signatureRequestSendRequest.testMode(true); signatureRequestSendRequest.title("NDA with Acme Co."); signatureRequestSendRequest.ccEmailAddresses(List.of ( "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com" )); signatureRequestSendRequest.files(List.of ( new File("./example_signature_request.pdf") )); signatureRequestSendRequest.metadata(JSON.deserialize(""" { "custom_id": 1234, "custom_text": "NDA #9" } """, Map.class)); signatureRequestSendRequest.fieldOptions(fieldOptions); signatureRequestSendRequest.signingOptions(signingOptions); signatureRequestSendRequest.signers(signers); try { var response = new SignatureRequestApi(config).signatureRequestSend( signatureRequestSendRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); 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 field_options = Dropbox::Sign::SubFieldOptions.new field_options.date_format = "DD - MM - YYYY" 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 signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new signers_1.name = "Jack" signers_1.email_address = "jack@example.com" signers_1.order = 0 signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new signers_2.name = "Jill" signers_2.email_address = "jill@example.com" signers_2.order = 1 signers = [ signers_1, signers_2, ] signature_request_send_request = Dropbox::Sign::SignatureRequestSendRequest.new signature_request_send_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." signature_request_send_request.subject = "The NDA we talked about" signature_request_send_request.test_mode = true signature_request_send_request.title = "NDA with Acme Co." signature_request_send_request.cc_email_addresses = [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ] signature_request_send_request.files = [ File.new("./example_signature_request.pdf", "r"), ] signature_request_send_request.metadata = JSON.parse(<<-EOD { "custom_id": 1234, "custom_text": "NDA #9" } EOD ) signature_request_send_request.field_options = field_options signature_request_send_request.signing_options = signing_options signature_request_send_request.signers = signers begin response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send( signature_request_send_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling SignatureRequestApi#signature_request_send: #{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: field_options = models.SubFieldOptions( date_format="DD - MM - YYYY", ) signing_options = models.SubSigningOptions( default_type="draw", draw=True, phone=False, type=True, upload=True, ) signers_1 = models.SubSignatureRequestSigner( name="Jack", email_address="jack@example.com", order=0, ) signers_2 = models.SubSignatureRequestSigner( name="Jill", email_address="jill@example.com", order=1, ) signers = [ signers_1, signers_2, ] signature_request_send_request = models.SignatureRequestSendRequest( message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject="The NDA we talked about", test_mode=True, title="NDA with Acme Co.", cc_email_addresses=[ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], files=[ open("./example_signature_request.pdf", "rb").read(), ], metadata=json.loads(""" { "custom_id": 1234, "custom_text": "NDA #9" } """), field_options=field_options, signing_options=signing_options, signers=signers, ) try: response = api.SignatureRequestApi(api_client).signature_request_send( signature_request_send_request=signature_request_send_request, ) pprint(response) except ApiException as e: print("Exception when calling SignatureRequestApi#signature_request_send: %s\n" % e) ``` */} 1. Check your email 2. Click on the "REVIEW AND SIGN" button 3. Sign and complete the signature request Let's check the status of the signature request by sending an API request to the [Get Signature Request](/api/signature-request/get) endpoint. 1. Paste your API Key into the **Security** tab once again. 2. Open the **Parameters** tab and paste the `signature_request_id` obtained in the previous step. 3. Press **Send** to send your request! **Get Signature Request:** You'll need to send a **GET** signature request using the Try it console above before moving on. To continue testing in your own environment find the code example for the language of your choice below: 1. Grab your [API Key](/api/api-reference-authentication#generate-new-api-key) from the [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) page. 2. Copy the corresponding code example for the [Get Signature Request](/api/signature-request/get) endpoint. 3. Use your API key and add or edit parameters to the copied code example and send the request. {/* ```cURL cURL curl -X GET 'https://api.hellosign.com/v3/signature_request/{signature_request_id}' \ -u 'YOUR_API_KEY:' ``` ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); try { $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestGet( signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling SignatureRequestApi#signatureRequestGet: {$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 SignatureRequestGetExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { var response = new SignatureRequestApi(config).SignatureRequestGet( signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```typescript TypeScript 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 SignatureRequestGetExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { var response = new SignatureRequestApi(config).SignatureRequestGet( signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```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 SignatureRequestGetExample { 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"); try { var response = new SignatureRequestApi(config).signatureRequestGet( "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling SignatureRequestApi#signatureRequestGet"); 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 begin response = Dropbox::Sign::SignatureRequestApi.new.signature_request_get( "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling SignatureRequestApi#signature_request_get: #{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: try: response = api.SignatureRequestApi(api_client).signature_request_get( signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", ) pprint(response) except ApiException as e: print("Exception when calling SignatureRequestApi#signature_request_get: %s\n" % e) ``` */} ### Embedded Signing In embedded signing flows, Dropbox Sign is providing the eSign technology via API, but you're *embedding the signing experience into your app or website*. Your user signs and completes documents without ever leaving the surface you own. In this model, all email notifications from Dropbox Sign are muted. You (the developer) are responsible for managing your user's notifications directly by consuming webhooks from [Dropbox Sign Events](/docs/events/overview). This section contains three main parts: 1. Creating an Embedded Signature Request 2. Generating an Embedded Sign URL using a signer's unique `signature_id` 3. Loading the document in our Embedded Testing Tool, or your own app, using a `sign_url` 4. Signing the document to complete the Embedded Signature Request Follow the steps below using the *Try it console*. 1. Paste your API Key into the **Security** tab. 2. Open the **Body** tab and inspect the request payload. 3. Replace the `client_id` value with your own API App's Client ID. 4. Replace the first signer's `email_address` and `name` values with your own test data. 5. Add a `metadata` property to the payload with a custom key-value pair. Like this: `"demo": "Hi from the demo"` 6. Add, edit or remove parameters in the payload as you wish — ensuring required parameters are included though. 7. Press **Send** to send your signature request! **Create Embedded Signature Request:** You'll need to create an embedded signature request using the *Try it console* above before moving on to the next section. Want to try testing in your own environment? No problem, you can find code examples below to send cURL requests from your terminal or using one of our official SDKs: 1. Grab your [API Key](/api/api-reference-authentication#generate-new-api-key) from the [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) page. 2. Copy the code from the tab of your language of choice below for the [Create Embedded Signature Request](/api/signature-request/create-embedded) endpoint. 3. Use your API key and add or edit parameters to the copied code example and send the request. ```json title="Default Example" { "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", "title": "NDA with Acme Co.", "subject": "The NDA we talked about", "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", "signers": [ { "email_address": "jack@example.com", "name": "Jack", "order": 0 }, { "email_address": "jill@example.com", "name": "Jill", "order": 1 } ], "cc_email_addresses": [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com" ], "file_urls": [ "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" ], "signing_options": { "draw": true, "type": true, "upload": true, "phone": false, "default_type": "draw" }, "test_mode": true } ``` ```json title="Grouped Signers Example" { "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", "title": "NDA with Acme Co.", "subject": "The NDA we talked about", "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", "grouped_signers": [ { "group": "Group #1", "order": 0, "signers": [ { "email_address": "jack@example.com", "name": "Jack" }, { "email_address": "jill@example.com", "name": "Jill" } ] }, { "group": "Group #2", "order": 1, "signers": [ { "email_address": "bob@example.com", "name": "Bob" }, { "email_address": "charlie@example.com", "name": "Charlie" } ] } ], "cc_email_addresses": [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com" ], "file_urls": [ "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" ], "signing_options": { "draw": true, "type": true, "upload": true, "phone": false, "default_type": "draw" }, "test_mode": true } ``` {/* */} {/* ```cURL cURL curl -X POST 'https://api.hellosign.com/v3/signature_request/create_embedded' \ -u 'YOUR_API_KEY:' \ -F 'client_id=YOUR_CLIENT_ID' \ -F 'files[0]=@mutual-NDA-example.pdf' \ -F 'title=NDA with Acme Co.' \ -F 'subject=The NDA we talked about' \ -F 'message=Please sign this NDA and then we can discuss more. Let me know if you have any questions.' \ -F 'signers[0][email_address]=jack@example.com' \ -F 'signers[0][name]=Jack' \ -F 'signers[0][order]=0' \ -F 'signers[1][email_address]=jill@example.com' \ -F 'signers[1][name]=Jill' \ -F 'signers[1][order]=1' \ -F 'cc_email_addresses[]=lawyer1@dropboxsign.com' \ -F 'cc_email_addresses[]=lawyer2@dropboxsign.com' \ -F 'signing_options[draw]=1' \ -F 'signing_options[type]=1' \ -F 'signing_options[upload]=1' \ -F 'signing_options[phone]=1' \ -F 'signing_options[default_type]=draw' \ -F 'test_mode=1' ``` ```php PHP 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); $signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jack") ->setEmailAddress("jack@example.com") ->setOrder(0); $signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jill") ->setEmailAddress("jill@example.com") ->setOrder(1); $signers = [ $signers_1, $signers_2, ]; $signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") ->setSubject("The NDA we talked about") ->setTestMode(true) ->setTitle("NDA with Acme Co.") ->setCcEmailAddresses([ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ]) ->setFiles([ ]) ->setSigningOptions($signing_options) ->setSigners($signers); try { $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( signature_request_create_embedded_request: $signature_request_create_embedded_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$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 SignatureRequestCreateEmbeddedExample { 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 ); var signers1 = new SubSignatureRequestSigner( name: "Jack", emailAddress: "jack@example.com", order: 0 ); var signers2 = new SubSignatureRequestSigner( name: "Jill", emailAddress: "jill@example.com", order: 1 ); var signers = new List { signers1, signers2, }; var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest( clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", testMode: true, title: "NDA with Acme Co.", ccEmailAddresses: [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], files: new List { new FileStream( path: "./example_signature_request.pdf", mode: FileMode.Open ), }, signingOptions: signingOptions, signers: signers ); try { var response = new SignatureRequestApi(config).SignatureRequestCreateEmbedded( signatureRequestCreateEmbeddedRequest: signatureRequestCreateEmbeddedRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbedded: " + 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, }; const signers1: models.SubSignatureRequestSigner = { name: "Jack", emailAddress: "jack@example.com", order: 0, }; const signers2: models.SubSignatureRequestSigner = { name: "Jill", emailAddress: "jill@example.com", order: 1, }; const signers = [ signers1, signers2, ]; const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", testMode: true, title: "NDA with Acme Co.", ccEmailAddresses: [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], files: [ fs.createReadStream("./example_signature_request.pdf"), ], signingOptions: signingOptions, signers: signers, }; apiCaller.signatureRequestCreateEmbedded( signatureRequestCreateEmbeddedRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); 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 SignatureRequestCreateEmbeddedExample { 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); var signers1 = new SubSignatureRequestSigner(); signers1.name("Jack"); signers1.emailAddress("jack@example.com"); signers1.order(0); var signers2 = new SubSignatureRequestSigner(); signers2.name("Jill"); signers2.emailAddress("jill@example.com"); signers2.order(1); var signers = new ArrayList(List.of ( signers1, signers2 )); var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); signatureRequestCreateEmbeddedRequest.testMode(true); signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com" )); signatureRequestCreateEmbeddedRequest.files(List.of ( new File("./example_signature_request.pdf") )); signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); signatureRequestCreateEmbeddedRequest.signers(signers); try { var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( signatureRequestCreateEmbeddedRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); 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 signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new signers_1.name = "Jack" signers_1.email_address = "jack@example.com" signers_1.order = 0 signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new signers_2.name = "Jill" signers_2.email_address = "jill@example.com" signers_2.order = 1 signers = [ signers_1, signers_2, ] signature_request_create_embedded_request = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.new signature_request_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" signature_request_create_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." signature_request_create_embedded_request.subject = "The NDA we talked about" signature_request_create_embedded_request.test_mode = true signature_request_create_embedded_request.title = "NDA with Acme Co." signature_request_create_embedded_request.cc_email_addresses = [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ] signature_request_create_embedded_request.files = [ File.new("./example_signature_request.pdf", "r"), ] signature_request_create_embedded_request.signing_options = signing_options signature_request_create_embedded_request.signers = signers begin response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded( signature_request_create_embedded_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling SignatureRequestApi#signature_request_create_embedded: #{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, ) signers_1 = models.SubSignatureRequestSigner( name="Jack", email_address="jack@example.com", order=0, ) signers_2 = models.SubSignatureRequestSigner( name="Jill", email_address="jill@example.com", order=1, ) signers = [ signers_1, signers_2, ] signature_request_create_embedded_request = models.SignatureRequestCreateEmbeddedRequest( client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject="The NDA we talked about", test_mode=True, title="NDA with Acme Co.", cc_email_addresses=[ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], files=[ open("./example_signature_request.pdf", "rb").read(), ], signing_options=signing_options, signers=signers, ) try: response = api.SignatureRequestApi(api_client).signature_request_create_embedded( signature_request_create_embedded_request=signature_request_create_embedded_request, ) pprint(response) except ApiException as e: print("Exception when calling SignatureRequestApi#signature_request_create_embedded: %s\n" % e) ``` */} Let's generate a Sign URL by sending an API request to the [Get Embedded Sign URL](/api/embedded/sign-url) endpoint. 1. Paste your API Key into the **Security** tab once again. 2. Open the **Parameters** tab and paste the `signature_id` obtained in the previous step. 3. Press **Send** to send your request! **Sign URL:** You'll need to generate a Sign URL using the *Try it console* above before moving on to the next section. To continue testing in your own environment find the code example for the language of your choice below: 1. Grab your [API Key](/api/api-reference-authentication#generate-new-api-key) from the [API Settings](https://app.hellosign.com/home/myAccount?current_tab=integrations#api) page. 2. Copy the corresponding code example for the [Get Embedded Sign URL](/api/embedded/sign-url) endpoint. 3. Use your API key and add or edit parameters to the copied code example and send the request. {/* ```cURL cURL curl -X GET 'https://api.hellosign.com/v3/embedded/sign_url/{signature_id}' \ -u 'YOUR_API_KEY:' ``` ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); try { $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedSignUrl( signature_id: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling EmbeddedApi#embeddedSignUrl: {$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 EmbeddedSignUrlExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { var response = new EmbeddedApi(config).EmbeddedSignUrl( signatureId: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedSignUrl: " + 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.EmbeddedApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.embeddedSignUrl( "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", // signatureId ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling EmbeddedApi#embeddedSignUrl:"); 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 EmbeddedSignUrlExample { 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"); try { var response = new EmbeddedApi(config).embeddedSignUrl( "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" // signatureId ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling EmbeddedApi#embeddedSignUrl"); 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 begin response = Dropbox::Sign::EmbeddedApi.new.embedded_sign_url( "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", # signature_id ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling EmbeddedApi#embedded_sign_url: #{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: try: response = api.EmbeddedApi(api_client).embedded_sign_url( signature_id="50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", ) pprint(response) except ApiException as e: print("Exception when calling EmbeddedApi#embedded_sign_url: %s\n" % e) ``` */} Follow the steps below to load the document in our Embedded Testing Tool using the `sign_url` from the previous step. 1. Navigate to the Embedded Testing Tool. 2. Paste your API App's Client ID in the **Client ID** field. 3. Paste the `sign_url` in the **Embedded URL** field. 4. Click **Launch Embedded** button. **Note:** You may choose to complete these steps using your own plaform, just grab the `sign_url` to load the document. With the document loaded in our Embedded Testing Tool, or your web app, go ahead and complete the signature request. #### Client Side Library We provide a client-side library that handles the authorization and display of the embedded request using an iFrame. You can take advantage of this library to make implementation easier. To install, you can use a modern module bundler like [npm](https://npmjs.com/package/hellosign-embedded) and simply `npm install hellosign-embedded`. Alternativey, the client-side library can be [downloaded manually](https://github.com/hellosign/hellosign-embedded/releases), [compiled from source](https://github.com/hellosign/hellosign-embedded/wiki/Compile-From-Source), or [imported from our CDN](https://github.com/hellosign/hellosign-embedded/wiki/CDN-Links). For more details on how to use it, take a look at the [Client Side](/docs/embedded-signing/walkthrough/#client-side) section in one of our embedded workflows walkthroughs. ## Next Steps Fantastic job! By now, you should have a pretty good idea of how to interact with the Dropbox Sign API and implement it in a way that will fit your business needs. We hope you've enjoyed the content and happy coding! ## Resources and Tips Most of the resources we would recommend you familiarize yourself with are: * [API Dashboard](/docs/api-dashboard/overview/) * [Events & Callbacks](/docs/events/overview/) * [App Approval Overview](/docs/app-approval/overview/) * [Official Dropbox Sign SDKs](/docs/sdks/overview/#official-dropbox-sign-sdks) * [Client Side Library How-to](/docs/embedded-signing/walkthrough/#client-side) ## Getting Help If you need help or get stuck, please reach out to API support: Submit a Ticket We warmly welcome your feedback, feature requests, and bug reports!