BoldSign AI Assistant
Chat with the BoldSign AI AssistantEmbedded cloned document
The embedded cloned document link allows users to prepare the cloned documents on your website or mobile app using an iFrame, popup window, or a new tab.
Clone Document
Creating the new document with existing document data but It is organized under new document id. The Clone document API allows users to clone the existing document into new document. The form fields can be includeded in the document by enabling true in WithFormFieldValues.This API also create embedded link for that newly cloned document.
Get embedded cloned document link
post/v1/document/cloneDocumentThe get embedded cloned document link has additional properties to customize the embedded process.
Code snippet
curl -X 'POST' \
'https://api.boldsign.com/v1/document/cloneDocument?documentId=be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx' \
-H 'accept: application/json' \
-H 'X-API-KEY: {your API Key}' \
-H 'Content-Type: multipart/form-data' \
-F 'ViewOption=PreparePage' \
-F 'ShowSaveButton=true' \
-F 'ShowCreateButton=true' \
-F 'ShowPreviewButton=true' \
-F 'ShowNavigationButtons=true' \
-F 'EmbeddedSendLinkValidTill=DateTime.Now.AddDays(1)' \
-F 'WithFormFieldValues=true' \
-F 'Locale=EN' \
-F 'ShowToolbar=false' \
-F 'ShowTooltip=false' \
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");
var documentClient = new DocumentClient(apiClient);
var embeddedCloneDocumentRequest = new EmbeddedCloneDocumentRequest()
{
DocumentId = "YOUR_DOCUMENT_ID",
ViewOption = PageViewOption.PreparePage,
ShowSaveButton = true,
ShowPreviewButton = true,
ShowNavigationButtons = true,
EmbeddedSendLinkValidTill = DateTime.Now.AddDays(1),
WithFormFieldValues = true,
Locale = Locales.EN,
ShowCreateButton = true,
ShowToolbar = false,
ShowTooltip = false,
};
var embeddedClonedDocument = documentClient.GetEmbeddedClonedDocumentUrl(embeddedCloneDocumentRequest);
var documentEmbedUrl = embeddedClonedDocument.embedUrl;
import boldsign
configuration = boldsign.Configuration(host="https://api.boldsign.com", api_key="YOUR_API_KEY")
with boldsign.ApiClient(configuration) as api_client:
document_api = boldsign.DocumentApi(api_client)
embedded_clone_document_request = boldsign.EmbeddedCloneDocumentRequest(
ViewOption = "PreparePage",
ShowSaveButton = true,
ShowPreviewButton = true,
ShowNavigationButtons = true,
WithFormFieldValues = true,
Locale = "EN",
ShowCreateButton = true,
ShowToolbar = false,
ShowTooltip = false)
embedded_cloned_document = document_api.get_embedded_cloned_document_url(document_id= "YOUR_DOCUMENT_ID", embedded_cloned_document_request=embedded_cloned_document_request)
<?php require_once "vendor/autoload.php";
use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\EmbeddedCloneDocumentRequest;
$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');
$document_api = new DocumentApi($config);
$embedded_clone_document_request = new EmbeddedCloneDocumentRequest();
$embedded_clone_document_request->setShowToolbar(true);
$embedded_clone_document_request->setShowTooltip(true);
$embedded_clone_document_request->setShowSaveButton(true);
$embedded_clone_document_request->setShowPreviewButton(false);
$embedded_clone_document_request->setViewOption('PreparePage');
$embedded_clone_document_request->setWithFormFieldValues(true);
$embedded_clone_document_request->setShowNavigationButtons(true);
$embedded_cloned_document = $document_api->getEmbeddedClonedDocumentUrl($document_id = 'YOUR_DOCUMENT_ID', $embedded_clone_document_request);
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
DocumentApi documentApi = new DocumentApi(client);
EmbeddedCloneDocumentRequest embeddedCloneDocumentRequest = new EmbeddedCloneDocumentRequest();
embeddedCloneDocumentRequest.setShowToolbar(true);
embeddedCloneDocumentRequest.setShowTooltip(true);
embeddedCloneDocumentRequest.setShowSaveButton(true);
embeddedCloneDocumentRequest.setShowPreviewButton(false);
embeddedCloneDocumentRequest.setViewOption(embeddedCloneDocumentRequest.ViewOptionEnum.PREPARE_PAGE);
embeddedCloneDocumentRequest.setWithFormFieldValues(true);
embeddedCloneDocumentRequest.setShowNavigationButtons(true);
EmbeddedClonedDocument embeddedClonedDocument = documentApi.getEmbeddedClonedDocumentUrl("YOUR_DOCUMENT_ID", embeddedCloneDocumentRequest);
import { documentApi, EmbeddedCloneDocumentRequest } from "boldsign";
const baseUrl:string = "https://api.boldsign.com";
const documentApi = new documentApi(baseUrl);
documentApi.setApiKey("YOUR_API_KEY");
const embeddedCloneDocumentRequest = new EmbeddedCloneDocumentRequest();
embeddedCloneDocumentRequest.showToolbar = true;
embeddedCloneDocumentRequest.showTooltip = true;
embeddedCloneDocumentRequest.showSaveButton = true;
embeddedCloneDocumentRequest.showPreviewButton = false;
embeddedCloneDocumentRequest.viewOption = embeddedCloneDocumentRequest.ViewOptionEnum.PreparePage;
embeddedCloneDocumentRequest.withFormFieldValues = true;
embeddedCloneDocumentRequest.showNavigationButtons = true;
const embeddedClonedDocument = documentApi.getEmbeddedClonedDocumentUrl("YOUR_DOCUMENT_ID", embeddedCloneDocumentRequest);
Query parameters
| documentIdstringRequired | The ID of the document to clone. |
Request body
| RedirectURLstring | The redirect URI is to be redirected after the clone document process is completed. The string should be in URI format. |
ViewOptionstring | Configures the initial view page to be loaded from the generated URL. The FillingPage is used to customize roles, enforce authentication etc. The PreparePage is used to configure form fields for the roles. Either PreparePage or FillingPage. Defaults to PreparePage. |
ShowSaveButtonboolean | Controls the visibility of the Defaults to true. |
ShowCreateButtonboolean | Controls the visibility of the Defaults to true. |
ShowPreviewButtonboolean | Controls the visibility of the Defaults to true. |
ShowNavigationButtonsboolean | Controls the visibility of the Defaults to true. |
| EmbeddedSendLinkValidTillstring | Configures the expiration for the generated URL. A maximum of 180 days can be assigned. The string should be in date-time format. |
| WithFormFieldValuesboolean | This property specifies whether form field values should be included when cloning the document. If set to true, the cloned document will contain the form field data; if set to false, the form fields will be excluded. |
| Localestring | By default, while opening the embedded cloned document link, all the static contents available in the page will be loaded in the English language. This property is used to load the contents with different languages. The supported languages are EN(English), FR(French), NO(Norwegian), DE(German), ES(Spanish), BG(Bulgarian), CS(Czech), DA(Danish), IT(Italian), NL(Dutch), PL(Polish), PT(Portuguese), RO(Romanian), RU(Russian), and SV(Swedish) |
ShowToolbarboolean | Controls the visibility of the toolbar at the top of the document editor. Defaults to false. |
ShowTooltipboolean | To control the visibility of the Defaults to false. |
| OnBehalfOfstring | The email address of the user that was used to create the document on their behalf. |
Example response
{
"documentId": "7a18c3y10...",
"embedUrl": "https://app.boldsign.com/document/embed/?documentId=7a18c3y10..."
}