Edit embedded template

The embedded template edit link allows users to edit already created templates on your website or mobile app using an iFrame, pop-up window, or a new tab.

post/v1/template/getEmbeddedTemplateEditUrl

The get embedded template edit link has additional properties to customize the embedded process.

Code snippet

curl -X 'POST' \
  'https://api.boldsign.com/v1/template/getEmbeddedTemplateEditUrl?templateId=be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {your API Key}' \
  -H 'Content-Type: multipart/form-data' \ 
  -F 'ShowToolbar=false' \
  -F 'ViewOption=PreparePage' \
  -F 'ShowSaveButton=true' \
  -F 'ShowCreateButton=true' \
  -F 'ShowPreviewButton=true' \
  -F 'ShowNavigationButtons=true' \
  -F 'ShowTooltip=false' \
var apiClient = new ApiClient("https://api.boldsign.com", "Your-API-KEY");
var templateClient = new TemplateClient(apiClient);

 // This is an example, add your own template id.
 var templateId = "be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx";

var embeddedTemplateEditRequest = new EmbeddedTemplateEditRequest()
{
       TemplateId = templateId,
        // customize page options
        ViewOption = PageViewOption.FillingPage,
        ShowToolbar = true,
        ShowNavigationButtons = false,
        ShowSaveButton = false,
        ShowPreviewButton = true,
        ShowCreateButton = false,
        ShowTooltip = false,
};
var embeddedTemplateEdited = await templateClient.GetEmbeddedTemplateEditUrlAsync(embeddedTemplateEditRequest).ConfigureAwait(false);

var templateEditUrl = embeddedTemplateEdited.EditUrl;
import requests
url = "https://api.boldsign.com/v1/template/getEmbeddedTemplateEditUrl?templateId=be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx"
payload={
'ShowToolbar': 'false',
'ViewOption': 'PreparePage',
'ShowSaveButton': 'true',
'ShowCreateButton': 'true',
'ShowPreviewButton': 'true',
'ShowNavigationButtons': 'true',
'ShowTooltip': 'false',
}
headers = {
'Accept': 'application/json',
'X-API-KEY': ' Your-API-KEY '
}

response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();
data.append('ShowToolbar', 'false');
data.append('ViewOption', 'PreparePage');
data.append('ShowSaveButton', 'true');
data.append('ShowCreateButton', 'true');
data.append('ShowPreviewButton', 'true');
data.append('ShowNavigationButtons', 'true');
data.append('ShowTooltip', 'false');

var config = {
  method: 'post',
  url: 'https://api.boldsign.com/v1/template/getEmbeddedTemplateEditUrl?templateId=be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx',
  headers: { 
    'Content-Type': 'multipart/form-data', 
    'Accept': 'application/json', 
    'X-API-KEY': 'Your-API-KEY', 
    ...data.getHeaders()
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Query parameters

TemplateIdstringRequiredThe ID of the template to edit.

Request body

RedirectURLstringThe redirect URI is to be redirected after the template edit process is completed. The string should be in URI format.

ShowToolbarboolean

Controls the visibility of the toolbar at the top of the document editor.

Defaults to false.

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 Save and Close button from the More Action drop-down menu. Set to false if you don't want your users to save the template.

Defaults to true.

ShowCreateButtonboolean

Controls the visibility of the Save template button at the top right corner of the page. Set to false if you don't want your users to save the template.

Defaults to true.

ShowPreviewButtonboolean

Controls the visibility of the Preview button from the More Action drop-down menu. Set to false if you don't want your users to preview the template before finalizing it.

Defaults to true.

ShowNavigationButtonsboolean

Controls the visibility of the Back button. Set to false if you don't want your users to navigate away from the current page.

Defaults to true.

LinkValidTillstringConfigures the expiration for the generated URL. A maximum of 180 days can be assigned. The string should be in date-time format.

ShowTooltipboolean

To control the visibility of the Tooltip near the assignee field on the prepare page, set it to "true" if you want to show the tooltip to the user.

Defaults to false.

onBehalfOfstringThe email address of the user that was used to create the template on their behalf.

Example response

201 Created

{
  "editUrl": "https://app.boldsign.com/document/embed/?templateId=be5cbb00-xxxx-xxxx-xxxx-0exxxx-xxxx-f31e22cxxxxee_fZHzxxxx;41e2041f-xxxx-xxxx-xxxx-d36d4712xxxx&isEditTemplate=true"
}