Add Files Using File URLs When Sending

BoldSign allows you to add files using file URLs for e-signature using the FileUrls property. The supported file formats that can be used in FileUrls are .pdf, .png, .jpg, .docx, .xlsx and .pptx. The .pdf is the preferred format. You can refer to the following link for supported file formats. Make sure that the header content-type in the file URL should be in proper format like application/pdf, application/msword.

Here is an example demonstrating how to add a file using a file URL when sending a document for eSignature using the BoldSign API.

curl -X 'POST' \
  'https://api.boldsign.com/v1/document/send' \
  -H 'accept: application/json' \
  -H 'X-API-KEY:{Your API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "Message": "Please sign this.",
    "Signers": [
        {
            "name": "Alex",
            "emailAddress": "[email protected]",
            "signerType": "Signer",
            "formFields": [
                {
                    "id": "sign1",
                    "name": "sign1",
                    "fieldType": "Signature",
                    "pageNumber": 1,
                    "bounds": {
                        "x": 50,
                        "y": 50,
                        "width": 125,
                        "height": 25
                    },
                    "isRequired": true
                }
              ],
            "locale": "EN"
        }
    ],

   "FileUrls": [
        "https://www.dropbox.com/scl/fi/jcya44l0ui2sq4rjl0wsg/Customer-Contract-Form-Cubeflex.pdf?rlkey=earhpfci3i2zqzugcchxkb451&st=sjbm7jcs&dl=1"
    ],
   
    "Title": "Customer-Contract-Form-Cubeflex"
  }'
  

using BoldSign.Api;
using BoldSign.Model;

var apiClient = new ApiClient("https://api.boldsign.com", "{Your API Key}");
var documentClient = new DocumentClient(apiClient);

var signatureField = new FormField(
    id: "sign",
    isRequired: true,
    type:FieldType.Signature,
    pageNumber: 1,
    bounds: new Rectangle(x: 100, y: 100, width: 100, height: 50));

var formFieldCollections = new List<FormField>()
{
    signatureField
};

var signer = new DocumentSigner(
    signerName: "Alex",
    signerType: SignerType.Signer,
    signerEmail: "[email protected]",
    formFields: formFieldCollections,
    locale: Locales.EN);

var documentSigners = new List<DocumentSigner>()
{
    signer
};
List<Uri> uriList = new List<Uri>
{
    new Uri("https://www.dropbox.com/scl/fi/v5vj574fdb1zgkawgud8p/FL-Landlord-and-Tenant-Law-Problem.pdf?rlkey=68e21wfenuyqvolr4jl07yt8p&st=k8ryipoe&dl=1")
};
var sendForSign = new SendForSign()
{
    Message = "Please sign this",
    Title = "Agreement",
    HideDocumentId = false,
    Signers = documentSigners, 
     =  uriList
   

};
var documentCreated = documentClient.SendDocument(sendForSign);
Console.WriteLine(documentCreated);

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)

    send_for_sign = boldsign.SendForSign(
        title = "Document SDK API",
        document_title = "SDK Document Test case",
        description = "Testing document from SDK integration test case",
        fileUrls = ["YOUR_FILE_URL"],
        signers = [
            boldsign.DocumentSigner(
                name = "Hanky",
                emailAddress = "[email protected]",
                signerOrder = 1,
                signerType = "Signer",
                formFields = [
                    boldsign.FormField(
                        name = "Sign",
                        fieldType = "Signature",
                        font = "Helvetica",
                        pageNumber = 1,
                        isRequired = True,
                        bounds = boldsign.Rectangle(x = 50, y = 50, width = 100, height = 150)
                    )
                ],
                privateMessage = "This is private message for signer"
            )
        ]
    )

    document_created = document_api.send_document(send_for_sign)

<?php require_once 'vendor/autoload.php';

$config = new BoldSign\Configuration();
$config->setHost("https://api.boldsign.com");
$config->setApiKey('YOUR_API_KEY');
$documentApi = new BoldSign\Api\DocumentApi($config);

$formField = new BoldSign\Model\FormField();
$formField->setFieldType('Signature');
$formField->setPageNumber(1);
$formField->setIsRequired(true);
$bounds = new BoldSign\Model\Rectangle();
$bounds->setX(50);
$bounds->setY(50);
$bounds->setWidth(125);
$bounds->setHeight(25);
$formField->setBounds($bounds);

$signer = new BoldSign\Model\DocumentSigner();
$signer->setName('Alex');
$signer->setEmailAddress('[email protected]');
$signer->setSignerType('Signer');
$signer->setFormFields([$formField]);
$signer->setLocale('EN');

$sendForSign = new BoldSign\Model\SendForSign();
$sendForSign->setTitle('Agreement');
$sendForSign->setMessage('Please sign this.');
$sendForSign->setSigners([$signer]);
$sendForSign->setFileUrls(['YOUR_FILE_URL']);

$documentCreated = $documentApi->sendDocument($sendForSign);
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
DocumentApi documentApi = new DocumentApi(client);

FormField formField = new FormField();
formField.setFieldType(FormField.FieldTypeEnum.SIGNATURE);
formField.setPageNumber(1);
formField.setIsRequired(true);

Rectangle bounds = new Rectangle();
bounds.setX(130f);
bounds.setY(130f);
bounds.setWidth(81f);
bounds.setHeight(31f);
formField.setBounds(bounds);

DocumentSigner signer = new DocumentSigner();
signer.setName("Alex");
signer.setEmailAddress("[email protected]");
signer.setSignerType(DocumentSigner.SignerTypeEnum.SIGNER);
signer.setFormFields(Arrays.asList(formField));
signer.setLocale(DocumentSigner.LocaleEnum.EN);

SendForSign sendForSign = new SendForSign();
sendForSign.setTitle("Agreement");
sendForSign.setMessage("Please sign this.");
sendForSign.setSigners(Arrays.asList(signer));
sendForSign.setFileUrls(Arrays.asList(new URI("YOUR_FILE_URL")));
DocumentCreated result = documentApi.sendDocument(sendForSign);
   
import { DocumentApi, DocumentSigner, SendForSign, FormField, Rectangle } from "boldsign";

const documentApi = new DocumentApi("https://api.boldsign.com");
documentApi.setApiKey('YOUR_API_KEY');

const formField = new FormField();
formField.fieldType = FormField.FieldTypeEnum.Signature;;
formField.pageNumber = 1;
formField.isRequired = true;

const bounds = new Rectangle();
bounds.x = 50;
bounds.y = 50;
bounds.width = 125;
bounds.height = 25;
formField.bounds = bounds;

const signer = new DocumentSigner();
signer.name = 'Alex';
signer.emailAddress = '[email protected]';
signer.signerType = DocumentSigner.SignerTypeEnum.Signer;
signer.formFields = [formField];
signer.locale = DocumentSigner.LocaleEnum.En;

const sendForSign = new SendForSign();
sendForSign.title = 'Agreement';
sendForSign.message = 'Please sign this.';
sendForSign.signers = [signer];
sendForSign.fileUrls = ['YOUR_FILE_URL'];

var createdDocument = documentApi.sendDocument(sendForSign);

In the provided code examples, make sure to replace the SignerEmail and SignerName properties with the email and name of the signer you wish to send the document. After executing the above code, document in the FileUrls will be sent to signer for signature request.