Documentation/Embedded template preview

Embedded template preview

The embedded template preview link allows users to preview an already created template on your website or mobile app using an iFrame, popup window, or a new tab.

Create embedded template preview URL

post/v1/template/createEmbeddedPreviewUrl

The create embedded template preview link includes additional properties to customize the embedded template preview process.

Code snippet

curl -X 'POST' \
  'https://api.boldsign.com/v1/template/createEmbeddedPreviewUrl?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=true'
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var templateClient = new TemplateClient(apiClient);

var embeddedTemplatePreviewRequest = new EmbeddedTemplatePreviewRequest()
{
TemplateId = "be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx",
ShowToolbar = true,
};

var embeddedTemplatePreview = await this.templateApi.CreateEmbeddedPreviewUrlAsync(embeddedTemplatePreviewRequest).ConfigureAwait(false);
var templatePreviewUrl = embeddedTemplatePreview.TemplateUrl;

import boldsign

configuration = boldsign.Configuration(api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    template_api = boldsign.TemplateApi(api_client)

    preview_created = template_api.create_embedded_preview_url(
        template_id = "be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx",
        show_toolbar = True
    )
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\TemplateApi;

$config = new Configuration();
$config->setApiKey('YOUR_API_KEY');

$template_api = new TemplateApi($config);

$preview_created = $template_api->createEmbeddedPreviewUrl(
    'be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx',
    true
);
ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey("YOUR_API_KEY");

TemplateApi templateApi = new TemplateApi(client);

EmbeddedTemplatePreview previewCreated = templateApi.createEmbeddedPreviewUrl(
    "be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx",
    true
);
import { TemplateApi } from "boldsign";

const templateApi = new TemplateApi(baseUrl);
templateApi.setApiKey("YOUR_API_KEY");

const previewCreated = await templateApi.createEmbeddedPreviewUrl(
  "be5cbb00-xxxx-xxxx-xxxx-bafa580exxxx",
  true
);

Query parameters

templateIdstringRequiredThe ID of the template to preview.

Request body

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

ShowToolbarboolean

Controls the visibility of the toolbar at the top of the template preview.

Defaults to true.

Example response

200 Success

{
  "templateUrl": "https://app.boldsign.com/document/previewtemplate/?templateId=be5cbb00-xxxx-xxxx-xxxx-0exxxx-xxxx-f31e22cxxxxe;41e2041f-xxxx-xxxx-xxxx-xxxx-d36d4712xxxx"
}