Foxit eSign is the #1 easiest and most collaborative contract management and eSignature software with the most robust functionality amongst its peers. Key features include Collaborative contracts and agreement building; template contract creation; eSignature workflow to obtain eSignature(s) from single, or multiple users; advanced bulk eSignature solution with dashboard; notification receiving control; API for eSignature integration with other software or websites and a lot more... For
more information on Foxit eSign Software, please contact us at info@esigngenie.com
Create a Developer Account
Activate the developer account with Foxit eSign under the API tab in the settings menu.
(This menu will only be visible after you have purchased the API service from Foxit eSign).
Fill in the form to obtain your API Key and API Secret under your API settings.
This is how your API information will display:
Pass the respective {{Host_Name}} as per the desired region. Old eSign Genie API customers can replace 'esigngenie.com/esign' with 'na1.foxitesign.foxit.com'
Authentication
Generating Access Token
Client Credentials Access your Foxit eSign account from your application
Your website/application can generate an access token of grant_type: client_credentials as follows:
Your API Key from the API menu under the Settings Tab
client_secret
Your API Secret from the API menu under the Settings Tab
scope
Please use read-write, in order to send documents.
emailId (Optional)
Email-id of one of the Super-Admin Users from your account, whom you want to make API Owner.
Note: This is mandatory only when the account owner of the company is Setup Admin.
All API requests start with https://{{HOST_NAME}}/api/.
Create folder of documents from PDF files
With Foxit eSign API you can create a folder of documents and send them for signature right from your own application.
To create a folder of documents from PDF files you can either provide publicly accessible URLs to PDF documents
or pass PDF documents as multipart form data and other parameters about the recipient parties, etc.
While creating the documents from PDF files you can define various fields like text field or signature field within the document using simple Text Tags.
You can assign various properties for these fields like party responsible for filling the data etc.
These Text Tags will then be converted to Foxit eSign document fields.
Or, if you don't want to use Text Fields within the document, then you can also request to create an embedded document preparing session where you can manually drag and drop each field on the document itself without leaving your application.
Preparing PDF documents with text tags
To send a PDF document from your application for signature, you need to define the signature and other Foxit eSign fields in the documents, and who is allowed to fill in the data.
Foxit eSign supports simple Text Tags.
A Text Tag is a simple text block within your PDF document which defines the field type, the party who is responsible for it, and other field specific options.
Quick Tip:
When you apply Text Tags to the document, Foxit eSign does not remove or replace the Text Tags text.
You can hide codified Text Tags by using the same font color as the background of the document.
So the Text Tags can be used by Foxit eSign processes and it will not be visible on the document.
Field Type: One of 'textfield', 'formulafield', 'signfield', 'initialfield', 'datefield', 'checkboxfield', 'attachmentfield', 'imagefield', 'accept', 'decline' or short notations.
Party Number (optional): the sequence number of the recipient party from the parties list which will be responsible for filling this field.
Required/Optional Field: 'y' makes the field mandatory to be filled before signing while 'n' makes it optional.
Field Name: Optional. Assign a name to this field. Assigning names to fields is a good practice for better productivity as
named fields are downloaded in the document from data report and all same named fields in a document will automatically take up the value typed once in any one of those fields.
Please note not to include any space character for the name of the field (or anywhere else in the Text Tag) as it will then not recognize that word as a proper Text Tag syntax,
instead you can use underscore which will then be replaced with space character in the final Foxit eSign field.
Underscores: Optional. A way to increase the field's width.
There are other options that you can add before underscores for various other properties as follows:
Sizing
By default, the new field has the same width and height as the original text tag, however it can be overridden by adding custom width as 90 and height as 20 (in pixels):
${textfield:1:y:field_name:90:20}
Validation
You also can validation information for text fields inside the tags. For example, the max number of characters required are 12 and only Numbers:
${textfield:1:y:field_name:90:20:12:Numbers}
And if you want to stick to the default height and width for the new field (which is the height and width of the text tag)
${textfield:1:y:field_name:::12:Numbers}
NOTE: validation inputs are currently only available for textfields
Font Style
You can also control the font style for each new field via their text tags. For example, the following tag creates a textfield with 14 font size and gray as font color
You can pass pre-filled value to the textfields via its text tags as shown below. Please make to replace any space character with '_' (underscore) else the system may not recognize that text tag.
NOTE: pre-filled values are currently only available for textfields
Mark as Dependent Field
You can make a field dependent on any other field value. To set a field dependent on another field, select the values of the independent field that will enable the signer to see the dependent field.
Name of the parent field.
NOTE: Only the following type of fields are allowed as the parent or independent field: textfields|textbox|checkbox|radiobutton|dropdown
value_of_parent_field
Value of the parent field.
NOTE: In the case of the radio button and checkbox, the value can be either checked or unchecked
options (optional)
In the case of textfield, the value can be either isblank or allowNull or contains
The full list of Field Types is:
TextField - textfield or t (short notation)
TextBox - textboxfield or tb (short notation)
Signature - signfield or s
FormulaField - formulafield or ff
Initial - initialfield or i
Date - datefield or d
Checkbox - checkboxfield or c (recommended)
Radio Button - radiobuttonfield or rb (recommended)
Secured Field - securedfield or sc
Attachment Field - attachmentfield or a
Image Field - imagefield or img
Signer Name Field - textfield or t
Date Signed - datefield or d
Accept Button - accept or ab
Decline Button - decline or db
PayField - payfield or pf
Examples
${textfield:1:y:client_name:________} - A mandatory textfield which is assigned to party number 1 with field name as 'client name'.
${tb:1:n:________________} - An optional textbox assinged to party 1.
${signfield:1:y:____} - A mandatory signature field assigned to party number 1.
${i:2:n} - An optional initial field assigned to party number 2.
${datefield:2:n::____} - An optional date field assigned to party number 2 with empty field name.
${c:2:y:male:gender:::multicheck} - A checkbox assigned to party number 2 with initial value as checked with name 'male' and group 'gender' with multiple check option enable to same group checkbox.
${c:1:y:yes:group-y} - A checkbox assigned to party number 1 with initial value as checked with name 'yes' and group 'group'. 'group-y' means group mandatory.
${rb:1:n:yes:grp1} - An un-selected radio button assigned to party 1 with the name yes and grp 'grp1'.
${rb:1:y:no:group2-y} - A radio button assigned to party number 1 with initial value as checked with the name 'no' and group 'group2'. 'group2-y' means group mandatory.
${sc:2:n:Credit_Card_Number:4:____} - A secured field assigned to party 2, which is optional with the name 'Credit Card Number' and only last 4 characters to remain unmasked.
${attachmentfield:1:y:____} - A mandatory attachment field assigned to party number 1.
${img:1:n:stamp_image:120:50:__} - An optional image field is a field name 'stamp image' with 120-pixel width and 50-pixels height which is assigned to party number 1.
${textfield:1:y:Signer_Name:________} - A mandatory signer name field which is assigned to party number 1 with field name as 'Signer_Name'. This field is auto-populated once the document is opened by the signer.
${datefield:1:y:Date_Signed:_______} - A mandatory date signed field assigned to party number 1 with field name as 'Date_Signed'. This field will auto populate once the document is opened by the signer.
${accept:1:90:20} - A accept button field with 90-pixel width and 20-pixel height assigned to party number 1.
${decline:1:90:20} - A decline button field with 90-pixel width and 20-pixel height assigned to party number 1.
${payfield:1:paymentType:payeeOptions:productAndService:paymentDescription:paymentAmount} - Tag consolidates Payment Type, Product/Service, Payment Description, and Payment Amount to utilize the payment field.
Personalized Fields:We can use the personalized field tag while sending it via API in place of process tags. Personalized field creation instructions can be seen in the help center.
Examples
${field_7:1}Using this format, you can simply use the existing personalized field name and properties assigned to party #1.
${field_15:1:y:field_name:90:20} Using this format, you can simply use the existing personalized field name
Here is a PDF file with some other Text Tag samples: Sample Document.
Preparing PDF documents with Recipient Party Tags
To send a PDF document from your application for signature, you can either define the recipient parties in the documents itself or send the recipients information via API call. Foxit eSign supports simple Text Tags for recipient party information. In case both API call and Tags on the PDF are provided with Recipient Party information, Foxit eSign will use API call values.
A Recipient Party Tag is a simple text block within your PDF document that defines the party, who is responsible for filling the fields.
Quick Tip:
When you apply Recipient Party tags to the document, Foxit eSign does not remove or replace the Recipient Party Tags text. You can hide codified Recipient Party Tags by using the same font color as the background of the document, so the Recipient Party tags will be used by Foxit eSign to derive signers. Still, the tags will not be visible on the document.
Tag Type: Accepts only value as rp, which is an identifier of recipient party tags.
Party First Name: First name of the recipient party.
Party Last Name: Last name of the recipient party.
Party email: Email of the recipient party.
Party permission: Use this field to assign folder permissions to a recipient. It can be any one of the following values: FILL_FIELDS_AND_SIGN, FILL_FIELDS_ONLY, SIGN_ONLY, VIEW_ONLY
Party workflow sequence: If the document is signed in sequence, the recipient party will receive the notification as per the workflow sequence number. It should be starting with 1 like 1,2,3,4, etc.
Party sequence: Assign a sequence number to a recipient in the list of recipient parties. Use unique sequence numbers or party numbers for each party, starting with 1 like 1,2,3,4, etc.
Adding Fields in Document(s) via API
Fields can also be added to the documents via an array of JSON objects in the input data for the API request.
This way of adding fields gives you more control over the size of fields, their font color and font size, etc.
While adding the fields on each document page, the position of the fields is relative to the top left corner of that page.
Each field object must contain the following values:
NOTE: If one of these values is missing field may disappear.
type - (string) the type of field to be added at this place. Can be one of these values: text|signature|initial|textbox|date|secure|checkbox|radiobutton|dropdown|attachment|image|accept|decline
x - (int) the x location coordinate of the top left corner of the field in pixels
y - (int) the y location coordinate of the top left corner of the field in pixels
width - (int) the width of the field in the pixel
height - (int) the height of the field in pixel
documentNumber - (int) the document index in the document files array starting from 1
pageNumber - (int) page in the document where the field needs to be added
There are other parameters which can be optional and different for different field types.
text or textbox type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
value - (string)
required - (boolean) value: either true or false
textAlignment - (string) value: left, center, or right
characterLimit - (int)
fontSize - (int)
fontColor (string) example: #0000FF for blue
validation (string) value: anyone from None(default) or Numbers or Letters or RegexValidation(in case of text type) or CanadianSin(Canadian SIN Number)
hideFieldNameForRecipients - (boolean) value: either true or false
formulafield type
party - (int) party index from the parties submitted in this request starting from 1
formulafieldName - (string)
formula - (string)
fontFamily - (string)
documentNumber - (int)
fontSize - (int)
fontColor (string) example: #0000FF for blue
x - (int) the x location coordinate of the top left corner of the field in pixels
y - (int) the y location coordinate of the top left corner of the field in pixels
width - (int) the width of the field in pixel
height - (int) the height of the field in pixel
pageNumber - (int) page in the document where field needs to be added
tabOrder - (int)
decimalPlaces - (int)
payfield type
payeeOptions - (string) Specify payment methods for the payee to choose from any of the following options:["CardPayment"] or ["AchBankPayment"] or ["CardPayment", "AchBankPayment"]
paymentType - (string) Determines payment amount type: "Fixed" or "Payee decides". Note: "Payee_decides" in case of text tag.
paymentAmount - (string) Required for 'Fixed' payment type, must be an integer or have up to two decimal places
paymentDescription - (string) Description of the payment (Character limit: 250)
productAndService (string) Name of the product or service (Character limit: 75)
documentNumber - (int)
pageNumber - (int) page in the document where field needs to be added
x - (int) the x location coordinate of the top left corner of the field in pixels
y - (int) the y location coordinate of the top left corner of the field in pixels
tabOrder - (int)
width - (int) the width of the field in pixel
height - (int) the height of the field in pixel
party - (int) party index from the parties submitted in this request starting from 1
Note: 1. The Payment field is available exclusively in the US region and initially supports payments only in USD. 2. The Super Admin must create a merchant account to use the Payment field.
signature or initial type
party - (int)
required - (boolean) value: either true or false
date type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
value - (string)
required - (boolean) value: either true or false
textAlignment - (string) value: left, center, or right
fontSize - (int)
fontColor (string) example: #0000FF for blue
dateFormat (string) example: MM-DD-YYYY for 04-30-2019
hideFieldNameForRecipients - (boolean) value: either true or false
secure type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
value - (string)
required - (boolean) value: either true or false
fontSize - (int)
fontColor (string) example: #0000FF for blue
charToDisplay (int)
hideFieldNameForRecipients - (boolean) value: either true or false
checkbox type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
group - (string)
required - (boolean) value: either true or false
multicheck - (boolean) value: either true or false
hideCheckboxBorder - (boolean) value: either true or false
dropdown type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
value - (string)
required - (boolean) value: either true or false
fontSize - (int)
fontColor (string) example: #0000FF for blue
options (array of strings)
hideFieldNameForRecipients - (boolean) value: either true or false
attachment type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
required - (boolean) value: either true or false
hideFieldNameForRecipients - (boolean) value: either true or false
image type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
required - (boolean) value: either true or false
inputType - (string) value: either url or base64
imageName - (string) image name with extension(png, jpg or jpeg)
source - (string) value: either url or base64 value
signer name type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
required - (boolean) value: either true or false
fontSize - (int)
fontColor (string) example: #0000FF for blue
readOnly - (boolean) value: either true or false
systemField - (boolean) value: either true or false
date signed type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
required - (boolean) value: either true or false
textAlignment - (string) value: left, center, or right
fontSize - (int)
fontColor (string) example: #0000FF for blue
dateFormat (string) example: MM-DD-YYYY for 04-30-2019
readOnly - (boolean) value: either true or false
systemField - (boolean) value: either true or false
accept or decline type
party - (int)
Apply Template while uploading the documents
You can copy template fields to the document via API while using the call: /folders/createfolder
To copy template fields while uploading the document, add the following to your document folder creation API call:
Parameter
Description
applyTemplate
Default false
Value can be either true or false
If true, It will process the copy template fields.
templateIds
An array of template IDs you want to use to copy template fields into the documents for this folder. You can determine the template ID from the template URL.(https://{{HOST_NAME}}/templates/prepareimmutabletemplate?template.templateId={TEMPLATE_ID})
templateFieldsValues (optional)
You may pass of the field values used in the templates to prefill them in the documents created from the template.
FIELD_NAME is the name of the field used in the template. FIELD_VALUE is the document field value.
Sending the documents
To create a document from PDF files you need to make a call to /folders/createfolder with the given parameters.
You can either store the document as 'Draft' in your Foxit eSign account and send it later.
Or you can directly send the document via Foxit eSign API.
Or you can embed the document directly inside your application.
An array of URLs to PDF documents you are sending. It should be publicly accessible when you are creating the document.
base64FileString (required if inputType is base64)
An array of BASE64 to PDF documents you are sending. It should be publicly accessible when you are creating the document.
fileNames (required)
An array of the file names whose URLs are given in the previous parameter
Custom Fields (optional) Two custom fields custom_field1 and custom_field2
Parameter
Description
name
Name of the custom field
value
Value of the custom field
Custom fields can be used for many purposes such as identifying the application and module where the signed document belongs. You can use the custom fields as per your requirements. Maximum of two custom fields can be passed to Foxit eSign via API that is stored at the folder level. The webhook response includes these custom fields.
metadata (optional)
This should be in the key value pair. Maximum 1000 key value pairs are allowed.
processTextTags (optional)
Value can be either true or false
Use this field to determine whether Foxit eSign should parse your documents for Text Tags to convert them into Foxit eSign fields.
processAcroFields (optional)
Value can be either true or false
Use this field to determine whether Foxit eSign should parse your documents for AcroFields to convert them into Foxit eSign fields.
signInSequence Default false
Value can be either true or false
Use this field to determine whether recipients will sign the folder in a sequence.
If false, then all the recipients receive the invitation email simultaneously. When true, then each recipient receives an invitation email successively after the previous recipient completes the required task, like signing the documents or filling fields, etc.
inPersonEnable Default false
Value can be either true or false
Use this field to initiate the in-person signing process which can be easily completed on any device in a matter of minutes and avoids email based signatures where required.
If false, then all the recipients receive the invitation email simultaneously. When true, then in-person administrator receives an invitation email to initiate the signing process for the signer.
requiredBothEmbeddedSession Default false
Value can be either true or false If true, It will generate the embedded sending and signing URLs together.
folderPassword (Optional)
This password will be required by the signer/author in order to open the digitally signed document.
If the parameter is kept blank then no password will be required to open the digitally signed document.
sendNow Default false
Value can be either true or false
Use this field to send the folder to the recipient parties. Each party will then receive a unique link in their email to sign the document.
The invitation mail and subject in this case will be the same as the default invitation mail setup in your account.
signSuccessUrlAllParties Default false
Value can be either true or false
If true then folder will be redirected to after successfully signing the document on the absolute URL which URL is provided by the signSuccessUrl parameter
Note: This parameter is only applicable when the sendNow parameter is true and sent a folder invitation email.
createEmbeddedSendingSession Default false
Value can be either true or false
If true then an embedded token will be generated in the response,
for an embedded sending session, where you can directly open the Foxit eSign document preparing view in your application for dragging and dropping various fields on your document.
And also give a custom invitation message.
fixRecipientParties (required if createEmbeddedSendingSession is true)
Value can be either true or false
If true then in the embedded sending view you won't be able to change the parties for the folder which are already added as a part of this API request.
fixDocuments (required if createEmbeddedSendingSession is true)
Value can be either true or false
If true then in the embedded sending view you won't be able to change the documents for the folder which are already added as a part of this API request.
sendSuccessUrl (required if createEmbeddedSendingSession is true)
Enter the absolute URL for the landing page on your website/application,
which the user will be redirected to after successfully sending the folder in the embedded sending view.
sendErrorUrl (optional)
Enter the absolute URL for the landing page on your website/application,
which the user will be redirected to if error comes during sending the folder in the embedded sending view.
hideSendButton (optional, default=false)
Value can be either true or false
If true, it will hide the Send button in the embedded sending session.
Else if false, you will be able to send the folder.
enableStepByStep (optional, default=false)
To enable step by step action in the embedded sending session.
createEmbeddedSigningSession Default false
Value can be either true or false
If true then an embedded token will be generated in the response,
for an embedded signing session for the recipient whose email will be given in the emailIdOfEmbeddedSigner,
and that party will not receive any invitation email.
Value can be either true or false
If true, then an embedded signing session is created for all the recipients in the folder.
Else if false, then the embedded signing session is only created for those recipients whose email ids are given in
embeddedSignersEmailIds.
embeddedSignersEmailIds
(optional)
An array of email ids of recipients for whom an embedded signing session needs to be created.
The values must be email ids from the recipient parties added in the parties list.
signSuccessUrl
(optional,append ?parent=false if you want to redirect within the same iframe)
Enter the absolute URL for the landing page on your website/application, which the user will be redirected to after successfully signing the folder in the embedded signing view.
signDeclineUrl
(optional,append ?parent=false if you want to redirect within the same iframe)
Enter the absolute URL for the landing page on your website/application, which the user will be redirected to if he declines to sign the folder in the embedded signing view.
signLaterUrl (optional)
Enter the absolute URL for the landing page your website/application, which the user will be redirected to if he chooses to sign the folder later in the embedded signing view.
signErrorUrl (optional)
Enter the absolute URL for the landing page your website/application, which the user will be redirected to if error comes during signing the folder in the embedded signing view.
Value can be either true or false
If true, it will hide the Next Required Field button(top on the right side of the user interface) in an embedded signing session.
Value can be either true or false
If true, then the Foxit eSign will send the invitation email to each recipient to sign the document with the unique embedded signing session link for the recipient whose email is included in emailIdOfEmbeddedSigner.
Note: This parameter is ONLY applicable when both parameters sendNow and createEmbeddedSigningSession is true
emailTemplateId (optional)
If you want to use the email template other than the default email template, then pass that particular email template id.
signerInstructionId (optional)
If you want to use the signer instructions other than the default signer instructions, then pass that particular signer instruction id like "signerInstructionId":1.
confirmationInstructionId (optional)
If you want to use the confirmation text other than the default confirmation text, then pass that particular confirmation instruction id like "confirmationInstructionId":2.
signerInstructionCustomFields (required if signerInstructionId is not 0)
A list of signer instruction fields details you're sending the folder to. Every field must contain tag, type, and value fields.
Parameter
Description
tag (required)
Signer Instruction custom field name
type (required)
type can be plain
value (required)
Signer Instruction custom field value (Note:- use HTML tag <br> for line break)
confirmationInstructionCustomFields (required if confirmationInstructionId is not 0)
A list of confirmation instruction fields details you're sending the folder to. Every field must contain tag, type, and value fields.
Parameter
Description
tag (required)
Confirmation Text custom field name
type (required)
type can be plain
value (required)
Confirmation Text custom field value (Note:- use HTML tag <br> for line break)
Value can be either true or false
Validate the email address of the parties.
parties (required)
A list of recipient parties you're sending the folder to. Every entry must contain firstName, lastName, emailId, permission and sequence fields.
permission
Use this field to assign folder permissions to a recipient. Can be any one of the following values: FILL_FIELDS_AND_SIGN, FILL_FIELDS_ONLY, SIGN_ONLY, VIEW_ONLY, PARTY_ASSIGNER
isPlaceholder (optional, default=false)
Value can be either true or false
Use this field to initiate the party is a placeholder.
Note:
1. firstName, lastName, emailId parameter's value must be blank for this party.
2. To add the placeholder, one recipient must be requred with 'PARTY_ASSIGNER' permission.
partyRole
(optional)
Use this field to assign a role of placeholder.
Note: This parameter is only applicable when the party is a placeholder.
workflowSequence
Use this field to assign a workflow sequence number to a recipient in the list of recipient parties.
If the document is signed in sequence, the recipient party will receive the folder invitation notification as per the workflow sequence number.
Note: Workflow sequence should be starting with 1 like 1,2,3,4, etc. Any gap in workflow sequence like 1,2,4 is not a valid case.
If a single person appears multiple times in the signing workflow, please assign a different workflowSequence each time the recipient is repeated.
sequence
Use this field to assign a sequence number to a recipient in the list of recipient parties.
Use unique sequence numbers for each party starting with 1 like 1,2,3,4....
If a single person appears multiple times in the signing workflow, please assign a different sequence each time the recipient is repeated.
dialingCode
Use this field to assign a country dial-in codes are mobile number prefixes to a recipient in the list of recipient parties.
mobileNumber
Use this field to assign a mobile number to a recipient in the list of recipient parties.
signerAuthLevel
This parameter should be NO, SMS LINK, Email Access Code, User-defined Access Code, SMS Access Code and Voice Access Code.
The company should be enabled the below features for the below authentication level.
Features
Authentication Level
Authentication via SMS
SMS LINK
Authentication Via Email
Email Access Code
2FA Via Authy
SMS Access Code
2FA Via Authy
Voice Access Code
User-defined Access Code
User-defined Access Code
Note: A dialing code and mobile number must be required for the SMS Access Code and Voice Access Code authentication level.
Access code must be required for the User-defined Access Code authentication level.
userDefinedAccessCode
Codes are not case-sensitive
The system does not send this code so you must share this code with the signer directly
Access code can contain alphabets, numbers and the following special characters:
@,&,{,},%,(,),~,|,!,+,^
allowNameChange
Value can be either true or false
Use this parameter to allow the signer to update first and last name before completing the signing process.
Note: Please make ensure the "Update Name Change"option is enabled from company settings.
partyIsEmailGroup
Value can be either true or false
Use this parameter for creating a party as bulk.
Note: If this parameter is true, firstName, lastName and emailId of this party will be ignored.
emailGroupId
Pass the email the group id you want to use to create bulk
allowSingleSignerInBulk
Value can be either true or false
Use this parameter to allow only one person to sign in email group.
hostEmailId
Use this parameter to pass the email id of in-person administrator.
sessionExpire (optional, default=false)
Value can be either true or false
Use this field to initiate the expire of the embedded signing session.
expiry (required if sessionExpire is true)
Use this field to enter the time duration in milliseconds of the expiry on the embedded signing session.
fields (optional)
A list of different fields to be added to the document(s).
dependentFields (optional)
A list of dependent fields.
Parameter
Description
dependentFieldName
Name of the dependent field.
parentFieldName
Name of the parent field.
parentFieldValue
Value of the parent field.In the case of radio and checkbox value can be either checked or unchecked
options (optional)
In the case of textfield value can be either isBlank or allowNull or contains
senderEmail (optional)
You can enter the email of another user in your account, which will be used for sending this document(s) folder to the recipient parties.
themeColor (optional)
You can enter a css value for a color to match your website's look n feel when you embed Foxit eSign inside.
The top blue band of the embedded screen is then replaced with the color provided by you.
hideDeclineToSign (optional, default=false)
If true, it will hide the option of "Decline to Sign" for the signer.
hideMoreAction (optional, default=false)
If true, it will hide the "More Actions" button in sending/signing session.
In case of "Send Now": true, it will not hide anything
hideAddPartiesOption (optional, default=false)
If true,
it will hide the option to add parties option in Draft and Template Creation mode.
hideSignerSelectOption (optional)
Value can be either true or false
If true, it will hide the "Existing Signer Name/Email" input box on Recipient Parties in an embedded sending session.
hideSignerActions (optional, default=false)
Value can be either true or false
If true, it will hide the signer "edit", "change" and "remove" actions on Recipient Parties in an embedded sending session.
hideSenderName (optional, default=false)
Value can be either true or false
If true, it will hide the sender name on Recipient Parties in an embedded sending session.
hideFolderName (optional, default=false)
Value can be either true or false
If true, it will hide the folder name on navigation in both embedded sessions.
hideDocumentsName (optional, default=false)
Value can be either true or false
If true, it will hide the document name in both embedded sessions.
hideAddMeButton (optional)
Value can be either true or false
If true, it will hide the "Add Me" button on Recipient Parties in an embedded sending session.
hideAddNewButton (optional)
Value can be either true or false
If true, it will hide the "Add New" button on Recipient Parties in an embedded sending session.
hideAddGroupButton (optional)
Value can be either true or false
If true, it will hide the "Add Group" button on Recipient Parties in an embedded sending session.
Value can be either true or false
Hide field names for Recipients for Data Entry Fields and Advanced Fields.(Except Radio button, Checkbox, Image and Hyperlink).
hideCheckboxBorder (optional, default=false)
Value can be either true or false
Borders of Checkbox will be hidden in the executed documents.
selfSign(optional, default=false)
Value can be either true or false
It enables embedded Self Sign via APIs.
Note: This parameter is only applicable when the createEmbeddedSendingSession parameter is true
selfSignerSuccessUrl (Optional, if selfSign is true)
Enter the absolute URL for the landing page on your website/application,
which the user will be redirected to after successfully Self Sign sending the folder in the embedded sending view.
You can also pass PDF document(s) as a multipart form data instead of passing a publicly accessible URLs.
In this case pass the JSON as 'data' parameter and include file as a multipart form parameter 'file'.
Make sure you're using multipart/form-data as a content type for this call.
Sample Code (creating documents from multipart form data)
"
....
},
"authenticationLevel":"NO",
"senderEmail":"autheremailid@xyz.com",
"signerInstructionId":1,
"confirmationInstructionId":2,
"signerInstructionCustomFields":[
{
"tag":"CUSTOM_TAGS_1",
"type":"plain",
"value":"Please review the document."
}
],
"confirmationInstructionCustomFields":[
{
"tag":"CUSTOM_TAGS_2",
"type":"plain",
"value":"Click here to confirm signing."
}
]
}
Parameter
Description
folderId (required)
Folder id you want to use to send the document for this folder. You can determine the folder id from the draft folder URL.
https://{{HOST_NAME}}/documents/viewdraftfolder?folder.envelopeId=2520579
folderName (optional)
Name of the document(s) folder
folderPassword (optional)
This password will be required by the signer/author in order to open the digitally signed document. If the parameter is kept blank then no password will be required to open the digitally signed document
signInSequence
Value can be either true or false
Use this field to determine whether recipients will sign the folder in a sequence.
If false, then all the recipients receive the invitation email simultaneously.
When true, then each recipient receives an invitation email successively after previous recipient completes the required task, like signing the documents or filling fields, etc.
inPersonEnable
Value can be either true or false
Use this field to initiate the in-person signing process which can be easily completed on any device in a matter of minutes and avoids email based signatures where required.
If false, then all the recipients receive the invitation email simultaneously.
When true, then in-person administrator receives an invitation email to initiate the signing process for the signer.
sendNow default true
Value can be either true or false
Use this field to send the folder to the recipient parties. Each party will then receive a unique link in their email to sign the document. The invitation mail and subject in this case will be the same as the default invitation mail setup in your account.
signSuccessUrlAllParties Default false
Value can be either true or false
If true then folder will be redirected to after successfully signing the document on the absolute URL which URL is provided by the signSuccessUrl parameter
Note: This parameter is only applicable when the sendNow parameter is true and sent a folder invitation email.
createExecutedFolder (optional, default=false)
Value can be either true or false
folder automatically executed with the folder existing party.
Note: Every existing party has saved their signature and initial sign in our company profile.
Value can be either true or false
If true then an embedded token will be generated in the response, for an embedded signing session for the recipient whose email will be given in the emailIdOfEmbeddedSigner, and that party will not receive any invitation email.
Parameter
Description
signSuccessUrl (optional,append ?parent=false if you want to redirect within the same iframe)
Enter the absolute URL for the landing page on your website/application, which the user will be redirected to after successfully signing the folder in the embedded signing view.
signErrorUrl (optional)
Enter the absolute URL for the landing page your website/application, which the user will be redirected to if error comes during signing the folder in the embedded signing view.
signDeclineUrl (optional)
If true, it will hide the option of "Decline to Sign" for the signer.
signLaterUrl (optional)
Enter the absolute URL for the landing page your website/application, which the user will be redirected to if he chooses to sign the folder later in the embedded signing view.
themeColor (optional)
You can enter a css value for a color to match your website's look n feel when you embed Foxit eSign inside. The top blue band of the embedded screen is then replaced with the color provided by you.
hideMoreAction (optional)
Value can be either true or false
If true, it will hide the "More Actions" button in an signing session. In case of sendNow is false, it will not hide anything
hideDeclineToSign (optional, default=false)
If true, it will hide the option of "Decline to Sign" for the signer.
Value can be either true or false
If true, it will hide the Next Required Field button(top on the right side of the user interface) in an embedded signing session.
sessionExpire (optional, default=false)
Value can be either true or false
Use this field to initiate the expire of the embedded signing session.
expiry (required if sessionExpire is true)
Use this field to enter the time duration in milliseconds of the expiry on the embedded signing session.
Value can be either true or false
If true, Foxit eSign will send the invitation email to each recipient to sign the document with the unique embedded signing session link for the recipient whose email is included in emailIdOfEmbeddedSigner.
Note: This parameter is ONLY applicable when both parameters sendNow and createEmbeddedSigningSession is true
emailTemplateId (optional)
If you want to use the email template other than the default email template, then pass that particular email template id.
emailTemplateCustomFields (required if emailTemplateId is not 0)
A list of email template fields details you're sending the folder to. Every field must contain tag, type, value fields.
Parameter
Description
tag (required)
Email template custom field name
type (required)
type can be either plain or hyperlink
url (required if field type is hyperlink)
HYPERTEXT_REFERENCE of hyperlink
value (required)
Email template custom field value
authenticationLevel (optional)
This parameter should be NO, SMS LINK, Email Access Code, User-defined Access Code, SMS Access Code and Voice Access Code.
The company should be enabled the below features for the below authentication level.
Features
Authentication Level
Authentication via SMS
SMS LINK
Authentication Via Email
Email Access Code
2FA Via Authy
SMS Access Code
2FA Via Authy
Voice Access Code
User-defined Access Code
User-defined Access Code
Note: A dialing code and mobile number must be required for the SMS Access Code and Voice Access Code authentication level.
Access code must be required for the User-defined Access Code authentication level.
Custom Fields (optional) Two custom fields custom_field1 and custom_field2
Parameter
Description
name
Name of the custom field
value
Value of the custom field
Custom fields can be used for many purposes such as identifying the application and module where the signed document belongs. You can use the custom fields as per your requirements. Maximum of two custom fields can be passed to Foxit eSign via API that are stored at the folder level. The webhook response includes these custom fields.
Value can be either true or false
Validate the email address of the parties.
parties (optional)
A list of recipient parties you're sending the folder to. Every entry must contain firstName, lastName, emailId, permission and sequence fields.
permission
Use this field to assign folder permissions to a recipient. Can be any one of the following values: FILL_FIELDS_AND_SIGN, FILL_FIELDS_ONLY, SIGN_ONLY, VIEW_ONLY, PARTY_ASSIGNER
isPlaceholder (optional, default=false)
Value can be either true or false
Use this field to initiate the party is a placeholder.
Note:
1. firstName, lastName, emailId parameter's value must be blank for this party.
2. To add the placeholder, one recipient must be required with 'PARTY_ASSIGNER' permission.
partyRole
(optional)
Use this field to assign a role of placeholder.
Note: This parameter is only applicable when the party is a placeholder.
workflowSequence
Use this field to assign a workflow sequence number to a recipient in the list of recipient parties.
If the document is signed in sequence, the recipient party will receive the folder invitation notification as per the workflow sequence number.
Note: Workflow sequence should be starting with 1 like 1,2,3,4, etc. Any gap in workflow sequence like 1,2,4 is not a valid case.
If a single person appears multiple times in the signing workflow, please assign a different workflowSequence each time the recipient is repeated.
sequence
Use this field to assign a sequence number to a recipient in the list of recipient parties.
Use unique sequence numbers for each party starting with 1 like 1,2,3,4....
If a single person appears multiple times in the signing workflow, please assign a different sequence each time the recipient is repeated.
dialingCode
Use this field to assign a country dial-in codes are mobile number prefixes to a recipient in the list of recipient parties.
mobileNumber
Use this field to assign a mobile number to a recipient in the list of recipient parties.
signerAuthLevel
This parameter should be NO, SMS LINK, Email Access Code, User-defined Access Code, SMS Access Code and Voice Access Code.
The company should be enabled the below features for the below authentication level.
Features
Authentication Level
Authentication via SMS
SMS LINK
Authentication Via Email
Email Access Code
2FA Via Authy
SMS Access Code
2FA Via Authy
Voice Access Code
User-defined Access Code
User-defined Access Code
Note: A dialing code and mobile number must be required for the SMS Access Code and Voice Access Code authentication level.
Access code must be required for the User-defined Access Code authentication level.
userDefinedAccessCode
Codes are not case-sensitive
The system does not send this code so you must share this code with the signer directly
Access code can contain alphabets, numbers and the following special characters:
@,&,{,},%,(,),~,|,!,+,^
allowNameChange
Value can be either true or false
This parameter allows the signer to update first and last name before completing the signing process.
Note: Please make sure the "Update Name Change"option is enabled from company settings.
partyIsEmailGroup
Value can be either true or false
Use this parameter for creating a party in bulk.
Note: If this parameter is true, firstName, lastName and emailId of this party will be ignored.
emailGroupId
Pass email group id you want to use to create bulk
allowSingleSignerInBulk
Value can be either true or false
Use this parameter to allow only one person to sign in email group.
hostEmailId
Use this parameter to pass the email id of the in-person administrator.
fields (optional)
A list of different fields to be added to the document(s).
senderEmail (optional)
You can enter another user's email in your account, which will be used for sending this document(s) folder to the recipient parties.
signerInstructionId (optional)
If you want to use the signer instructions other than the default signer instructions, then pass that particular signer instruction id like "signerInstructionId":1.
confirmationInstructionId (optional)
If you want to use the confirmation text other than the default confirmation text, then pass that particular confirmation instruction id like "confirmationInstructionId":2.
signerInstructionCustomFields (required if signerInstructionId is not 0)
A list of signer instruction fields details you're sending the folder to. Every field must contain tag, type, value fields.
Parameter
Description
tag (required)
Signer Instruction custom field name
type (required)
type can be plain
value (required)
Signer Instruction custom field value (Note:- use HTML tag <br> for line break)
confirmationInstructionCustomFields (required if confirmationInstructionId is not 0)
A list of confirmation instruction fields details you're sending the folder to. Every field must contain tag, type, value fields.
Parameter
Description
tag (required)
Confirmation Text custom field name
type (required)
type can be plain
value (required)
Confirmation Text custom field value (Note:- use HTML tag <br> for line break)
Value can be either true or false
Hide field names for Recipients for Data Entry Fields and Advanced Fields.(Except Radio button, Checkbox, Image and Hyperlink).
hideCheckboxBorder (optional, default=false)
Value can be either true or false
Borders of Checkbox will be hidden in the executed documents.
"
....
},
"authenticationLevel":"NO",
"senderEmail":"autheremailid@xyz.com",
"signerInstructionId":1,
"confirmationInstructionId":2,
"signerInstructionCustomFields":[
{
"tag":"CUSTOM_TAGS_1",
"type":"plain",
"value":"Please review the document."
}
],
"confirmationInstructionCustomFields":[
{
"tag":"CUSTOM_TAGS_2",
"type":"plain",
"value":"Click here to confirm signing."
}
]
}
Parameter
Description
folderId (required)
Folder id you want to use to modify the folder. You can determine the folder id from the shared folder URL.
https://{{HOST_NAME}}/documents/viewfolderforsigning?folder.envelopeId=2520579
folderName (optional)
Name of the document(s) folder
folderPassword (optional)
This password will be required by the signer/author in order to open the digitally signed document. If the parameter is kept blank then no password will be required to open the digitally signed document
signInSequence
Value can be either true or false
Use this field to determine whether recipients will sign the folder in a sequence.
If false, then all the recipients receive the invitation email simultaneously.
When true, then each recipient receives an invitation email successively after previous recipient completes the required task, like signing the documents or filling fields, etc.
inPersonEnable
Value can be either true or false
Use this field to initiate the in-person signing process which can be easily completed on any device in a matter of minutes and avoids email based signatures where required.
If false, then all the recipients receive the invitation email simultaneously.
When true, then in-person administrator receives an invitation email to initiate the signing process for the signer.
sendNow default true
Value can be either true or false
Use this field to send the folder to the recipient parties. Each party will then receive a unique link in their email to sign the document. The invitation mail and subject in this case will be the same as the default invitation mail setup in your account.
signSuccessUrlAllParties Default false
Value can be either true or false
If true then folder will be redirected to after successfully signing the document on the absolute URL, which URL is provided by the signSuccessUrl parameter
Note: This parameter is only applicable when the sendNow parameter is true and sent a folder invitation email.
createEmbeddedSendingSession Default false
Value can be either true or false
If true then an embedded token will be generated in the response,
for an embedded sending session, where you can directly open the Foxit eSign document preparing view in your application for dragging and dropping various fields on your document.
And also give a custom invitation message.
fixRecipientParties (required if createEmbeddedSendingSession is true)
Value can be either true or false
If true then in the embedded sending view, you won't be able to change the parties for the folder, which are already added as a part of this API request.
fixDocuments (required if createEmbeddedSendingSession is true)
Value can be either true or false
If true then in the embedded sending view you won't be able to change the documents for the folder which are already added as a part of this API request.
sendSuccessUrl (required if createEmbeddedSendingSession is true)
Enter the absolute URL for the landing page on your website/application,
which the user will be redirected to after successfully sending the folder in the embedded sending view.
sendErrorUrl (optional)
Enter the absolute URL for the landing page on your website/application,
which the user will be redirected to if error comes during sending the folder in the embedded sending view.
hideSendButton (optional, default=false)
Value can be either true or false
If true, it will hide the Send button in the embedded sending session.
Else if false, you will be able to send the folder.
enableStepByStep (optional, default=false)
To enable step by step action in the embedded sending session.
hideSignerSelectOption (optional)
Value can be either true or false
If true, it will hide the "Existing Signer Name/Email" input box on Recipient Parties in an embedded sending session.
hideSignerActions (optional, default=false)
Value can be either true or false
If true, it will hide the signer "edit", "change" and "remove" actions on Recipient Parties in an embedded sending session.
hideSenderName (optional, default=false)
Value can be either true or false
If true, it will hide the sender name on Recipient Parties in both embedded sessions.
hideFolderName (optional, default=false)
Value can be either true or false
If true, it will hide the folder name on navigation in both embedded sessions.
hideDocumentsName (optional, default=false)
Value can be either true or false
If true, it will hide the document name in both embedded sessions.
hideAddMeButton (optional)
Value can be either true or false
If true, it will hide the "Add Me" button on Recipient Parties in an embedded sending session.
hideAddNewButton (optional)
Value can be either true or false
If true, it will hide the "Add New" button on Recipient Parties in an embedded sending session.
hideAddGroupButton (optional)
Value can be either true or false
If true, it will hide the "Add Group" button on Recipient Parties in an embedded sending session.
createExecutedFolder (optional, default=false)
Value can be either true or false
folder automatically executed with the folder existing party.
Note: Every existing party has saved their signature and initial sign in our company profile.
Value can be either true or false
If true then an embedded token will be generated in the response, for an embedded signing session for the recipient whose email will be given in the emailIdOfEmbeddedSigner, and that party will not receive any invitation email.
Parameter
Description
signSuccessUrl (optional,append ?parent=false if you want to redirect within the same iframe)
Enter the absolute URL for the landing page on your website/application, which the user will be redirected to after successfully signing the folder in the embedded signing view.
signErrorUrl (optional)
Enter the absolute URL for the landing page your website/application, which the user will be redirected to if error comes during signing the folder in the embedded signing view.
signDeclineUrl (optional)
If true, it will hide the option of "Decline to Sign" for the signer.
signLaterUrl (optional)
Enter the absolute URL for the landing page your website/application, which the user will be redirected to if he chooses to sign the folder later in the embedded signing view.
themeColor (optional)
You can enter a css value for a color to match your website's look n feel when you embed Foxit eSign inside. The top blue band of the embedded screen is then replaced with the color provided by you.
hideMoreAction (optional)
Value can be either true or false
If true, it will hide the "More Actions" button in an signing session. In case of sendNow is false, it will not hide anything.
hideDeclineToSign (optional, default=false)
If true, it will hide the option of "Decline to Sign" for the signer.
Value can be either true or false
If true, it will hide the Next Required Field button(top on the right side of the user interface) in an embedded signing session.
sessionExpire (optional, default=false)
Value can be either true or false
Use this field to initiate the expire of the embedded signing session.
expiry (required if sessionExpire is true)
Use this field to enter the time duration in milliseconds of the expiry on the embedded signing session.
Value can be either true or false
If true, Foxit eSign will send the invitation email to each recipient to sign the document with the unique embedded signing session link for the recipient whose email is included in emailIdOfEmbeddedSigner.
Note: This parameter is ONLY applicable when both parameters sendNow and createEmbeddedSigningSession is true
emailTemplateId (optional)
If you want to use the email template other than the default email template, then pass that particular email template id.
emailTemplateCustomFields (required if emailTemplateId is not 0)
A list of email template fields details you're sending the folder to. Every field must contain tag, type, and value fields.
Parameter
Description
tag (required)
Email template custom field name
type (required)
type can be either plain or hyperlink
url (required if field type is hyperlink)
HYPERTEXT_REFERENCE of hyperlink
value (required)
Email template custom field value
authenticationLevel (optional)
This parameter should be NO, SMS LINK, User-defined Access Code, Email Access Code, SMS Access Code and Voice Access Code.
The company should be enabled the below features for the below authentication level.
Features
Authentication Level
Authentication via SMS
SMS LINK
Authentication Via Email
Email Access Code
2FA Via Authy
SMS Access Code
2FA Via Authy
Voice Access Code
User-defined Access Code
User-defined Access Code
Note: A dialing code and mobile number must be required for the SMS Access Code and Voice Access Code authentication level.
Access code must be required for the User-defined Access Code authentication level.
Custom Fields (optional) Two custom fields custom_field1 and custom_field2
Parameter
Description
name
Name of the custom field
value
Value of the custom field
Custom fields can be used for many purposes, such as identifying the application and module where the signed document belongs. You can use the custom fields as per your requirements. Maximum of two custom fields can be passed to Foxit eSign via API that are stored at the folder level. The webhook response includes these custom fields.
Value can be either true or false
Validate the email address of the parties.
parties (optional)
A list of recipient parties you're sending the folder to. Every entry must contain firstName, lastName, emailId, permission and sequence fields.
permission
Use this field to assign folder permissions to a recipient. Can be any one of the following values: FILL_FIELDS_AND_SIGN, FILL_FIELDS_ONLY, SIGN_ONLY, VIEW_ONLY, PARTY_ASSIGNER
isPlaceholder (optional, default=false)
Value can be either true or false
Use this field to initiate the party is a placeholder.
Note:
1. firstName, lastName, emailId parameter's value must be blank of this party.
2. To add the placeholder, one recipient must be requred with 'PARTY_ASSIGNER' permission.
partyRole
(optional)
Use this field to assign a role of placeholder.
Note: This parameter is only applicable when the party is a placeholder.
workflowSequence
Use this field to assign a workflow sequence number to a recipient in the list of recipient parties.
If the document is signed in sequence, the recipient party will receive the folder invitation notification as per the workflow sequence number.
Note: Workflow sequence should be starting with 1 like 1,2,3,4, etc. Any gap in workflow sequence like 1,2,4 is not a valid case.
If a single person appears multiple times in the signing workflow, please assign a different workflowSequence each time the recipient is repeated.
sequence
Use this field to assign a sequence number to a recipient in the list of recipient parties.
Use unique sequence numbers for each party starting with 1 like 1,2,3,4....
If a single person appears multiple times in the signing workflow, please assign a different sequence each time the recipient is repeated.
dialingCode
Use this field to assign a country dial-in codes are mobile number prefixes to a recipient in the list of recipient parties.
mobileNumber
Use this field to assign a mobile number to a recipient in the list of recipient parties.
signerAuthLevel
This parameter should be NO, SMS LINK, Email Access Code, User-defined Access Code, SMS Access Code and Voice Access Code.
The company should be enabled the below features for the below authentication level.
Features
Authentication Level
Authentication via SMS
SMS LINK
Authentication Via Email
Email Access Code
2FA Via Authy
SMS Access Code
2FA Via Authy
Voice Access Code
User-defined Access Code
User-defined Access Code
Note: A dialing code and mobile number must be required for the SMS Access Code and Voice Access Code authentication level.
Access code must be required for the User-defined Access Code authentication level.
userDefinedAccessCode
Codes are not case sensitive
System does not send this code so you must share this code with the signer directly
Access code can contain alphabets, numbers and the following special characters:
@,&,{,},%,(,),~,|,!,+,^
allowNameChange
Value can be either true or false
Use this parameter for allowing signer to update first and last name before completing the signing process.
Note: Please make sure the "Update Name Change"option is enabled from company settings.
partyIsEmailGroup
Value can be either true or false
Use this parameter for creating party as bulk.
Note:If this parameter is true, firstName, lastName and emailId of this party will be ignored.
emailGroupId
Pass email group id you want to use to create bulk
allowSingleSignerInBulk
Value can be either true or false
Use this parameter to allow only one person to sign in email group.
hostEmailId
Use this parameter to pass the email id of in-person administrator.
fields (optional)
A list of different fields to be added to the document(s).
senderEmail (optional)
You can enter email of another user in your account which will be used for sending this document(s) folder to the recipient parties.
signerInstructionId (optional)
If you want to use the signer instructions other than the default signer instructions, then pass that particular signer instruction id like "signerInstructionId":1.
confirmationInstructionId (optional)
If you want to use the confirmation text other than the default confirmation text, then pass that particular confirmation instruction id like "confirmationInstructionId":2.
signerInstructionCustomFields (required if signerInstructionId is not 0)
A list of signer instruction fields details you're sending the folder to. Every field must contain tag, type, value fields.
Parameter
Description
tag (required)
Signer Instruction custom field name
type (required)
type can be plain
value (required)
Signer Instruction custom field value (Note:- use HTML tag <br> for line break)
confirmationInstructionCustomFields (required if confirmationInstructionId is not 0)
A list of confirmation instruction fields details you're sending the folder to. Every field must contain tag, type, value fields.
Parameter
Description
tag (required)
Confirmation Text custom field name
type (required)
type can be plain
value (required)
Confirmation Text custom field value (Note:- use HTML tag <br> for line break)
Value can be either true or false
Hide field names for Recipients for Data Entry Fields and Advanced Fields.(Except Radio button, Checkbox, Image and Hyperlink).
hideCheckboxBorder (optional, default=false)
Value can be either true or false
Borders of Checkbox will be hidden in the executed documents.
var webAddr = "https://{{HOST_NAME}}/api/folders/cancelFolder";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr);
httpWebRequest.ContentType = "application/json; charset=utf-8";
httpWebRequest.Method = "POST";
httpWebRequest.Headers.Add("Authorization", "Bearer " + ACCESS_TOKEN);
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = @"{""folderId"":"+ FOLDERIDTOSENDREMINDER+ ",""reason_for_cancellation":+[REASON]"}";
streamWriter.Write(json);
streamWriter.Flush();
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
String apiURL = "https://{{HOST_NAME}}/api/folders/cancelFolder/";
URL url= new URL(apiURL);
HttpURLConnection httpConn= (HttpURLConnection) url.openConnection();
httpConn.setDoOutput(true);
httpConn.setRequestProperty("Content-Type", "application/json");
httpConn.setRequestProperty("Authorization","Bearer ACCESS_TOKEN");
String urlParameters="{\"folderId\":[FOLDER_ID],\"reason_for_cancellation\":"[REASON]"}";
DataOutputStream wr = new DataOutputStream(httpConn.getOutputStream());
wr.writeBytes(urlParameters);
if (httpConn.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new RuntimeException("Failed : HTTP error code : "+ httpConn.getResponseCode());
}
BufferedReader br = new BufferedReader(new InputStreamReader(
(httpConn.getInputStream())));
String output;
System.out.println("Output from Server .... \n");
while ((output = br.readLine()) != null) {
System.out.println(output);
}
httpConn.disconnect();
Create embedded signing view
When embedded signing view is enabled, you can show a document within your application.
The embedded signing view URL obtained via embeddedSessionURL will look like the following:
https://{{HOST_NAME}}/embedded/embeddedsign?eetid={URL-ENCODED EMBEDDED-TOKEN}
You can embed Foxit eSign in your application using iFrame like
<div style="height: 100%; width: 100%; overflow: auto;" data-role="content">
<iframe id="esignIframe" src="[EMBED_SESSION_URL]" style="width: 99% !important;height: 99% !important;position: absolute;" frameborder="0"></iframe>
</div>
You can style the outer div element as per your application look and feel.
Note: For better experience include
<script type="text/javascript" src="https://{{HOST_NAME}}/js/esignGeniePostMessageParent.js"></script>
and iframe id esignIframe.
In the iframe, you will see the document which the User needs to sign.
Once the user successfully eSign, They will be redirected to the application success URL which you submitted in the request.
Foxit eSign adds the following two more parameters to the original success URL:
Parameter
Description
folderId
This is the id of the folder that was signed by the party in the embedded session. You can use this id to query our API further to download the document PDF, etc.
event
Its value is signing_success, if the user successfully signs the document.
Or signing_declined, if the user declines to sign the document.
Create embedded sending view
When embedded sending view is enabled, you can prepare a document within your application where you can drag and drop various fields on your document.
The embedded sending view URL obtained via embeddedSessionURL will look like the following:
https://{{HOST_NAME}}/embedded/embeddedsend?eetid={URL-ENCODED EMBEDDED-TOKEN}
You can embed Foxit eSign in your application using iFrame like
<div style="height: 100%; width: 100%; overflow: auto;" data-role="content">
<iframe src="[EMBED_SESSION_URL]" style="width: 99% !important;height: 99% !important;position: absolute;" frameborder="0"></iframe>
</div>
You can style the outer div element as per your application look and feel.
In the iframe, you will see the document which the User needs to sign.
Once the user successfully sends the folder, he/she will be redirected to the application success URL which you submitted in the request.
Foxit eSign adds the following two more parameters to the original success URL:
Parameter
Description
folderId
This is the id of the folder that was sent by the party in the embedded session. You can use this id to query our API further to get the document status, etc.
event
Its value is sending_success, if the user successfully sends the document.
Update Envelope Fields
You can update the envelope and the custom fields (custom_field1 and custom_field2) anytime before execution using the 'Update Envelope Fields' API. Envelope fields for a party can only be updated if that party has not yet signed the document.
/folders/updateEnvelopeFields
application/json
Request
{
"folderId":FOLDER_ID,
"custom_field1":{
"name":"NAME",
"value":"VALUE"
},
"custom_field2":{
"name":"NAME",
"value":"VALUE"
},
"fields": {
"FIELD1_NAME":"VALUE",
"FIELD2_NAME":"VALUE",
If formula field
"FORMULA_FIELD_NAME":"Updated_Formula"
If image field
"IMAGE_FIELD_NAME":{
"inputType":"url or base64",
"imageName":"logo.png",
"source": "URL or BASE64 String"
},
....
}
}
You can change the first name, last name, and email if the recipient party has not signed on a shared or partially signed document using the 'Update Folder Recipients' API. Recipients can be changed only in the draft status folder.
Value can be either true or false
Validate the email address of the parties.
parties
A list of recipient parties you want update/change. Every entry must contain action, sequence, firstName, and lastName fields.
action
This is a mandatory parameter. Value can be either update or change Note: 'update' value can be used for Draft, Shared, Partially Signed folders. 'change' value can be used only in the Draft status folders.
sequence
The sequence number of the recipient in the list of recipient parties you want to update/change.
firstName
First name of the recipient you want to update/change.
lastName
Last name of the recipient you want to update/change.
emailId
Email id of the recipient you want to update/change.
Note: This parameter is mandatory if the action value is 'change'.
dialingCode(optional)
Use this field to assign a country dial-in codes are mobile number prefixes to a recipient in the list of recipient parties.
mobileNumber(optional)
Use this field to assign a mobile number to a recipient in the list of recipient parties.
Folder id you want to use to regenerate the expired folder embedded signing token for this folder. You can determine the folder id from the folder URL.
https://{{HOST_NAME}}/documents/viewfolderforsigning?folder.envelopeId=2520579
emailId (required)
The recipient email id you want to use to regenerate the expired folder embedded signing token for this folder.
The recipient party exists in this folder.
partyId (required if emailId is not provided)
Recipient party id you want to use to regenerate the expired folder embedded signing token for this folder.
The recipient party exist in this folder.
sessionExpire (optional, default=false)
Value can be either true or false
Use this field to initiate the expire of the embedded signing session.
expiry (required if sessionExpire is true)
Use this field to enter the time duration in milliseconds of the expiry on the embedded signing session.
var webAddr = "https://{{HOST_NAME}}/api/folders/myfolder?folderId=" + FOLDERID;
var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr);
httpWebRequest.Method = "GET";
httpWebRequest.Headers.Add("Authorization", "Bearer " + ACCESS_TOKEN);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
int fid= ENTER_YOUR_FOLDER_ID;
URL url= new URL("https://{{HOST_NAME}}.esignenie.com/api/folders/myfolder?folderId="+fid);
HttpURLConnection con= (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Authorization","Bearer ACCESS_TOKEN");
if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new RuntimeException("Failed : HTTP error code : "+ con.getResponseCode());
}
BufferedReader br = new BufferedReader(new InputStreamReader(
(con.getInputStream())));
String output;
System.out.println("Output from Server .... \n");
while ((output = br.readLine()) != null) {
System.out.println(output);
}
con.disconnect();
Get FolderIds by the folder status. The status parameter can have any of the following values: EXECUTED,SHARED,DRAFT, PARTIALLY SIGNED, CANCELLED, EXPIRED and DELETED.
Note: If you don't pass this parameter, then by default, get all type folder status.
dateFrom (required)
Start of the folder Creation Date range. By default set as YYYY-MM-DD
dateTo (required)
End of the folder Creation Date range. By default set as YYYY-MM-DD
Note:dateTo value should be under the 6 months from dateFrom value.
RESPONSE
{
"result": "success",
"message": "The total envelope id is: 2",
"allFolderIds": [
53940,
53945
]
}
var webAddr = "https://{{HOST_NAME}}/api/folders/getAllFolderIdsByStatus?status=SHARED&dateFrom=2021-08-15&dateTo=2021-12-14";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr);
httpWebRequest.Method = "GET";
httpWebRequest.Headers.Add("Authorization", "Bearer " + ACCESS_TOKEN);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
int fid= ENTER_YOUR_FOLDER_ID;
URL url= new URL("https://{{HOST_NAME}}.esignenie.com/api/folders/getAllFolderIdsByStatus?status=SHARED&dateFrom=2021-08-15&dateTo=2021-12-14");
HttpURLConnection con= (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Authorization","Bearer ACCESS_TOKEN");
if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new RuntimeException("Failed : HTTP error code : "+ con.getResponseCode());
}
BufferedReader br = new BufferedReader(new InputStreamReader(
(con.getInputStream())));
String output;
System.out.println("Output from Server .... \n");
while ((output = br.readLine()) != null) {
System.out.println(output);
}
con.disconnect();
var webAddr = "https://{{HOST_NAME}}/api/folders/viewActivityHistory?folderId=" + FOLDERID;
var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr);
httpWebRequest.Method = "GET";
httpWebRequest.Headers.Add("Authorization", "Bearer " + ACCESS_TOKEN);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
int fid= ENTER_YOUR_FOLDER_ID;
URL url= new URL("https://{{HOST_NAME}}.esignenie.com/api/folders/viewActivityHistory?folderId="+fid);
HttpURLConnection con= (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Authorization","Bearer ACCESS_TOKEN");
if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new RuntimeException("Failed : HTTP error code : "+ con.getResponseCode());
}
BufferedReader br = new BufferedReader(new InputStreamReader(
(con.getInputStream())));
String output;
System.out.println("Output from Server .... \n");
while ((output = br.readLine()) != null) {
System.out.println(output);
}
con.disconnect();
Download All Documents in Folder
You can download executed folder document(s) and signature certificate in a zip file.
/folders/download?folderId={FOLDER_ID}
Request Parameters
folderId
Your FOLDER_ID
Response
Returns ZIP file binary stream of all the documents in the folder with the signature certificate
var webAddr = "https://{{HOST_NAME}}/api/folders/document/download?folderId=" + FOLDER_ID + "&docNumber=1&access_token=" + ACCESS_TOKEN;
using (var client = new WebClient())
{
client.DownloadFile(webAddr,"FILE_PATH");
}
int fid= ENTER_FOLDER_ID;
String fileURL = "https://{{HOST_NAME}}/api/folders/document/download?folderId="+fid+"&docNumber=1";
String saveDir = "D:\\test\\";
URL url= new URL(fileURL);
HttpURLConnection httpConn= (HttpURLConnection) url.openConnection();
List<String> response = new ArrayList<String>();
httpConn.setRequestProperty("Authorization","Bearer ACCESS_TOKEN");
int responseCode = httpConn.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
String contentType = httpConn.getContentType();
if(contentType.equals("application/json")) {
BufferedReader reader = new BufferedReader(new InputStreamReader(
httpConn.getInputStream()));
String line = null;
while ((line = reader.readLine()) != null) {
response.add(line);
}
reader.close();
httpConn.disconnect();
}
else {
String fileName = "";
String disposition = httpConn.getHeaderField("Content-Disposition");
int contentLength = httpConn.getContentLength();
if (disposition != null) {
// extracts file name from header field
int index = disposition.indexOf("filename=");
if (index > 0) {
fileName = disposition.substring(index + 10,
disposition.length() - 1);
}
} else {
// extracts file name from URL
fileName = fileURL.substring(fileURL.lastIndexOf("/") + 1,
fileURL.length());
}
System.out.println("Content-Type = " + contentType);
// opens input stream from the HTTP connection
InputStream inputStream = httpConn.getInputStream();
String saveFilePath = saveDir + File.separator + "abc1.pdf";//fileName;
// opens an output stream to save into file
FileOutputStream outputStream = new FileOutputStream(saveFilePath);
int bytesRead = -1;
byte[] buffer = new byte[BUFFER_SIZE];
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
outputStream.close();
inputStream.close();
System.out.println("File downloaded");
}
}
else {
System.out.println("No file to download. Server replied HTTP code: " + responseCode);
BufferedReader reader = new BufferedReader(new InputStreamReader(
httpConn.getErrorStream()));
String line = null;
while ((line = reader.readLine()) != null) {
response.add(line);
}
reader.close();
httpConn.disconnect();
}
Move your document(s) folders to recycle bin
Using Foxit eSign API, you can move your document(s) folders to recycle bin. Documents in recycle bin are permanently removed from Foxit eSign systems automatically after 14 days.
/folders/movetorecyclebin application/json
REQUEST
{
"folderIds":[219]
}
Parameter
Description
folderIds
An array of folder IDs that you want to move to recycle bin
var webAddr = "https://{{HOST_NAME}}/api/folders/deletedLog?folderId=" + FOLDERID;
var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr);
httpWebRequest.Method = "GET";
httpWebRequest.Headers.Add("Authorization", "Bearer " + ACCESS_TOKEN);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
int fid= ENTER_YOUR_FOLDER_ID;
URL url= new URL("https://{{HOST_NAME}}.esignenie.com/api/folders/deletedLog?folderId="+fid);
HttpURLConnection con= (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Authorization","Bearer ACCESS_TOKEN");
if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new RuntimeException("Failed : HTTP error code : "+ con.getResponseCode());
}
BufferedReader br = new BufferedReader(new InputStreamReader(
(con.getInputStream())));
String output;
System.out.println("Output from Server .... \n");
while ((output = br.readLine()) != null) {
System.out.println(output);
}
con.disconnect();
Templates API
Create a template from PDF file
With Foxit eSign API, you can create a template by uploading a PDF document from your own application.
To create a template from a PDF file, you can either provide publicly accessible URLs to PDF documents
or pass PDF documents as multipart form data with the number of recipient parties, etc.
While creating the template from a PDF file, you can define various fields like a text field or signature field within the PDF document using simple Text Tags.
You can assign various properties for these fields, like the party responsible for filling the data etc.
These Text Tags will then be converted to Foxit eSign template fillable fields.
Or, if you don't want to use predefined Text Fields within the PDF document, then you can also request to create an embedded template preparation session where you can manually drag and drop each field on the template itself without leaving your application.
Preparing PDF documents with text tags to upload as a template
To create a PDF document from your application to create a template, you need to define the signature and other Foxit eSign
fields in the documents, and who is allowed to fill in the data. Foxit eSign supports simple Text Tags.
A Text Tag is a simple text block within your PDF document which defines the field type, the party who is responsible for it, and other field specific options.
Quick Tip:
When you apply Text Tags to the document, Foxit eSign does not remove or replace the Text Tags text.
You can hide codified Text Tags by using the same font color as the background of the document.
So the Text Tags can be used by Foxit eSign processes and will not be visible on the template.
Field Type: One of 'textfield', 'signfield', 'initialfield', 'datefield', 'checkboxfield', 'attachmentfield', 'imagefield', 'accept', 'decline' or short notations.
Party Number (optional): the sequence number of the recipient party from the parties list which will be responsible for filling this field.
Note: The values of the party number should be less than 20. and add the total parties in your template, which is the maximum party number value in all Text Tag.
Required/Optional Field: 'y' makes the field mandatory to be filled before signing while 'n' makes it optional.
Field Name: Optional. Assign a name to this field. Assigning names to fields is a good practice for better productivity as
named fields are downloaded in the document form the data report and all the same named fields in a document will automatically take up the value typed once in any one of those fields.
Please note not to include any space character for the name of the field (or anywhere else in the Text Tag) as it will then not recognize that word as a proper Text Tag syntax,
instead you can use underscore which will then be replaced with a space character in the final Foxit eSign field.
Underscores: Optional. A way to increase the field's width.
There are other options that you can add before underscores for various other properties as follows:
Sizing
By default, the new field has the same width and height as the original text tag, however it can be overridden by adding custom width as 90 and height as 20 (in pixels):
${textfield:1:y:field_name:90:20}
Validation
You also can validate information for text fields inside the tags. For example, the max number of characters required are 12 and only Numbers:
${textfield:1:y:field_name:90:20:12:Numbers}
And if you want to stick to the default height and width for the new field (which is the height and width of the text tag)
${textfield:1:y:field_name:::12:Numbers}
NOTE: validation inputs are currently only available for textfields
Font Style
You can also control the font style for each new field via their text tags. For example, the following tag creates a textfield with 14 font size and gray as the font color
You can pass pre-filled value to the textfields via its text tags as shown below. Please make to replace any space character with '_' (underscore) else the system may not recognize that text tag.
NOTE: pre-filled values are currently only available for textfields
Mark as Dependent Field
You can make a field dependent on any other field value. To set a field dependent on another field, select the values of the independent field that will enable the signer to see the dependent field.
Name of the parent field.
NOTE: Only the following type of fields are allowed as the parent or independent field: textfields|textbox|checkbox|radiobutton|dropdown
value_of_parent_field
Value of the parent field.
NOTE: In the case of radio button and checkbox, the value can be either checked or unchecked
options (optional)
In the case of textfield, the value can be either isblank or allowNull or contains
The full list of Field Types is:
TextField - textfield or t (short notation)
TextBox - textboxfield or tb (short notation)
FormulaField - formulafield or ff
Signature - signfield or s
Initial - initialfield or i
Date - datefield or d
Checkbox - checkboxfield or c (recommended)
Radio Button - radiobuttonfield or rb (recommended)
Secured Field - securedfield or sc
Attachment Field - attachmentfield or a
Image Field - imagefield or img
Signer Name Field - textfield or t
Date Signed - datefield or d
Accept Button - accept or ab
Decline Button - decline or db
PayField - payfield or pf
Examples
${textfield:1:y:client_name:________} - A mandatory textfield which is assigned to party number 1 with field name as 'client name'.
${tb:1:n:________________} - An optional textbox assinged to party 1.
${signfield:1:y:____} - A mandatory signature field assigned to party number 1.
${i:2:n} - An optional initial field assigned to party number 2.
${datefield:2:n::____} - An optional date field assigned to party number 2 with empty field name.
${c:2:y:male:gender:::multicheck} - A checkbox assigned to party number 2 with initial value as checked with name 'male' and group 'gender' with multiple check option enable to same group checkbox.
${c:1:y:yes:group-y} - A checkbox assigned to party number 1 with initial value as checked with name 'yes' and group 'group'. 'group-y' means group mandatory.
${rb:1:n:yes:grp1} - An un-selected radio button assigned to party 1 with the name yes and grp 'grp1'.
${rb:1:y:no:group2-y} - A radio button assigned to party number 1 with initial value as checked with the name 'no' and group 'group2'. 'group2-y' means group mandatory.
${sc:2:n:Credit_Card_Number:4:____} - A secured field assigned to party 2, which is optional with the name 'Credit Card Number' and only the last 4 characters to remain unmasked.
${attachmentfield:1:y:____} - A mandatory attachment field assigned to party number 1.
${img:1:n:stamp_image:120:50:__} - An optional image field is field name 'stamp image' with 120-pixel width and 50-pixels height, assigned to party number 1.
${textfield:1:y:Signer_Name:________} - A mandatory signer name field which is assigned to party number 1 with field name as 'Signer_Name'. This field is auto-populated once the document is opened by the signer.
${datefield:1:y:Date_Signed:_______} - A mandatory date signed field assigned to party number 1 with field name as 'Date_Signed'. This field will auto populate once the document is opened by the signer.
${accept:1:90:20} - A accept button field with 90-pixel width and 20-pixel height assigned to party number 1.
${decline:1:90:20} - A decline button field with 90-pixel width and 20-pixel height assigned to party number 1.
${payfield:1:paymentType:payeeOptions:productAndService:paymentDescription:paymentAmount} - Tag consolidates Payment Type, Product/Service, Payment Description, and Payment Amount to utilize the payment field.
Personalized Fields:We can use the personalized field tag while sending it via API in place of process tags. Personalized field creation instructions can be seen in the help center.
Examples
${field_7:1}Using this format, you can simply use the existing personalized field name and properties assigned to party #1.
${field_15:1:y:field_name:90:20} Using this format, you can simply use the existing personalized field name
Here is a PDF file with some other Text Tag samples: Sample Document.
Preparing PDF documents with Recipient Party Tags
To send a PDF document from your application for signature, you can either define the recipient parties in the documents itself or send the recipients information via API call. Foxit eSign supports simple Text Tags for recipient party information. In case both API call and Tags on the PDF are provided with Recipient Party information, Foxit eSign will use API call values.
A Recipient Party Tag is a simple text block within your PDF document that defines the party, who is responsible for filling the fields.
Quick Tip:
When you apply Recipient Party tags to the document, Foxit eSign does not remove or replace the Recipient Party Tags text. You can hide codified Recipient Party Tags by using the same font color as the background of the document, so the Recipient Party tags will be used by Foxit eSign to derive signers. Still, the tags will not be visible on the document.
Tag Type: Accepts only value as rp, which is an identifier of recipient party tags.
Party First Name: First name of the recipient party.
Party Last Name: Last name of the recipient party.
Party email: Email of the recipient party.
Party permission: Use this field to assign folder permissions to a recipient. It can be any one of the following values: FILL_FIELDS_AND_SIGN, FILL_FIELDS_ONLY, SIGN_ONLY, VIEW_ONLY
Party workflow sequence: If the document is signed in sequence, the recipient party will receive the notification as per the workflow sequence number. It should be starting with 1 like 1,2,3,4, etc.
Party sequence: Assign a sequence number to a recipient in the list of recipient parties. Use unique sequence numbers or party numbers for each party, starting with 1 like 1,2,3,4, etc.
Adding Fields on Template via API
Fields can also be added on the templates via an array of JSON objects in the input data for the API request.
This way of adding fields gives you more control over the size of fields, their font color and font size, etc.
While adding the fields on each document page, the position of the fields is relative to the top left corner of that page.
Each field object must contain the following values:
NOTE: If one of these values is missing field may disappear.
type - (string) the type of field to be added at this place. Can be one of these values: text|signature|initial|textbox|date|secure|checkbox|radiobutton|dropdown|attachment|image|accept|decline
x - (int) the x location coordinate of the top left corner of the field in pixels
y - (int) the y location coordinate of the top left corner of the field in pixels
width - (int) the width of the field in pixel
height - (int) the height of the field in pixel
pageNumber - (int) page in the document where field needs to be added
There are other parameters which can be optional and different for different field types.
text or textbox type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
value - (string)
required - (boolean) value: either true or false
textAlignment - (string) value: left, center, or right
characterLimit - (int)
fontSize - (int)
fontColor (string) example: #0000FF for blue
validation (string) value: anyone from None(default) or Numbers or Letters or RegexValidation(in case of text type) or CanadianSin(Canadian SIN Number)
if the validation value is RegexValidation
customValidationType (string) value: anyone from Error(default) or Warning.
hideFieldNameForRecipients - (boolean) value: either true or false
formulafield type
party - (int) party index from the parties submitted in this request starting from 1
formulafieldName - (string)
formula - (string)
fontFamily - (string)
documentNumber - (int)
fontSize - (int)
fontColor (string) example: #0000FF for blue
x - (int) the x location coordinate of the top left corner of the field in pixels
y - (int) the y location coordinate of the top left corner of the field in pixels
width - (int) the width of the field in pixel
height - (int) the height of the field in pixel
pageNumber - (int) page in the document where field needs to be added
tabOrder - (int)
decimalPlaces - (int)
payfield type
payeeOptions - (string) Specify payment methods for the payee to choose from any of the following options:["CardPayment"] or ["AchBankPayment"] or ["CardPayment", "AchBankPayment"]
paymentType - (string) Determines payment amount type: "Fixed" or "Payee decides". Note: "Payee_decides" in case of text tag.
paymentAmount - (string) Required for 'Fixed' payment type, must be an integer or have up to two decimal places
paymentDescription - (string) Description of the payment (Character limit: 250)
productAndService (string) Name of the product or service (Character limit: 75)
documentNumber - (int)
pageNumber - (int) page in the document where field needs to be added
x - (int) the x location coordinate of the top left corner of the field in pixels
y - (int) the y location coordinate of the top left corner of the field in pixels
tabOrder - (int)
width - (int) the width of the field in pixel
height - (int) the height of the field in pixel
party - (int) party index from the parties submitted in this request starting from 1
Note: 1. The Payment field is available exclusively in the US region and initially supports payments only in USD. 2. The Super Admin must create a merchant account to use the Payment field.
signature or initial type
party - (int)
required - (boolean) value: either true or false
date type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
value - (string)
required - (boolean) value: either true or false
textAlignment - (string) value: left, center, or right
fontSize - (int)
fontColor (string) example: #0000FF for blue
dateFormat (string) example: MM-DD-YYYY for 01-31-2017
hideFieldNameForRecipients - (boolean) value: either true or false
secure type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
value - (string)
required - (boolean) value: either true or false
fontSize - (int)
fontColor (string) example: #0000FF for blue
charToDisplay (int)
hideFieldNameForRecipients - (boolean) value: either true or false
checkbox type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
group - (string)
required - (boolean) value: either true or false
multicheck - (boolean) value: either true or false
hideCheckboxBorder - (boolean) value: either true or false
dropdown type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
value - (string)
required - (boolean) value: either true or false
fontSize - (int)
fontColor (string) example: #0000FF for blue
options (array of strings)
hideFieldNameForRecipients - (boolean) value: either true or false
attachment type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
required - (boolean) value: either true or false
hideFieldNameForRecipients - (boolean) value: either true or false
image type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
required - (boolean) value: either true or false
signer name type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
required - (boolean) value: either true or false
fontSize - (int)
fontColor (string) example: #0000FF for blue
readOnly - (boolean) value: either true or false
systemField - (boolean) value: either true or false
date signed type
party - (int) party index from the parties submitted in this request starting from 1
name - (string)
tooltip - (string)
required - (boolean) value: either true or false
textAlignment - (string) value: left, center, or right
fontSize - (int)
fontColor (string) example: #0000FF for blue
dateFormat (string) example: MM-DD-YYYY for 04-30-2019
readOnly - (boolean) value: either true or false
systemField - (boolean) value: either true or false
accept or decline type
party - (int)
Creating the template
To create a template from PDF files, you must call /templates/createtemplate with the given parameters.
URL to the PDF template you are creating. It should be publicly accessible when you are creating the template.
base64FileString (required if inputType is base64)
An array of BASE64 to PDF templates you are creating. It should be publicly accessible when you are creating the template.
processTextTags (optional)
Value can be either true or false
Use this field to determine whether Foxit eSign should parse your documents for Text Tags to convert them into Foxit eSign fields.
processAcroFields (optional)
Value can be either true or false
Use this field to determine whether Foxit eSign should parse your documents for AcroFields to convert them into Foxit eSign fields.
numberOfParties (required)
Add the number of parties in your template.
Note: The values of this parameter should be less than 20.
parties
A list of parties you're adding to the template. Every entry must contain sequence field.
permission (optional)
Use this field to assign template permissions to a party. Can be any one of the following values: FILL_FIELDS_AND_SIGN, FILL_FIELDS_ONLY, SIGN_ONLY, VIEW_ONLY
partyRole
(optional)
Use this field to assign a role of the party.
sequence
Use this field to assign a sequence number to a party.
Use unique sequence numbers for each party starting with 1 like 1,2,3,4....
shareAll (required)
Default false
Value can be either true or false
Share this template with all users in your account.
authorEmail (optional)
You can enter the email of another user in your account which will be used as the author for this template.
themeColor (optional)
(required if createEmbeddedTemplateSession is true)
You can enter a css value for a color to match your website's look n feel when you embed Foxit eSign inside.
The top blue band of the embedded screen is then replaced with the color provided by you.
createEmbeddedTemplateSession
Default false
Value can be either true or false
If true then an embedded token will be generated in the response, for an embedded template session, where you can directly open the Foxit eSign template, preparing a view in your application for dragging and dropping various fields on your template.
redirectURL (optional)
(required if createEmbeddedTemplateSession is true)
Enter the absolute URL for the landing page on your website/application, which the user will be redirected to after clicking "save and close" in the embedded template view.
fixRecipientParties (optional, default=false)
Value can be either true or false
If true, then in the embedded template view, you won't be able to change the parties for the template, which are already added as a part of this API request.
Else if false, you will be able to change the parties in the embedded template view.
fields (optional)
A list of different fields to be added to the template.
hideMoreAction (optional, default=false)
If true, it will hide the "More Actions" button in the template session.
hideShareWithAll (optional, default=false)
If true, it will hide the "Share with All" option in the template session.
hideAddParty (optional, default=false)
If true, it will hide all add party's options in an embedded template session.
hideMeButton (optional, default=false)
If true, it will hide the "Me" button on Recipient Parties in an embedded template session.
hideOthersButton (optional, default=false)
If true, it will hide the "Others" button on Recipient Parties in an embedded template session.
Value can be either true or false
Hide field names for Recipients for Data Entry Fields and Advanced Fields.(Except Radio button, Checkbox, Image and Hyperlink).
hideCheckboxBorder (optional, default=false)
Value can be either true or false
Borders of Checkbox will be hidden in the executed documents.
You can also pass PDF documents as multipart form data instead of passing a publicly accessible URL.
In this case, pass the JSON as 'data' parameter and include the file as a multipart form parameter 'file'.
Make sure you use multipart/form-data as a content type for this call.
Sample Code (creating a template from multipart form data)
To create a folder of documents from templates, you need to make a call to /templates/createFolder with the following parameters and use template_id to specify the templates:
Name of the document(s) folder
If this value is not provided, then the document(s) folder name is kept same as the template(s) name(s).
templateIds (required)
An array of template IDs you want to use to create the documents for this folder. You can determine the template ID from the template URL.(https://{{HOST_NAME}}/templates/prepareimmutabletemplate?template.templateId={TEMPLATE_ID})
fields (optional)
You may pass of the field values used in the templates to prefill them in the documents created from the template.
FIELD_NAME is the name of the field used in the template. FIELD_VALUE is the document field value.
Custom Fields (optional) Two custom fields custom_field1 and custom_field2
Parameter
Description
name
Name of the custom field
value
Value of the custom field
Custom fields can be used for many purposes such as identifying the application and module where the signed document belongs. You can use the custom fields as per your requirements. Maximum of two custom fields can be passed to Foxit eSign via API that are stored at the folder level. The webhook response includes these custom field.
folderPassword (Optional)
This password will be required by the signer/author in order to open the digitally signed document.
If the parameter is kept blank then no password will be required to open the digitally signed document.
Value can be either true or false
Validate the email address of the parties.
metadata (optional)
This should be in the key value pair. Maximum 1000 key value pairs are allowed.
parties (required)
A list of recipient parties you're sending the folder to. Every entry must contain firstName, lastName, emailId, permission and sequence fields.
permission
Use this field to assign folder permissions to a recipient. Can be any one of the following values: FILL_FIELDS_AND_SIGN, FILL_FIELDS_ONLY, SIGN_ONLY, VIEW_ONLY, PARTY_ASSIGNER
isPlaceholder (optional, default=false)
Value can be either true or false
Use this field to initiate the party as a placeholder.
Note:
1. firstName, lastName, emailId parameter's value must be blank of this party.
2. To add the placeholder, one recipient must be requred with 'PARTY_ASSIGNER' permission.
partyRole
(optional)
Use this field to assign a role of placeholder.
Note: This parameter is only applicable when the party is a placeholder.
workflowSequence
Use this field to assign a workflow sequence number to a recipient in the list of recipient parties.
If the document is signed in sequence, the recipient party will receive the folder invitation notification as per the workflow sequence number.
Note: Workflow sequence should be starting with 1 like 1,2,3,4, etc. Any gap in workflow sequence like 1,2,4 is not a valid case.
sequence
Use this field to assign a sequence number to a recipient in the list of recipient parties.
Use unique sequence numbers for each party starting with 1 like 1,2,3,4....
dialingCode
Use this field to assign a country dial-in codes are mobile number prefixes to a recipient in the list of recipient parties.
mobileNumber
Use this field to assign a mobile number to a recipient in the list of recipient parties.
signerAuthLevel
This parameter should be NO, SMS LINK, Email Access Code, User-defined Access Code, SMS Access Code and Voice Access Code.
The company should be enabled the below features for the below authentication level.
Features
Authentication Level
Authentication via SMS
SMS LINK
Authentication Via Email
Email Access Code
2FA Via Authy
SMS Access Code
2FA Via Authy
Voice Access Code
User-defined Access Code
User-defined Access Code
Note: A dialing code and mobile number must be required for the SMS Access Code and Voice Access Code authentication level.
Access code must be required for the User-defined Access Code authentication level.
userDefinedAccessCode
Codes are not case-sensitive
The system does not send this code so you must share this code with the signer directly
Access code can contain alphabets, numbers and the following special characters:
@,&,{,},%,(,),~,|,!,+,^
sessionExpire (optional, default=false)
Value can be either true or false
Use this field to initiate the expiration of the embedded signing session.
expiry (required if sessionExpire is true)
Use this field to enter the time duration in milliseconds of the expiry on the embedded signing session.
senderEmail (optional)
You can enter the email of another user in your account which will be used for sending this document(s) folder to the recipient parties.
signInSequence
(optional, default=false)
Value can be either true or false
Use this field to determine whether recipients will sign the folder in a sequence.
If false, then all the recipients receive the invitation email simultaneously. When true, then each recipient receives invitation email successively after previous recipient completes the required task, like signing the documents or filling fields, etc.
inPersonEnable Default false
Value can be either true or false
Use this field to initiate the in-person signing process which can be easily completed on any device in a matter of minutes and avoids email based signatures where required..
If false, then all the recipients receive the invitation email simultaneously. When true, then in-person administrator receives an invitation email to initiate the signing process for the signer.
sendNow Default true
Value can be either true or false
Use this field to send the folder to the recipient parties. Each party will then receive a unique link in their email to sign the document.
The invitation mail and subject in this case will be the same as the default invitation mail setup in your account.
signSuccessUrlAllParties Default false
Value can be either true or false
If true then folder will be redirected to after successfully signing the document on the absolute URL which URL is provided by the signSuccessUrl parameter
Note: This parameter is only applicable when the sendNow parameter is true and sent a folder invitation email.
createEmbeddedSendingSession Default false
Value can be either true or false
If true then an embedded token will be generated in the response,
for an embedded sending session, where you can directly open the Foxit eSign document preparing view in your application for dragging and dropping various fields on your document.
And also give a custom invitation message.
fixRecipientParties (required if createEmbeddedSendingSession is true)
Value can be either true or false
If true then in the embedded sending view you won't be able to change the parties for the folder which are already added as a part of this API request.
fixDocuments (required if createEmbeddedSendingSession is true)
Value can be either true or false
If true then in the embedded sending view you won't be able to change the documents for the folder which are already added as a part of this API request.
sendSuccessUrl (required if createEmbeddedSendingSession is true)
Enter the absolute URL for the landing page on your website/application,
which the user will be redirected to after successfully sending the folder in the embedded sending view.
sendErrorUrl (optional)
Enter the absolute URL for the landing page on your website/application,
which the user will be redirected to if error comes during sending the folder in the embedded sending view.
hideSendButton (optional, default=false)
Value can be either true or false
If true, it will hide the Send button in the embedded sending session.
Else if false, you will be able to send the folder.
enableStepByStep (optional, default=false)
To enable step by step action in the embedded sending session.
Value can be either true or false
If false, then all the recipients receive an email invitation to sign the folder.
Else if true then an embedded signing session will be generated in the response,
for the recipients whose emails will be given in the embeddedSignersEmailIds,
and those recipients will not receive any invitation email.
Also, if its value is true then either createEmbeddedSigningSessionForAllParties value should also be true
or embeddedSignersEmailIds should be non-empty
Value can be either true or false
If true, then an embedded signing session is created for all the recipients in the folder.
Else if false, then the embedded signing session is only created for those recipients whose email ids are given in
embeddedSignersEmailIds.
embeddedSignersEmailIds
(optional)
An array of email ids of recipients for whom an embedded signing session needs to be created.
The values must be email ids from the recipient parties added in the parties list.
signSuccessUrl
(optional,append ?parent=false if you want to redirect within the same iframe)
Enter the absolute URL for the landing page on your website/application, which the user will be redirected to after successfully signing the folder in the embedded signing view.
signDeclineUrl
(optional,append ?parent=false if you want to redirect within the same iframe)
Enter the absolute URL for the landing page on your website/application, which the user will be redirected to if he declines to sign the folder in the embedded signing view.
signLaterUrl (optional)
Enter the absolute URL for the landing page your website/application, which the user will be redirected to if he chooses to sign the folder later in the embedded signing view.
signErrorUrl (optional)
Enter the absolute URL for the landing page your website/application, which the user will be redirected to if error comes during signing the folder in the embedded signing view.
Value can be either true or false
If true, it will hide the Next Required Field button(top on the right side of the user interface) in an embedded signing session.
themeColor (optional)
You can enter a css value for a color to match your website's look n feel when you embed Foxit eSign inside. The top blue band of the signing screen is then replaced with the color provided by you.
hideDeclineToSign (optional, default=false)
If true, it will hide the option of "Decline to Sign" for the signer.
hideMoreAction (optional, default=false)
If true, it will hide the "More Actions" button in sending/signing session.
In case of "Send Now": true, it will not hide anything
hideAddPartiesOption (optional, default=false)
If true,
it will hide the option to add parties option in Draft and Template Creation mode.
hideSignerSelectOption (optional)
Value can be either true or false
If true, it will hide the "Existing Signer Name/Email" input box on Recipient Parties in an embedded sending session.
hideSignerActions (optional, default=false)
Value can be either true or false
If true, it will hide the signer "edit", "change" and "remove" actions on Recipient Parties in an embedded sending session.
hideSenderName (optional, default=false)
Value can be either true or false
If true, it will hide the sender name on Recipient Parties in an embedded sending session.
hideFolderName (optional, default=false)
Value can be either true or false
If true, it will hide the folder name on navigation in both embedded sessions.
hideDocumentsName (optional, default=false)
Value can be either true or false
If true, it will hide the document name in both embedded sessions.
hideAddMeButton (optional)
Value can be either true or false
If true, it will hide the "Add Me" button on Recipient Parties in an embedded sending session.
hideAddNewButton (optional)
Value can be either true or false
If true, it will hide the "Add New" button on Recipient Parties in an embedded sending session.
hideAddGroupButton (optional)
Value can be either true or false
If true, it will hide the "Add Group" button on Recipient Parties in an embedded sending session.
signerInstructionId (optional)
If you want to use the signer instructions other than the default signer instructions, then pass that particular signer instruction id like "signerInstructionId":1.
confirmationInstructionId (optional)
If you want to use the confirmation text other than the default confirmation text, then pass that particular confirmation instruction id like "confirmationInstructionId":2.
signerInstructionCustomFields (required if signerInstructionId is not 0)
A list of signer instruction fields details you're sending the folder to. Every field must contain tag, type, value fields.
Parameter
Description
tag (required)
Signer Instruction custom field name
type (required)
type can be plain
value (required)
Signer Instruction custom field value (Note:- use HTML tag <br> for line break)
confirmationInstructionCustomFields (required if confirmationInstructionId is not 0)
A list of confirmation instruction fields details you're sending the folder to. Every field must contain tag, type, value fields.
Parameter
Description
tag (required)
Confirmation Text custom field name
type (required)
type can be plain
value (required)
Confirmation Text custom field value (Note:- use HTML tag <br> for line break)
Value can be either true or false
If true, Foxit eSign will send the invitation email to each recipient to sign the document with the unique embedded signing session link for the recipient whose email is included in emailIdOfEmbeddedSigner.
Note: This parameter is ONLY applicable when both parameters sendNow and createEmbeddedSigningSession is true
The response contains the data for the folder thus created, and it will have the embedded session URL, which you can use to create an embedded signing view in your application if you request it by passing true in createEmbeddedSigningSession in the request
Get the list of all templates for your account
You can get a list of all the templates from your Foxit eSign into your application using the following call.
var webAddr = "https://{{HOST_NAME}}/api/templates/mytemplate?templateId=" + TEMPLATEID;
var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr);
httpWebRequest.Method = "GET";
httpWebRequest.Headers.Add("Authorization", "Bearer " + ACCESS_TOKEN);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
int Tid= Your_Template_Id;
String apiURL = "https://{{HOST_NAME}}/api/templates/mytemplate?templateId="+Tid;
URL url= new URL(apiURL);
HttpURLConnection httpConn= (HttpURLConnection) url.openConnection();
List<String> response = new ArrayList<String>();
httpConn.setRequestProperty("Authorization","Bearer ACCESS_TOKEN");
int responseCode = httpConn.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader reader = new BufferedReader(new InputStreamReader(
httpConn.getInputStream()));
String line = null;
while ((line = reader.readLine()) != null) {
response.add(line);
}
reader.close();
httpConn.disconnect();
}
Parties API
Get email group details
You can pool our API to get email group information.
You can pass no parameter in the request to get all email group details in your account.
The webhooks enable you to monitor changes in your document folders without polling the Foxit eSign platform.
Webhook is a URL handled by your application which will be called by Foxit eSign, based on certain events.
As Foxit eSign is calling your application, your application should be publicly accessible on the internet.
You can add your webhook to the Foxit eSign API Settings page. Also you can define the events that will cause Foxit eSign to call your webhook.
Eg, you can decide whether the webhook should be called when any party signs your folder, or only when the folder is finally executed.
Foxit eSign posts JSON data to your webhook. Every JSON payload posted contains event name (event_name), event date (event_date) and data related to that particular event (data)
Webhook Events
Event Name
Description
folder_sent
Foxit eSign calls your Webhook for this event whenever any document folder is sent out from your account for signature.
The data field in this case, consists of the folder (folder) field, which contains the data for the folder which was sent.
This webhook call is in real-time.
folder_viewed
Foxit eSign calls your Webhook for this event whenever any party first time opens your document folder which was sent out to them from your account.
The data field, in this case, consists of the folder (folder) field, which contains the data for the folder which was viewed,
and also a viewing_party field which contains the data for the party which viewed the document folder.
This webhook call is in real-time.
folder_signed
Foxit eSign calls your Webhook for this event whenever any party signs your document folder which was sent out to them from your account.
The data field, in this case, consists of the folder (folder) field, which contains the data for the folder which was signed,
and also a signing_party field which contains the data for the party which signed the document folder.
This webhook call is in real-time.
folder_cancelled
Foxit eSign calls your Webhook for this event whenever any party cancels or declines to sign your document folder which was sent out to them from your account.
The data field, in this case, consists of the folder (folder) field, which contains the data for the folder which was cancelled,
and also a cancelling_party field which contains the data for the party which canceled/declined to sign the document folder,
and a reason_for_cancelling field which includes the reason given for cancelling/declining to sign the document.
This webhook call is in real-time.
folder_completed
Foxit eSign calls your Webhook for this event whenever any document folder which was sent out from your account has been completed with all the required parties signatures.
The data field, in this case, consists of the folder (folder) field, which contains the data for the folder which was completed.
This webhook call is in real-time.
folder_executed
Foxit eSign calls your Webhook for this event whenever any document folder which was sent out from your account has been completed with all the required parties signatures.
The data field, in this case, consists of the folder (folder) field, which contains the data for the folder which was completed.
This webhook is invoked within 5-10 seconds after folder completion webhook as it waits for the digital signature on the completed document(s).
folder_deleted
Foxit eSign calls your Webhook for this event whenever any document folder from your account is deleted.
The data field, in this case, consists of the folder (folder) field, which contains the data for the folder which was deleted,
and also a deleting_party field which contains the data for the party which deleted the document folder.
This webhook call is in realtime.
It is recommended to use HTTPS for the webhook URLs at your application end to avoid any kind of tampering with your webhook request data.
Signature verification
You can enable extra security around your Webhooks by providing a Webhook Secret (in the API settings page, under the section of webhooks) which will allow Foxit eSign
to sign each of the webhook post requests with a signature using your Webhook Secret.
The signature is generated using an HMAC-SHA-256 base64 digest of the raw HTTP Body of the Webhook post using this Webhook secret.
Using your Webhook Secret, a signature is calculated and sent with each Webhook (as a query string parameter signature).
You can thus verify the contents of Webhook as being authentic and un-tampered.
This Signature is sent with each Webhook post as a query parameter signature in your URL.
For example, for the following URL you registered as a Webhook:
https://www.test.com/WebhookHandler
Foxit eSign will post to the following webhook URL:
You can thus verify the POST's contents by taking the same hash yourself and comparing with a signature you got in request.
IMPORTANT: Keep your Webhook secret safe with you as you would your password, since anyone with your Webhook secret
could generate Webhooks that pass the signature validation.
Webhook Channels API
Webhook Channel is a feature that allows users to create and send webhooks to new endpoints or channels. You can create any number of channels.
You can send document folder information to all the channels upon triggering of any of the events (folder sent, folder viewed, folder signed, folder canceled, folder executed, folder deleted).
Create Webhook Channel
To create a new channel via API, please make a call to /webhook/createwebhookchannel with the following parameters.
URL of Webhook call. It should be publicly accessible.
webhookSecret (optional)
If a value is provided here, then each webhook request will be signed with a signature generated by taking an HMAC-SHA-256 base64 digest of the raw HTTP Body of the Webhook post, using this Webhook secret.
webhookLevel (optional, default=API App)
Value can be either Account or API App
Access via Account (Web and API) or only API level
events (required)
folder_sent (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: This event applies only to the “Account” level of channel.
When a document folder is sent via the web and the webhook channel set as “Account” level, Foxit eSign calls your webhook URL with this event information.
folder_viewed (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When parties open this document folder via email or embeddedSession URL, Foxit eSign calls your Webhook with this event information.
folder_signed (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When party signs this document folder, Foxit eSign calls your Webhook with this event information.
folder_cancelled (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When the party canceled this document folder than Foxit eSign calls your Webhook with this event information.
folder_executed (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When all party signed this document folder, Foxit eSign calls your Webhook with this event information.
folder_deleted (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When party canceled this document folder, Foxit eSign calls your Webhook with this event information.
URL of Webhook call. It should be publicly accessible.
webhookSecret (optional)
If a value is provided here, then each webhook request will be signed with a signature generated by taking an HMAC-SHA-256 base64 digest of the raw HTTP Body of the Webhook post using this Webhook secret.
webhookLevel (optional, default=API App)
Value can be either Account or API App
Access via Account (Web and API) or only API level
events (optional)
folder_sent (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: This event only applies to the “Account” level of the channel.
When a document folder is sent via the web and the webhook channel set as “Account” level, Foxit eSign calls your webhook URL with this event information.
folder_viewed (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When party open this document folder via email or embeddedSession URL, Foxit eSign calls your Webhook with this event information.
folder_signed (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: : Foxit eSign calls your Webhook with this event information when the party signs this document folder.
folder_cancelled (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When party canceled this document folder, than Foxit eSign calls your Webhook with this event information.
folder_executed (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When all party signed this document folder, Foxit eSign calls your Webhook with this event information.
folder_deleted (optional, default=false)
Value can be either true or false
If true, then this event is enabled for this channel. If false, then this event is disabled.
Note: When the party cancels this document folder, Foxit eSign calls your Webhook with this event information.
To create a new account via API access_token is not required, instead the client_id and client_secret parameter are required to authenticate the API consumer
Your API Key from the API menu under the Settings Tab
client_secret
Your API Secret from the API menu under the Settings Tab
companyName (required)
Name of company account to be created in Foxit eSign
companyAddress (optional)
the address of the company location
firstName (required)
First name of the account user
lastName (required)
Last name of the account user
emailId (required)
Email address of account user
loginPassword (required)
The login password that the client will use to login in Foxit eSign
planName (default=Trial)
It can be one of the plan names
accountType (required)
Use partner-pay for partner managed type of accounts
partner_code (Optional)
Enter the unique partner code assigned to the partner to link this account with the specified partner
NOTE: If the accountType parameter value is partner-pay then this parameter must be required.
To create a new offline subscription account via API,
access_token is not required, instead the client_id, client_secret
and partner_code parameters are required to authenticate the API
consumer
Parameter
Description
client_id (required)
Your API Key from the API menu under the
Settings Tab
client_secret (required)
Your API Secret from the API menu under the
Settings Tab
partner_code (required)
Enter the unique partner code assigned to the partner to
link this account with the specified partner
Individual PDF & All eSign Plans
This API allows users to easily create individual subscriptions without accessing the Admin Console. This API lets users directly set up their subscriptions, streamlining the process.
The unique id is generated for the corresponding product
order_id (optional)
unique order number
firstName (required)
First name of the account owner
lastName (required)
Last name of the account owner
send_from_appstore (required)
Whether the user receives the mail of the subscription
service when the subscription is created. Value can be
either true or false
password (optional)
Use a combination of at least 8 characters in length, including upper and lower case characters, and at least one number.
Note: If the "send_from_appstore" parameter is false then a 'password' must be required.
need_cus_confirm (optional, default = 0)
if the value is 0,create and activate subscription now
if the value is 1,API response contains activation link that does not expire,
create and activate subscriptions when users click on the activation link.
country (optional, default = US)
User's country code. e.g: US
currency (optional, default = USD)
currency eg:USD
billing_cycle (optional, default monthly)
Value can be either yearly or monthly.
user_count (optional, default = 1)
The number of the license. eg: 1
envelope_numbers (optional)
Value according to the plan and user_count. eg: 20
template_numbers (optional)
Value according to the plan and user_count. eg: 5
price (optional)
Price value according to the plan. eg: 101
amount (optional)
The amount Value should be according to the plan and user count. eg: 101
next_plan_period_start (optional, default = according to the billing_cycle)
Value of the current plan expiration Date. eg: "2022-03-29"
orgName (optional)
Name of company account to be created in Foxit eSign.
orgCode (optional)
Please correct the statement under the orgid input text box
as below: The Organization ID is the unique identifier for
the organization in our system. Starts with a letter, only
accept letters (case sensitive) and numbers, 3 - 32 chars.
This API allows Enterprise/Team subscription plans to be created through the Admin Console, Allowing effortless control and access to advanced features.
if the value is 0,create and activate subscription now
if the value is 1, API response contains activation link that does not expire, create and activate subscriptions when users click on the activation link.
setup admin
Set up setup admin user
Liezi:"123@qq.com ; 222@qq.com"
If the owner wants to set up the setup admin role at the beginning, please add the owner email here
country (optional, default = US)
User's country. eg:US
company_name (optional)
Name of company account to be created in Foxit eSign.
order_id (optional)
Unique order id
next_plan_period_start (optional)
ex: 2023-06-20
trackingId (optional)
example: CloudBlue
external_id (optional)
example: "AS-9571-3418-5429"
Custom Fields (optional) Two custom
fields custom_field1 and custom_field2
Parameter
Description
name
Name of the custom field
value
Value of the custom field
partnerType (optional)
Represents the type of relationship a partner holds
billing_cycle (optional, default = monthly)
yearly or monthly
price (optional)
eg: 100
send_welcome_mail (optional, default = true)
send a welcome email for the new subscription account.
Value can be either true or false
amount (optional)
The amount Value should be according to the plan and user count. eg: 101
admin_console_id(optional)
The unique parameter id passes the value of admin_console_id
product (required)
Product Name
app_code
Foxit eSign Enterprise
foxit_sign
PDF Editor Pro + for Mac
pdfeditor_pro_plus_mac
PDF Editor Pro + for Win
pdfeditor_pro_plus_win
Foxit PDF Editor Suite Windows for Teams
pdf_editor_ps_business_win
Foxit PDF Editor Suite Mac for Teams
pdf_editor_ps_business_mac
Foxit PDF Editor Suite Pro for Teams
pdf_editor_ps_business_pro
Parameter
Description
id (optional)
The unique id corresponding to the product, used to
update subscriptions, suspend subscriptions, etc.
expire_date (optional)
Product expiration date, eg:"2022-03-29"
user_count (optional)
user count
envelope_numbers (optional)
Number of Envelopes: If the parameter
"user_count" is included in the interface field, the parameter
"envelope_numbers" indicates the number of each user; if the
parameter "user_count" is not included in the interface field,
the parameter "envelope_numbers" indicates the total number.
template_numbers (optional)
Number of Templates
product_price (optional)
Price value according to the plan. eg: 101
product_amount (optional)
The amount value should be according to the plan and user count. eg: 101
increase_license: increase subscription license number
decrease_license
decrease_license: decrease subscription license number
upgrade
upgrade: upgrade subscription
downgrade
downgrade: downgrade subscription
cancel
It will cancel the most recent downgrade, decrease the license, and cancel the automatic renewal request.
add_pooling_allowed
add_pooling_allowed : purchase of poolingAllowed value-added services
email (required)
The administrator's email address
subscription_items (required)
Parameter
Description
id (required)
In case of an admin console subscription:
If the parameter id passes the value of the admin consoleid, then it will update all product subscriptions managed by the admin console.
If the parameter id passes the value of productid, then it will update the particular product only.
In the case of non-admin console subscription:
Passing the parameter value of subscriptionid will update the particular subscription.
app_code (optional)
Product Name
app_code
Foxit eSign Enterprise
foxit_sign
PDF Editor Pro + for Mac
pdfeditor_pro_plus_mac
PDF Editor Pro + for Win
pdfeditor_pro_plus_win
Foxit eSign
foxit_sign_individual
Foxit eSign Pro
foxit_sign_pro_individual
Foxit PDF Editor Suite Windows for Individuals
pdf_editor_ps_individual_win
Foxit PDF Editor Suite Mac for Individuals
pdf_editor_ps_individual_mac
Foxit PDF Editor Suite Pro for Individuals
pdf_editor_ps_individual_pro
Foxit PDF Editor Suite Windows for Teams
pdf_editor_ps_business_win
Foxit PDF Editor Suite Mac for Teams
pdf_editor_ps_business_mac
Foxit PDF Editor Suite Pro for Teams
pdf_editor_ps_business_pro
Note: This parameter is only applicable when the action parameter value is upgrade or downgrade
billing_cycle (optional)
The value can be updated either yearly or monthly to update the subscription.
Note: This parameter is only applicable when the action parameter value is upgrade or downgrade
user_count (optional)
The number of the license. eg: 1
Note: This parameter is only applicable when the action parameter value is increase_license or decrease_license
envelope_numbers (optional)
Value according to the plan and user_count eg: 20
Note: This parameter is only applicable when the action parameter value is upgrade or downgrade
template_numbers (optional)
Value according to the plan and user_count eg:5
Note: This parameter is only applicable when the action parameter value is upgrade or downgrade
poolingAllowed (optional)
It should be Yes or No.
Note: This parameter is only applicable when the action parameter value is add_pooling_allowed
amount(optional)
Total amount for any modifications made during the billing cycle.
next_cycle_amount(optional)
The total sum for all subscribed licenses in the current billing cycle
To get subscription details, Using the Subscription ID. This API call will help retrieve all the essential information about the specific subscription.
If it is an admin console subscription, the parameter id needs to pass the value of admin_console_id
If it is a non-admin console subscription, the parameter id passes the value of id
To get subscription details using External ID, provide the specific External ID to the API, which will return the corresponding subscription information.
If the parameter id passes the value of the admin console id, then it will cancel the automatic renewal of all product subscriptions managed by the admin console.
If the parameter id passes the value of productid, then it will cancel the automatic renewal of the particular product only.
In the case of non-admin console subscription:
Passing the parameter value of subscriptionid will cancel the automatic renewal of the particular subscription.
If the parameter id passes the value of the admin console id, then it will enable the automatic renewal of all product subscriptions managed by the admin console.
If the parameter id passes the value of productid, then it will enable the automatic renewal of the particular product only.
In the case of non-admin console subscription:
Passing the parameter value of subscriptionid will enable the automatic renewal of the particular subscription.
order_id (optional)
Unique order ID is used to enable automatic renewal
The phrase "Cancel Subscription Immediately" refers to the action taken by a user to terminate their subscription before the expiration of the subscription period. This means that the user wishes to immediately end the current subscription service and no longer enjoy the services and benefits for the remaining subscription period, which may involve a partial refund.
Users have the option to renew their subscription ahead of the regular renewal date using the advanced subscription renewal feature. For example, if a user runs out of envelopes for their eSign service and wishes to continue using it, they can choose to invoke this API. By opting for advanced renewal, they can ensure a seamless continuation of the service without waiting for the subscription to expire and manually renewing it.
If the parameter id passes the value of the admin consoleid, then it will trigger the advance subscription renewal of all product subscriptions managed by the admin console.
If the parameter id passes the value of productid, then it will trigger the advance subscription renewal of the particular product only.
In the case of non-admin console subscription:
Passing the parameter value of subscriptionid will trigger the advance subscription renewal of the particular subscription.
order_id (optional)
Unique order ID is used for early subscription renewal
This API request resumes the subscription in the ongoing billing cycle if a chosen account cancels auto-renewal, ensuring the automatic resumption of the subscription.
If the parameter id passes the value of the admin consoleid, then it will resume subscription of all product subscriptions managed by the admin console.
If the parameter id passes the value of productid, then it will resume subscription of the particular product only.
In the case of non-admin console subscription:
Passing the parameter value of subscriptionid will resume subscription of the particular subscription.
Download data by folder status. The Status parameter can have any of the following values:
EXECUTED, SHARED, DRAFT, PARTIALLY SIGNED, CANCELLED, EXPIRED and DELETED.
creationDateFrom (optional)
Start of the Creation Date range.
creationDateTo (optional)
End of the Creation Date range.
folderName (optional)
Any folder which contains this string.
includeFields (optional, default=false)
Including folder fields in the report.
authorEmail (optional)
Author email in the report.
signerEmail (optional)
Signer email in the report.
Error Handling
If an error occurs during an API request, Foxit eSign will return an error in this response format.
Error Response Samples
{
"result": "error",
"error_description": "The first name of the party cannot be empty"
}
{
"result": "error",
"error_description": "Cannot add 1 more document(s) to your accounts max document limit of 5"
}
Change History
August 5, 2024
Added the Payment Field for templates, accessible through the UI, API, and text tags, available in the US region only. Click here for more details.
June 13, 2024
Added a Payment field with type and method options, currently available for the US region only. Requires a merchant account setup by Account Owner. Click here for more details.
March 06, 2024
Added a new parameter multicheck in checkbox tag to allow checking multiple checkboxes in the group. Click here for more details.
December 28, 2023
Introduced a new formula field in all Folders and Template APIs.
December 6, 2023
Added a new optional parameter metadatain create folder from template API.
November 1, 2023
Added a new parameter emailIdin generate access token API. Click here for more details.
June 27, 2023
Added two new parameters selfSign and selfSignerSuccessUrl in create folder API. Click here for more details.
January 08, 2023
Added 5 new APIs for User via channel(offline Foxit eSign) subscription. Click here for more details.
August 08, 2022
Added 6 new APIs for channel account subscription. Click here for more details.
December 15, 2021
Added a new API for get folderIds by folder Status and Date. Click here for more details.
December 8, 2021
Added two new parameters hideFieldNameForRecipients and hideCheckboxBorder in create folder, send draft folder, modify shared folder and create template APIs. Click here for more details.
November 01, 2021
Added one new optional parameter metadata in Create Folder API.
September 23, 2021
Added a new API for sending reminders for signatures. Click here for more details.
September 11, 2021
Added a new API for cancel folder by author or decline to sign by signers. Click here for more details.
July 29, 2021
Added a new API for getting a list of multiple templates data by template ids. Click here for more details.
July 15, 2021
Added base64 String while creating template.
Added a new parameter parties in create a template API.
July 07, 2021
Added one new optional parameter signerEmail in Download Report API.
July 02, 2021
Added 4 new parameters hideSignerActions, hideSenderName, hideFolderName and hideDocumentsName in JSON of embedded session details. Click here for more information.
June 30, 2021
We have added a new parameter allowAdvancedEmailValidation. Click here for more details.
June 25, 2021
Added new authentication level User-defined Access Code. Click here for more details.
May 24, 2021
Added one new optional parameter authorEmail in Download Report API.
February 19, 2021
Added update folder recipients API.
February 18, 2021
Added deleted folder history API.
February 17, 2021
Added folder history API.
Feb 15, 2021
We added two new parameters isPlaceholder and partyRole in JSON of parties details. Click here for more information.
Added a new party permission PARTY_ASSIGNER
Feb 12, 2021
Added base64 String while creating the document.
Added base64 and url in image field.
November 24, 2020
Added modify folder API.
November 23, 2020
Added the delete folder API (permanently from Foxit eSign).
November 12, 2020
Added two new parameters signerInstructionCustomFields and confirmationInstructionCustomFields in create folder JSON details. Click here for more information.
October 29, 2020
Added a new parameter signSuccessUrlAllParties in create folder JSON details. Click here for more information.
Added two new parameters signerInstructionId and confirmationInstructionId in create folder JSON details. Click here for more information.
October 23, 2020
The single signer can be added multiple times in a signing workflow as long as the sequence and the workflowSequence are unique each time the recipient is repeated.
October 19, 2020
Added a new parameter signerAuthLevel in JSON of parties details. Click here for more information.
September 24, 2020
We have updated two new parameters dialingCode and mobileNumber in the JSON of parties details. Click here for more information.
We have updated two new parameters sessionExpire and expiry in JSON of embedded signing session details. Click here for more information.
Added a new API to regenerate expired embedded signing session tokens. Click here for more details.
September 16, 2020
Added 3 new Parameters hideMeButton, hideOthersButton and hideExistingContactSelectOption in the JSON of embedded template session details. Click here for more information.
July 1, 2020
We have added a new field as "Image Field" in-text tags and JSON to create documents and templates. Click here for more details.
Added a new Parameter sendMailForPasswordReset to create new user JSON details.
June 16, 2020
Added two new parameters, "Accept" and "Decline" in text tags and JSON in creating documents. Click here for more details.
Added a new Parameter WorkflowSequence in the parties JSON details.
Added a new function in the Templates API section.
Oct 06, 2016
Added C# examples.
Oct 05, 2016
Added new Templates API section.
They replaced emailIdOfEmbeddedSigner with two new parameters createEmbeddedSigningSessionForAllParties and embeddedSignersEmailIds in the templates API and folders API, which allow generating embedded signing sessions for more than one party.
Note: All the older implementations which are using emailIdOfEmbeddedSigner will continue to work the same way without any issues, However we recommend to changing to the new parameters to handle broader category of use cases.