How to customize document decline option via API?
In BoldSign, you can customize the document decline option via API when creating or updating a brand. This property allows you to control whether the decline option will be visible or hidden to signers during the signing process.
To customize the decline option, set the HideDecline
property in the BrandSettings
to true to hide the decline option or false to make it visible. Once configured, you can apply this brand when sending documents for signature.
Below code snippets demonstrate how to customize the document decline option while creating a Brand:
cURL
curl -X POST 'https://api.boldsign.com/v1/brand/create' \
-H 'X-API-KEY: {your API key}' \
-F 'BrandName=Syncfusion' \
-F 'BrandLogo=@D:\SyncfusionLogo.png' \
-F 'BackgroundColor=red' \
-F 'ButtonColor=green' \
-F 'ButtonTextColor=white' \
-F 'EmailDisplayName={SenderName} from Syncfusion' \
-F 'RedirectUrl=https://www.syncfusion.com/' \
-F 'IsDefault=true' \
-F 'CombineAuditTrail=true' \
-F 'DocumentTimeZone=+05:30' \
-F 'HideDecline=true' \
-F 'ShowBuiltInFormFields=true' \
-F 'AllowCustomFieldCreation=true' \
-F 'ShowSharedCustomFields=false' \
-F 'ExcludeAuditTrailFromEmail=false' \
-F 'CustomDomainSettings={"DomainName":"mail.cubeflakes.com","FromName":"notification"}'
.NET
var apiClient = new ApiClient("YOUR_API_KEY");
var brandingClient = new BrandingClient(apiClient);
var brandSettings = new BrandSettings()
{
BrandName = "Syncfusion",
BrandLogo = new ImageFileBytes()
{
ContentType = "image/png",
FileBytes = File.ReadAllBytes("YOUR_FILE_PATH"),
},
ShowBuiltInFormFields = true,
HideDecline = true
};
BrandingData brandCreated = brandingClient.CreateBrand(brandSettings);
string brandId = brandCreated.BrandId;
Python
import boldsign
configuration = boldsign.Configuration(api_key="Your APi Key")
with boldsign.ApiClient(configuration) as api_client:
branding_api = boldsign.BrandingApi(api_client)
create_brand_response = branding_api.create_brand(
brand_name="Syncfusion",
hide_decline=True,
brand_logo=r"C:\Users\cathysam\OneDrive - Syncfusion\Downloads\cubeflakes logo.png"
)
print(f"Brand successfully created")
PHP
<?php require_once "vendor/autoload.php";
use BoldSign\Configuration;
use BoldSign\Api\BrandingApi;
$config = new Configuration();
$config->setApiKey('YOUR_API_KEY');
$branding_api = new BrandingApi($config);
$brand_name = 'Syncfusion';
$brand_logo = 'YOUR_FILE_PATH';
$hide_decline = true;
$brand_created = $branding_api->createBrand($brand_name, $brand_logo);
Java
ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey("YOUR_API_KEY");
BrandingApi brandingApi = new BrandingApi(client);
String brandName ="Syncfusion";
File brandLogo = new File("YOUR_FILE_PATH");
Boolean hideDecline = true;
BrandCreated brandCreated = brandingApi.createBrand(brandName, brandLogo, null);
Node.js
import { BrandingApi } from "boldsign";
import * as fs from 'fs';
const createBrandApi = new BrandingApi();
createBrandApi.setApiKey("YOUR_API_KEY");
const brandName = "NodeSDK";
const brandLogo = fs.createReadStream("YOUR_FILE_PATH");
const hideDecline = true;
const brandCreated = createBrandApi.createBrand(brandName, brandLogo);
In the above code examples, after creating the brand with the HideDecline
property set, you can apply that brand when sending a signature request. The visibility of the decline option for signers will depend on the customization set. Ensure that the BrandId
returned from the create brand API call is used in the signature request to apply these settings.