### Install Dropbox Sign SDK via NPM Source: https://github.com/hellosign/dropbox-sign-node/blob/main/README.md Install the official Dropbox Sign Node.js SDK using npm. This is the recommended method for most projects. ```bash npm install @dropbox/sign ``` -------------------------------- ### TypeScript Example for signatureRequestBulkCreateEmbeddedWithTemplate Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/SignatureRequestApi.md This example demonstrates how to create a bulk send job for embedded signature requests using a template. It requires setting up signer lists, custom fields, and CC recipients. Ensure you have the correct client ID and template IDs. ```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"; const signerList2CustomFields1: models.SubBulkSignerListCustomField = { name: "company", value: "123 LLC", }; const signerList2CustomFields = [ signerList2CustomFields1, ]; const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "Mary", emailAddress: "mary@example.com", pin: "gd9as5b", }; const signerList2Signers = [ signerList2Signers1, ]; const signerList1CustomFields1: models.SubBulkSignerListCustomField = { name: "company", value: "ABC Corp", }; const signerList1CustomFields = [ signerList1CustomFields1, ]; const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", pin: "d79a3td", }; const signerList1Signers = [ signerList1Signers1, ]; const signerList1: models.SubBulkSignerList = { customFields: signerList1CustomFields, signers: signerList1Signers, }; const signerList2: models.SubBulkSignerList = { customFields: signerList2CustomFields, signers: signerList2Signers, }; const signerList = [ signerList1, signerList2, ]; const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@example.com", }; const ccs = [ ccs1, ]; const signatureRequestBulkCreateEmbeddedWithTemplateRequest: models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { clientId: "1a659d9ad95bccd307ecad78d72192f8", templateIds: [ "c26b8a16784a872da37ea946b9ddec7c1e11dff6", ], message: "Glad we could come to an agreement.", subject: "Purchase Order", testMode: true, signerList: signerList, ccs: ccs, }; apiCaller.signatureRequestBulkCreateEmbeddedWithTemplate( signatureRequestBulkCreateEmbeddedWithTemplateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate:"); console.log(error.body); }); ``` -------------------------------- ### Create Dropbox Sign Account using TypeScript Source: https://github.com/hellosign/dropbox-sign-node/blob/main/README.md Example demonstrating how to create a new Dropbox Sign account using the TypeScript SDK. Ensure you have set your API key or access token. ```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"; const accountCreateRequest: models.AccountCreateRequest = { emailAddress: "newuser@dropboxsign.com", }; apiCaller.accountCreate( accountCreateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling AccountApi#accountCreate:"); console.log(error.body); }); ``` -------------------------------- ### reportCreate() Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/ReportApi.md Creates one or more reports. You will receive an email with a download link once the reports are generated. The date range can be up to 12 months, and the start date cannot be more than 10 years in the past. ```APIDOC ## POST /report/create ### Description Create Report Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. ### Method POST ### Endpoint /report/create ### Parameters #### Request Body - **reportCreateRequest** (ReportCreateRequest) - Required - ### Request Example ```json { "startDate": "09/01/2020", "endDate": "09/01/2020", "reportType": [ "user_activity", "document_status" ] } ``` ### Response #### Success Response (200) - **body** (ReportCreateResponse) - ### Response Example ```json { "example": "response body" } ``` ### Authorization api_key ``` -------------------------------- ### TypeScript Example for Bulk Send with Template Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/SignatureRequestApi.md This snippet demonstrates how to use the signatureRequestBulkSendWithTemplate method to create a BulkSendJob. It includes setting up signer lists, custom fields, CC recipients, and the main request object. Ensure you have the necessary API key and plan level. ```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 signerList2CustomFields1: models.SubBulkSignerListCustomField = { name: "company", value: "123 LLC", }; const signerList2CustomFields = [ signerList2CustomFields1, ]; const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "Mary", emailAddress: "mary@example.com", pin: "gd9as5b", }; const signerList2Signers = [ signerList2Signers1, ]; const signerList1CustomFields1: models.SubBulkSignerListCustomField = { name: "company", value: "ABC Corp", }; const signerList1CustomFields = [ signerList1CustomFields1, ]; const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", pin: "d79a3td", }; const signerList1Signers = [ signerList1Signers1, ]; const signerList1: models.SubBulkSignerList = { customFields: signerList1CustomFields, signers: signerList1Signers, }; const signerList2: models.SubBulkSignerList = { customFields: signerList2CustomFields, signers: signerList2Signers, }; const signerList = [ signerList1, signerList2, ]; const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@example.com", }; const ccs = [ ccs1, ]; const signatureRequestBulkSendWithTemplateRequest: models.SignatureRequestBulkSendWithTemplateRequest = { templateIds: [ "c26b8a16784a872da37ea946b9ddec7c1e11dff6", ], message: "Glad we could come to an agreement.", subject: "Purchase Order", testMode: true, signerList: signerList, ccs: ccs, }; apiCaller.signatureRequestBulkSendWithTemplate( signatureRequestBulkSendWithTemplateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate:"); console.log(error.body); }); ``` -------------------------------- ### Get Template Files Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TemplateApi.md Obtain a copy of the current documents specified by the template ID. Returns a PDF or ZIP file. If files are being prepared, a 409 status code will be returned, requiring a wait for the `template_created` callback event. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.templateFiles( "f57db65d3f933b5316d398057a36176831451a35", // templateId undefined, // fileType ).then(response => { fs.createWriteStream('./file_response').write(response.body); }).catch(error => { console.log("Exception when calling TemplateApi#templateFiles:"); console.log(error.body); }); ``` -------------------------------- ### Get Account API Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/AccountApi.md Retrieve the properties and settings of your account. You can specify an account ID or email address to get a specific account's details. Ensure your API key is set. ```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); }); ``` -------------------------------- ### Get Team Information - TypeScript Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TeamApi.md Retrieves information about your team and its members. Returns a 404 error if you do not belong to a team. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TeamApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.teamGet().then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TeamApi#teamGet:"); console.log(error.body); }); ``` -------------------------------- ### Get Template Files as File URL Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TemplateApi.md Obtain a copy of the current documents specified by the template_id. This method returns a URL to the file (PDFs only). If files are being prepared, a 409 status code is returned, and you should wait for the `template_created` callback event. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.templateFilesAsFileUrl( "f57db65d3f933b5316d398057a36176831451a35", // templateId 1, // forceDownload ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TemplateApi#templateFilesAsFileUrl:"); console.log(error.body); }); ``` -------------------------------- ### Get Template Files as Data URI (TypeScript) Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TemplateApi.md Use this method to obtain a base64 encoded PDF file of a template. It returns a `409` status code if files are still being prepared, in which case you should wait for a `template_created` callback. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.templateFilesAsDataUri( "f57db65d3f933b5316d398057a36176831451a35", // templateId ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TemplateApi#templateFilesAsDataUri:"); console.log(error.body); }); ``` -------------------------------- ### Get Signature Request by ID Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/SignatureRequestApi.md Retrieves the status of a specific SignatureRequest using its ID. Ensure you have your API key or access token configured. ```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"; apiCaller.signatureRequestGet( "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling SignatureRequestApi#signatureRequestGet:"); console.log(error.body); }); ``` -------------------------------- ### Update Signature Request TypeScript Example Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/SignatureRequestApi.md Use this snippet to update the email address or name of a signer on a signature request. Note that updating an email address generates a new signature ID. This action is not permitted on requests with an appended signature page. ```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 signatureRequestUpdateRequest: models.SignatureRequestUpdateRequest = { signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", emailAddress: "john@example.com", }; apiCaller.signatureRequestUpdate( "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId signatureRequestUpdateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling SignatureRequestApi#signatureRequestUpdate:"); console.log(error.body); }); ``` -------------------------------- ### Get Fax Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/FaxApi.md Retrieves detailed information about a specific fax document. ```APIDOC ## GET /fax/{fax_id} ### Description Returns information about a Fax. ### Method GET ### Endpoint /fax/{fax_id} ### Parameters #### Path Parameters - **faxId** (string) - Required - Fax ID ### Return type [**FaxGetResponse**](../model/FaxGetResponse.md) ### Authorization api_key ### HTTP request headers - **Content-Type**: Not defined - **Accept**: `application/json` ``` -------------------------------- ### Get Team Info by ID Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TeamApi.md Retrieves detailed information about a specific team using its unique identifier. ```APIDOC ## teamInfo(teamId: string) ### Description Provides information about a team. ### Method GET ### Endpoint /team/{team_id} ### Parameters #### Path Parameters - **teamId** (string) - Required - The id of the team. ### Return type [TeamGetInfoResponse](../model/TeamGetInfoResponse.md) ### Authorization [api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) ### Request Example ```typescript import api from "@dropbox/sign" const apiCaller = new api.TeamApi(); apiCaller.username = "YOUR_API_KEY"; apiCaller.teamInfo("4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c").then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TeamApi#teamInfo:"); console.log(error.body); }); ``` ### Response #### Success Response (200) - **body** (TeamGetInfoResponse) - The response object containing team information. ``` -------------------------------- ### Create API App Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/ApiAppApi.md Use this to create a new API App. Ensure you have the necessary scopes and provide all required parameters, including optional ones like OAuth and white-labeling options. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.ApiAppApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; const oauth: models.SubOAuth = { callbackUrl: "https://example.com/oauth", scopes: [ models.SubOAuth.ScopesEnum.BasicAccountInfo, models.SubOAuth.ScopesEnum.RequestSignature, ], }; const whiteLabelingOptions: models.SubWhiteLabelingOptions = { primaryButtonColor: "#00b3e6", primaryButtonTextColor: "#ffffff", }; const apiAppCreateRequest: models.ApiAppCreateRequest = { name: "My Production App", domains: [ "example.com", ], customLogoFile: fs.createReadStream("CustomLogoFile.png"), oauth: oauth, whiteLabelingOptions: whiteLabelingOptions, }; apiCaller.apiAppCreate( apiAppCreateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling ApiAppApi#apiAppCreate:"); console.log(error.body); }); ``` -------------------------------- ### Get Team Information Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TeamApi.md Retrieves information about your team and its members. Returns a 404 error if you do not belong to a team. ```APIDOC ## teamGet() ### Description Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned. ### Method GET ### Endpoint /team ### Parameters This endpoint does not require any parameters. ### Return type [TeamGetResponse](../model/TeamGetResponse.md) ### Authorization [api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) ### Request Example ```typescript import api from "@dropbox/sign" const apiCaller = new api.TeamApi(); apiCaller.username = "YOUR_API_KEY"; apiCaller.teamGet().then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TeamApi#teamGet:"); console.log(error.body); }); ``` ### Response #### Success Response (200) - **body** (TeamGetResponse) - The response object containing team information. ``` -------------------------------- ### accountGet Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/AccountApi.md Retrieves the properties and settings of your Account. ```APIDOC ## GET /account ### Description Returns the properties and settings of your Account. ### Method GET ### Endpoint /account ### Parameters #### Query Parameters - **accountId** (string) - Optional - `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. - **emailAddress** (string) - Optional - `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. ### Response #### Success Response (200) - **AccountGetResponse** - The response object containing account details. ### Authorization [api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) ``` -------------------------------- ### Get Fax Line Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/FaxLineApi.md Retrieves the properties and settings of a specific fax line. Requires the fax line number. ```APIDOC ## faxLineGet() ### Description Returns the properties and settings of a Fax Line. ### Method GET ### Endpoint /fax_lines/{number} ### Parameters #### Path Parameters - **number** (string) - Required - The Fax Line number. ### Response #### Success Response (200) - **faxLineResponse** (FaxLineResponse) - Details of the requested fax line. #### Response Example ```json { "fax_line": { "area_code": 209, "country": "US", "fax_number": "+12095550100", "is_team_line": false, "created_at": "2023-10-27T10:00:00Z" } } ``` ``` -------------------------------- ### Create Template with TypeScript Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TemplateApi.md Use this snippet to create a new template for signature requests. It demonstrates how to configure signer roles, form fields, merge fields, and file attachments. Ensure you have the necessary API key and have set up the SDK. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; const fieldOptions: models.SubFieldOptions = { dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, }; const signerRoles1: models.SubTemplateRole = { name: "Client", order: 0, }; const signerRoles2: models.SubTemplateRole = { name: "Witness", order: 1, }; const signerRoles = [ signerRoles1, signerRoles2, ]; const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { documentIndex: 0, apiId: "uniqueIdHere_1", type: "text", required: true, signer: "1", width: 100, height: 16, x: 112, y: 328, name: "", page: 1, placeholder: "", validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, }; const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { documentIndex: 0, apiId: "uniqueIdHere_2", type: "signature", required: true, signer: "0", width: 120, height: 30, x: 530, y: 415, name: "", page: 1, }; const formFieldsPerDocument = [ formFieldsPerDocument1, formFieldsPerDocument2, ]; const mergeFields1: models.SubMergeField = { name: "Full Name", type: models.SubMergeField.TypeEnum.Text, }; const mergeFields2: models.SubMergeField = { name: "Is Registered?", type: models.SubMergeField.TypeEnum.Checkbox, }; const mergeFields = [ mergeFields1, mergeFields2, ]; const templateCreateRequest: models.TemplateCreateRequest = { clientId: "37dee8d8440c66d54cfa05d92c160882", message: "For your approval", subject: "Please sign this document", testMode: true, title: "Test Template", ccRoles: [ "Manager", ], files: [ fs.createReadStream("./example_signature_request.pdf"), ], fieldOptions: fieldOptions, signerRoles: signerRoles, formFieldsPerDocument: formFieldsPerDocument, mergeFields: mergeFields, }; apiCaller.templateCreate( templateCreateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TemplateApi#templateCreate:"); console.log(error.body); }); ``` -------------------------------- ### ReportCreateRequest Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/model/ReportCreateRequest.md Represents the data structure for creating a report. It requires a start date, end date, and the type of report to be generated. ```APIDOC ## ReportCreateRequest ### Description Represents the data structure for creating a report. It requires a start date, end date, and the type of report to be generated. ### Properties #### `endDate` (string) - Required The (inclusive) end date for the report data in `MM/DD/YYYY` format. #### `reportType` (Array) - Required The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. - `user_activity`: Contains a list of all users and their activity during the specified date range. - `document_status`: Contains a list of signature requests created in the specified time range (and their status). #### `startDate` (string) - Required The (inclusive) start date for the report data in `MM/DD/YYYY` format. ### Request Example ```json { "startDate": "01/01/2023", "endDate": "12/31/2023", "reportType": ["user_activity", "document_status"] } ``` ``` -------------------------------- ### apiAppCreate Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/ApiAppApi.md Creates a new API App. This operation allows for the configuration of app name, domains, custom logos, OAuth settings, and white-labeling options. ```APIDOC ## POST /api_app ### Description Create API App Creates a new API App. ### Method POST ### Endpoint /api_app ### Parameters #### Request Body - **apiAppCreateRequest** (ApiAppCreateRequest) - Required - Details of the API App to create. ### Request Example ```json { "name": "My Production App", "domains": [ "example.com" ], "customLogoFile": "", "oauth": { "callbackUrl": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" ] }, "whiteLabelingOptions": { "primaryButtonColor": "#00b3e6", "primaryButtonTextColor": "#ffffff" } } ``` ### Response #### Success Response (200) - **ApiAppGetResponse** - Details of the created API App. #### Response Example ```json { "app_id": "0dd3b823a682527788c4e40cb7b6f7e9", "name": "My Production App", "created_at": 1678886400, "oauth": { "client_id": "example_client_id", "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" ] }, "white_labeling_options": { "primary_button_color": "#00b3e6", "primary_button_text_color": "#ffffff" } } ``` ``` -------------------------------- ### Get Team Info by ID - TypeScript Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TeamApi.md Provides information about a specific team using its ID. Ensure you have the correct team ID. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TeamApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.teamInfo( "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TeamApi#teamInfo:"); console.log(error.body); }); ``` -------------------------------- ### templateCreate() Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TemplateApi.md Creates a template that can be used in future signature requests. If `client_id` is provided, the template will be created as an embedded template. Template creation may complete asynchronously. ```APIDOC ## `templateCreate()` ### Description Creates a template that can be used in future signature requests. If `client_id` is provided, the template will be created as an embedded template. Embedded templates can be used for embedded signature requests and can be edited later by generating a new `edit_url` with [/embedded/edit_url/{template_id}](/api/reference/operation/embeddedEditUrl/). Template creation may complete asynchronously after the initial request is accepted. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event indicates the template is ready to use, while a `template_error` event indicates there was a problem while creating the template. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. ### Method POST ### Endpoint /template ### Parameters #### Request Body - **templateCreateRequest** (TemplateCreateRequest) - Required - The request object for creating a template. ### Request Example ```json { "clientId": "37dee8d8440c66d54cfa05d92c160882", "message": "For your approval", "subject": "Please sign this document", "testMode": true, "title": "Test Template", "ccRoles": [ "Manager" ], "files": [ "./example_signature_request.pdf" ], "fieldOptions": { "dateFormat": "DD/MM/YYYY" }, "signerRoles": [ { "name": "Client", "order": 0 }, { "name": "Witness", "order": 1 } ], "formFieldsPerDocument": [ { "documentIndex": 0, "apiId": "uniqueIdHere_1", "type": "text", "required": true, "signer": "1", "width": 100, "height": 16, "x": 112, "y": 328, "name": "", "page": 1, "placeholder": "", "validationType": "NumbersOnly" }, { "documentIndex": 0, "apiId": "uniqueIdHere_2", "type": "signature", "required": true, "signer": "0", "width": 120, "height": 30, "x": 530, "y": 415, "name": "", "page": 1 } ], "mergeFields": [ { "name": "Full Name", "type": "text" }, { "name": "Is Registered?", "type": "checkbox" } ] } ``` ### Response #### Success Response (200) - **template** (TemplateCreateResponse) - Description of the template created. #### Response Example ```json { "template": { "template_id": "a1b2c3d4e5f67890", "title": "Test Template", "message": "For your approval", "subject": "Please sign this document", "created_at": "2023-10-27T10:00:00Z", "is_embedded": true, "is_archived": false, "is_deleted": false, "signer_roles": [ { "name": "Client", "order": 0 }, { "name": "Witness", "order": 1 } ], "cc_roles": [ "Manager" ], "form_fields_per_document": [ { "document_index": 0, "api_id": "uniqueIdHere_1", "type": "text", "required": true, "signer": "1", "width": 100, "height": 16, "x": 112, "y": 328, "name": "", "page": 1, "placeholder": "", "validation_type": "NumbersOnly" }, { "document_index": 0, "api_id": "uniqueIdHere_2", "type": "signature", "required": true, "signer": "0", "width": 120, "height": 30, "x": 530, "y": 415, "name": "", "page": 1 } ], "merge_fields": [ { "name": "Full Name", "type": "text" }, { "name": "Is Registered?", "type": "checkbox" } ], "test_mode": true, "client_id": "37dee8d8440c66d54cfa05d92c160882" } } ``` ### Authorization api_key, oauth2 ### HTTP request headers - **Content-Type**: `application/json`, `multipart/form-data` - **Accept**: `application/json` ``` -------------------------------- ### Get Fax Information using FaxApi Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/FaxApi.md Retrieves information about a specific Fax using its ID. Requires an API key for authentication. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.FaxApi(); apiCaller.username = "YOUR_API_KEY"; apiCaller.faxGet( "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling FaxApi#faxGet:"); console.log(error.body); }); ``` -------------------------------- ### teamInfo Source: https://github.com/hellosign/dropbox-sign-node/blob/main/README.md Gets general information about a team. This endpoint provides specific details about a team, potentially different from the authenticated user's team. ```APIDOC ## GET /team/info ### Description Gets general information about a team. This endpoint provides specific details about a team, potentially different from the authenticated user's team. ### Method GET ### Endpoint /team/info ``` -------------------------------- ### AccountCreateRequest Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/model/AccountCreateRequest.md Represents the data structure for creating a new account. ```APIDOC ## AccountCreateRequest ### Description Represents the data structure for creating a new account. ### Properties #### Request Body - **emailAddress** (string) - Required - The email address which will be associated with the new Account. - **clientId** (string) - Optional - Used when creating a new account with OAuth authorization. - **clientSecret** (string) - Optional - Used when creating a new account with OAuth authorization. - **locale** (string) - Optional - The locale used in this Account. ``` -------------------------------- ### templateList Source: https://github.com/hellosign/dropbox-sign-node/blob/main/README.md Retrieves a list of all available templates. ```APIDOC ## GET /template/list ### Description List Templates ### Method GET ### Endpoint /template/list ``` -------------------------------- ### Get API App Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/ApiAppApi.md Retrieves information about a specific API App using its client ID. This is useful for inspecting the details of an existing app. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.ApiAppApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.apiAppGet( "0dd3b823a682527788c4e40cb7b6f7e9", // clientId ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling ApiAppApi#apiAppGet:"); console.log(error.body); }); ``` -------------------------------- ### Get Embedded Sign URL Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/EmbeddedApi.md Use this to retrieve an embedded URL for signing a document. This is applicable for templates created through the embedded template process. ```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); }); ``` -------------------------------- ### teamCreate Source: https://github.com/hellosign/dropbox-sign-node/blob/main/README.md Creates a new team. This endpoint allows for the establishment of a new team within the system. ```APIDOC ## POST /team/create ### Description Creates a new team. This endpoint allows for the establishment of a new team within the system. ### Method POST ### Endpoint /team/create ``` -------------------------------- ### TeamCreateRequest Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/model/TeamCreateRequest.md Represents the data structure for creating a new team. ```APIDOC ## TeamCreateRequest ### Description Represents the data structure for creating a new team. ### Properties #### Request Body - **name** (string) - Required - The name of your Team. [default to 'Untitled Team'] ``` -------------------------------- ### List templates with pagination and search Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TemplateApi.md Use `templateList` to retrieve a list of templates. You can specify `accountId`, `page`, `pageSize`, and `query` for filtering and pagination. This method requires authentication. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.templateList( undefined, // accountId 1, // page 20, // pageSize undefined, // query ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TemplateApi#templateList:"); console.log(error.body); }); ``` -------------------------------- ### Get a specific template by ID Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/TemplateApi.md Use `templateGet` to retrieve a single template. Provide the `templateId` of the template you wish to fetch. This method requires authentication. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.templateGet( "f57db65d3f933b5316d398057a36176831451a35", // templateId ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TemplateApi#templateGet:"); console.log(error.body); }); ``` -------------------------------- ### Get Bulk Send Job Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/BulkSendJobApi.md Retrieves the status of a specific Bulk Send Job and its associated SignatureRequests using the job's unique ID. ```APIDOC ## GET /bulk_send_job/{bulk_send_job_id} ### Description Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. ### Method GET ### Endpoint /bulk_send_job/{bulk_send_job_id} ### Parameters #### Path Parameters - **bulkSendJobId** (string) - Required - The id of the BulkSendJob to retrieve. #### Query Parameters - **page** (number) - Optional - Which page number of the BulkSendJob list to return. Defaults to `1`. - **pageSize** (number) - Optional - Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. ### Request Example ```typescript import api from "@dropbox/sign" const apiCaller = new api.BulkSendJobApi(); apiCaller.username = "YOUR_API_KEY"; apiCaller.bulkSendJobGet( "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId 1, // page 20, // pageSize ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling BulkSendJobApi#bulkSendJobGet:"); console.log(error.body); }); ``` ### Response #### Success Response (200) - **BulkSendJobGetResponse** - The response object containing the Bulk Send Job details. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Create Unclaimed Draft Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/UnclaimedDraftApi.md Use this method to create a new Draft that can be claimed using a claim URL. The first user to access the URL claims the Draft. Subsequent access results in a 404. ```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 signers1: models.SubUnclaimedDraftSigner = { name: "Jack", emailAddress: "jack@example.com", order: 0, }; const signers = [ signers1, ]; const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, testMode: true, files: [ fs.createReadStream("./example_signature_request.pdf"), ], signers: signers, }; apiCaller.unclaimedDraftCreate( unclaimedDraftCreateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); console.log(error.body); }); ``` -------------------------------- ### Get Available Fax Line Area Codes - TypeScript Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/FaxLineApi.md Returns a list of available area codes for a given country, state, province, and city. You can filter by any of these parameters. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.FaxLineApi(); apiCaller.username = "YOUR_API_KEY"; apiCaller.faxLineAreaCodeGet( "US", // country undefined, // state undefined, // province undefined, // city ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling FaxLineApi#faxLineAreaCodeGet:"); console.log(error.body); }); ``` -------------------------------- ### templateCreate Source: https://github.com/hellosign/dropbox-sign-node/blob/main/README.md Creates a new template. This endpoint allows users to define and save new templates for signature requests. ```APIDOC ## POST /template/create ### Description Creates a new template. This endpoint allows users to define and save new templates for signature requests. ### Method POST ### Endpoint /template/create ``` -------------------------------- ### Create Report with ReportApi Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/ReportApi.md Use this snippet to request the creation of user activity and document status reports. Ensure your API key is set and the request object is correctly formatted with desired report types and date range. ```typescript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.ReportApi(); apiCaller.username = "YOUR_API_KEY"; const reportCreateRequest: models.ReportCreateRequest = { startDate: "09/01/2020", endDate: "09/01/2020", reportType: [ models.ReportCreateRequest.ReportTypeEnum.UserActivity, models.ReportCreateRequest.ReportTypeEnum.DocumentStatus, ], }; apiCaller.reportCreate( reportCreateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling ReportApi#reportCreate:"); console.log(error.body); }); ``` -------------------------------- ### ApiAppListResponse Properties Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/model/ApiAppListResponse.md The ApiAppListResponse model includes the following properties: apiApps, listInfo, and warnings. ```APIDOC ## ApiAppListResponse ### Properties - **apiApps** (Array) - Required - Contains information about API Apps. - **listInfo** (ListInfoResponse) - Required - - **warnings** (Array) - Optional - A list of warnings. ``` -------------------------------- ### Fax Line API Endpoints Source: https://github.com/hellosign/dropbox-sign-node/blob/main/README.md Endpoints for managing fax lines, including adding/removing users, retrieving area codes, purchasing, deleting, getting, and listing fax lines. ```APIDOC ## PUT /fax_line/add_user ### Description Add Fax Line User ### Method PUT ### Endpoint /fax_line/add_user ``` ```APIDOC ## GET /fax_line/area_codes ### Description Get Available Fax Line Area Codes ### Method GET ### Endpoint /fax_line/area_codes ``` ```APIDOC ## POST /fax_line/create ### Description Purchase Fax Line ### Method POST ### Endpoint /fax_line/create ``` ```APIDOC ## DELETE /fax_line ### Description Delete Fax Line ### Method DELETE ### Endpoint /fax_line ``` ```APIDOC ## GET /fax_line ### Description Get Fax Line ### Method GET ### Endpoint /fax_line ``` ```APIDOC ## GET /fax_line/list ### Description List Fax Lines ### Method GET ### Endpoint /fax_line/list ``` ```APIDOC ## PUT /fax_line/remove_user ### Description Remove Fax Line Access ### Method PUT ### Endpoint /fax_line/remove_user ``` -------------------------------- ### apiAppList Source: https://github.com/hellosign/dropbox-sign-node/blob/main/docs/api/ApiAppApi.md Retrieves a list of all API Apps associated with the authenticated account. ```APIDOC ## GET /api_app/list ### Description List API Apps Returns a list of API Apps associated with the account. ### Method GET ### Endpoint /api_app/list ### Response #### Success Response (200) - **ApiAppListResponse** - A list of API Apps. #### Response Example ```json { "api_apps": [ { "app_id": "0dd3b823a682527788c4e40cb7b6f7e9", "name": "My Production App", "created_at": 1678886400, "oauth": { "client_id": "example_client_id", "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" ] } }, { "app_id": "a1b2c3d4e5f678901234567890abcdef", "name": "My Test App", "created_at": 1678886400, "oauth": { "client_id": "example_client_id_2", "callback_url": "https://example.com/oauth_test", "scopes": [ "basic_account_info" ] } } ] } ``` ### Authorization [api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: `application/json` ```