Document
A document is also known as an envelope. It acts as an overall container for BoldSign transactions. A document in BoldSign contains one or more files, in which the signature will be added electronically, details about the sender and signers, status, history, etc. Each document has a unique ID, and you can use that for identifying or fetching the document.
Using BoldSign, you can send documents to others for eSignatures. In addition, you can perform various operations like self-sign, sign the document as a recipient, send the document on behalf of another user, add authentication, remind signers, delete a document, get document details, get a document list, etc.
Send documents
post/v1/document/sendYou can request signatures from others by sending the documents for signing. It is not mandatory for the signers to have a BoldSign account. Thus, the signer can sign a document sent by another user with or without a BoldSign account. If required, you can also add yourself as one of the signers. To self-sign a document, you can send a signature request to yourself alone.
Code snippet
curl -X 'POST' \ 'https://api.boldsign.com/v1/document/send' \ -H 'accept: application/json' \ -H 'X-API-KEY: {your API key}' \ -H 'Content-Type: multipart/form-data' \ -F 'DisableExpiryAlert=false' \ -F 'ReminderSettings.ReminderDays=5' \ -F 'BrandId=' \ -F 'ReminderSettings.ReminderCount=3' \ -F 'EnableReassign=true' \ -F 'Message=' \ -F 'Signers={ "name": "sdc", "emailAddress": "alexgayle@cubeflakes.com", "signerType": "Signer", "formFields": [ { "id": "string", "name": "string", "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 50, "y": 50, "width": 1, "height": 1 }, "isRequired": true } ], "locale": "EN" }' \ -F 'ExpiryDays=30' \ -F 'EnablePrintAndSign=false' \ -F 'AutoDetectFields=false' \ -F 'OnBehalfOf=' \ -F 'EnableSigningOrder=false' \ -F 'UseTextTags=false' \ -F 'SendLinkValidTill=' \ -F 'Files=@BoldSign test.pdf;type=application/pdf' \ -F 'Title=dcsd' \ -F 'HideDocumentId=false' \ -F 'EnableEmbeddedSigning=false' \ -F 'ExpiryDateType=Days' \ -F 'ReminderSettings.EnableAutoReminder=true' \ -F 'ExpiryValue=60' \ -F 'DisableEmails=false' \ -F 'DisableSMS=false'
var apiClient = new ApiClient("https://api.boldsign.com", "{your API key}"); var documentClient = new DocumentClient(apiClient); var documentFilePath = new DocumentFilePath { ContentType = "application/pdf", FilePath = "agreement.pdf", }; var filesToUpload = new List<IDocumentFile> { documentFilePath, }; 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( name: "David", emailAddress: "david@cubeflakes.com", formFields: formFieldCollections); var documentSigners = new List<DocumentSigner>() { signer }; var sendForSign = new SendForSign() { Message = "please sign this", Title = "Agreement", HideDocumentId = false, Signers = documentSigners, Files = filesToUpload }; var documentCreated = documentClient.SendDocument(sendForSign);
import requests url = "https://api.boldsign.com/v1/document/send" payload={'DisableExpiryAlert': 'false', 'ReminderSettings.ReminderDays': '3', 'BrandId': '', 'ReminderSettings.ReminderCount': '5', 'EnableReassign': 'true', 'Message': 'Please sign this.', 'Signers': '{ "name": "David", "emailAddress": "david@cubeflakes.com", "formFields": [ { "fieldType": "Signature", "pageNumber": 1, "bounds": { "x": 100, "y": 100, "width": 100, "height": 50 }, "isRequired": true } ] }', 'ExpiryDays': '10', 'EnablePrintAndSign': 'false', 'AutoDetectFields': 'false', 'OnBehalfOf': '', 'EnableSigningOrder': 'false', 'UseTextTags': 'false', 'SendLinkValidTill': '', 'Title': 'Agreement', 'HideDocumentId': 'false', 'EnableEmbeddedSigning': 'false', 'ExpiryDateType': 'Days', 'ReminderSettings.EnableAutoReminder': 'false', 'ExpiryValue': '60', 'DisableEmails': 'false', 'DisableSMS': 'false'} files=[ ('Files',('file',open('{file path}','rb'),'application/octet-stream')) ] headers = { 'accept': 'application/json', 'X-API-KEY': '{your API key}' } response = requests.request("POST", url, headers=headers, data=payload, files=files) print(response.text)
const axios = require('axios'); const FormData = require('form-data'); const fs = require('fs'); const form = new FormData(); form.append('DisableExpiryAlert', 'false'); form.append('ReminderSettings.ReminderDays', '3'); form.append('BrandId', ''); form.append('ReminderSettings.ReminderCount', '5'); form.append('EnableReassign', 'true'); form.append('Message', 'Please sign this.'); form.append('Signers', '{\n "name": "David",\n "emailAddress": "david@cubeflakes.com",\n "formFields": [\n {\n "fieldType": "Signature",\n "pageNumber": 1,\n "bounds": {\n "x": 100,\n "y": 100,\n "width": 100,\n "height": 50\n },\n "isRequired": true\n }\n ]\n}'); form.append('ExpiryDays', '10'); form.append('EnablePrintAndSign', 'false'); form.append('AutoDetectFields', 'false'); form.append('OnBehalfOf', ''); form.append('EnableSigningOrder', 'false'); form.append('UseTextTags', 'false'); form.append('SendLinkValidTill', ''); form.append('Files', fs.readFileSync('agreement.pdf;type=application/pdf'), 'agreement.pdf;type=application/pdf'); form.append('Title', 'Agreement'); form.append('HideDocumentId', 'false'); form.append('EnableEmbeddedSigning', 'false'); form.append('ExpiryDateType', 'Days'); form.append('ReminderSettings.EnableAutoReminder', 'false'); form.append('ExpiryValue', '60'); form.append('DisableEmails', 'false'); form.append('DisableSMS', 'false'); const response = await axios.post( 'https://api.boldsign.com/v1/document/send', form, { headers: { ...form.getHeaders(), 'accept': 'application/json', 'X-API-KEY': '{your API key}', 'Content-Type': 'multipart/form-data' } } );
Request body
filesarray | The files to be uploaded for sending signature request. .pdf, .png, .jpg, and .docx are supported file formats. The preferred file format is .pdf . You can upload up to 25 files. Each document may have a maximum of 1000 pages and must be no larger than 25 MB in size. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
titlestring | This is the title of the document that will be displayed in the BoldSign user interface as well as in the signature request email. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
messagestring | A message for all the recipients. You can include the instructions that the signer should know before signing the document. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signersarray | Details of the signers. One or more signers can be specified.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ccarray | Mail ID of the CC recipients. One or more CC recipients can be specified.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableSigningOrderboolean | Enables or disables the signing order. When enabled, signers must sign the document in the designated order and cannot sign in parallel. The default value is set to false. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
expiryDaysinteger | The number of days after which the document expires. The default value is 60 days. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReminderSettings.EnableAutoReminderboolean | Enables or disables the auto-reminder. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReminderSettings.ReminderDaysinteger | The number of days between each automatic reminder. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReminderSettings.ReminderCountinteger | The number of times the auto-reminder should be sent. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disableEmailsboolean | Disables the sending of document related emails to all the recipients. The default value is false. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disableSMSboolean | Disables the sending of document related SMS to all the recipients. The default value is false . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
brandIdstring | You can customize the logo, colors, and other elements of the signature request emails and document signing pages to match your company branding. The ID of the existing brand can be obtained from the branding API and from the web app. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hideDocumentIdboolean | Decides whether the document ID should be hidden or not. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
labelsarray | Labels (tags) are added to the document to categorize and filter the documents. One or more labels can be added. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fileUrlsarray | The URL of the files to be uploaded for sending signature request. .pdf, .png, .jpg, and .docx are supported file formats. The preferred file format is .pdf . You can upload up to 25 files. Each document may have a maximum of 1000 pages and must be no larger than 25 MB in size. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sendLinkValidTillstring | Configures the expiration for the generated URL. A maximum of 180 days can be assigned. The string should be in date-time format. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useTextTagsBoolean | When enabled, it will convert all the tags defined in the document to BoldSign form fields. The default value is false . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
textTagDefinitionarray | This can be used for long text tag handling.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enablePrintAndSignboolean | Allows the signer to reassign the signature request to another person. The default value is true . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disableExpiryAlertarray | Disables the alert, which was shown one day before the expiry of the document. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
documentInfoarray | Options to customize the information, like the title and description of the document for a particular signer.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
onBehalfOfstring | Mail ID of the user to send the document on behalf of them. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
autoDetectFieldsboolean | When enabled, it will convert all the fillable form fields in the document to BoldSign form fields. BoldSign supports Textbox, Checkbox, Radio button, and Signature form fields. Other fields will not be detected as of now. The default value is false . |
Example response
201 Created
{ "documentId": "8f59295d-xxxx-xxxx-xxxx-e7dc88cfff2c" }