Create embedded request link from template

post/v1/template/createEmbeddedRequestUrl

Unlike the document embedded request, the template embedded request process is synchronous, and your generated URL will be immediately accessible with documents and form fields already processed.

Generating the embedded request link is same as the regular template send, but with additional properties to customize the embedded process. For detailed information on the template API specific properties, please refer to the Template send section article.

Example request

curl --location --request POST 'https://api.boldsign.com/v1/template/createEmbeddedRequestUrl?templateId=<template-id>' \
    --header 'X-API-KEY: <api-key>' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "redirectUrl": "https://yourapp.example/redirect",
        "showToolbar": true,
        "sendViewOption": "FillingPage",
        "showSaveButton": true,
        "showSendButton": true,
        "locale": "EN",
        "showPreviewButton": true,
        "showNavigationButtons": true,
        "showTooltip": false,
        "roleRemovalIndices": [1, 2]
    }
var apiClient = new ApiClient("YOUR_API_KEY");

var templateClient = new TemplateClient(apiClient);

var templateRequest = new EmbeddedTemplateRequest()
{
    TemplateId = "YOUR_TEMPLATE_ID",
    Roles = 
    [
        new Roles()
        {
            RoleIndex = 1,
            SignerName = "David",
            SignerEmail = "david@cubeflakes.com",
            SignerType = SignerType.Signer
        }
    ],
    SendViewOption = PageViewOption.PreparePage,
    ShowToolbar = true
};

var embeddedSendCreated = templateClient.CreateEmbeddedRequestUrl(templateRequest);
var sendUrl = embeddedSendCreated.SendUrl;
import boldsign

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

with boldsign.ApiClient(configuration) as api_client:
    
    template_api = boldsign.TemplateApi(api_client)
    
    role = boldsign.Role(
        roleIndex=1,
        signerRole="signer",
        signerName="Signer Name 1",
        signerEmail="signer1@boldsign.dev")
    
    embedded_send_template_form_request = boldsign.EmbeddedSendTemplateFormRequest(
        roles=[role],        
        showToolbar=True,
        sendViewOption="PreparePage")
    
    embedded_send_created = template_api.create_embedded_request_url_template(template_id="YOUR_TEMPLATE_ID", embedded_send_template_form_request=embedded_send_template_form_request)
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\TemplateApi;
use BoldSign\Model\{Role, EmbeddedSendTemplateFormRequest};

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

$template_api = new TemplateApi($config);

$role = new Role();
$role->setRoleIndex(1);
$role->setSignerRole('Signer');
$role->setSignerName('Signer Name 1');
$role->setSignerEmail('signer1@boldsign.dev');

$embedded_send_template_form_request = new EmbeddedSendTemplateFormRequest();
$embedded_send_template_form_request->setSendViewOption('PreparePage');
$embedded_send_template_form_request->setShowToolbar(true);
$embedded_send_template_form_request->setRoles([$role]);

$embedded_send_created = $template_api->createEmbeddedRequestUrlTemplate($template_id = 'YOUR_TEMPLATE_ID', $embedded_send_template_form_request);
ApiClient client = Configuration.getDefaultApiClient();  
client.setApiKey("YOUR_API_KEY");
        
TemplateApi templateApi = new TemplateApi(client);

Role role = new Role();
role.setRoleIndex(1);
role.setSignerName("Signer Name 1");
role.setSignerEmail("signer1@boldsign.dev");
role.setSignerRole("Signer");

EmbeddedSendTemplateFormRequest embeddedSendTemplateFormRequest = new EmbeddedSendTemplateFormRequest();
embeddedSendTemplateFormRequest.setRoles(Arrays.asList(role));
embeddedSendTemplateFormRequest.setShowToolbar(true);
embeddedSendTemplateFormRequest.setSendViewOption(EmbeddedSendTemplateFormRequest.SendViewOptionEnum.PREPARE_PAGE);

EmbeddedSendCreated embeddedSendCreated = templateApi.createEmbeddedRequestUrlTemplate("YOUR_TEMPLATE_ID", embeddedSendTemplateFormRequest);
import { TemplateApi, EmbeddedSendTemplateFormRequest, Role } from "boldsign";
import * as fs from 'fs';

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

const role = new Role();
role.roleIndex = 1;
role.signerName = "Signer Name 1";
role.signerEmail = "signer1@boldsign.dev";
role.signerRole = "Signer";

const embeddedSendTemplateFormRequest = new EmbeddedSendTemplateFormRequest();
embeddedSendTemplateFormRequest.roles = [role];
embeddedSendTemplateFormRequest.showToolbar = true;
embeddedSendTemplateFormRequest.sendViewOption = EmbeddedSendTemplateFormRequest.SendViewOptionEnum.FillingPage;

const embeddedSendCreated = templateApi.createEmbeddedRequestUrlTemplate("YOUR_TEMPLATE_ID", embeddedSendTemplateFormRequest);

Query parameters

templateIdstringRequiredThe ID of the existing template to be used for sending the template.

Request body

RedirectUrlstringThe redirect URI will be redirected after the template creation process is complete. The string should be in URI format.
ShowToolbarbooleanControls the visibility of the toolbar at the top of the template editor.
Defaults to false.
SendViewOptionstringConfigures the initial view page to be loaded from the generated URL. The FillingPage is used to customize signers, authentication etc. The PreparePage is used to configure signers form fields.
Either PreparePage or FillingPage. Defaults to PreparePage.
ShowSaveButtonbooleanControls 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 as draft instead of sending it out for signature.
Defaults to true.
ShowSendButtonbooleanControls the visibility of the Send button at the top right corner of the page. Set to false if you want your users to save the template as only drafts instead of sending it out for signature.
Defaults to true.
ShowPreviewButtonbooleanControls 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 sending it out for signature.
Defaults to true.
ShowNavigationButtonsbooleanControls 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.
SendLinkValidTillstringConfigures the expiration for the generated URL. A maximum of 180 days can be assigned. The String should be in date-time format.
LocalestringBy default, while opening the embedded request 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), SV(Swedish)
ShowTooltipbooleanTo 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.
allowScheduledSendbooleanThis property enables or disables the scheduling option. When enabled, it allows scheduling the document for future sending. The default value is false.

Example response

{
    "documentId": "625cff3d...",
    "sendUrl": "https://app.boldsign.com/document/embed/?documentId=625cff3d..."
}