Getting Started

About Foxit eSign


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


  1. 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).
  2. Fill in the form to obtain your API Key and API Secret under your API settings.
    This is how your API information will display:
    developer account
Parameter Description
{{Host_Name}} for US Region na1.foxitesign.foxit.com
{{Host_Name}} for EU Region eu1.foxitesign.foxit.com

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:

  https://{{HOST_NAME}}/api/oauth2/access_token
  application/x-www-form-URLencoded


REQUEST
Parameter Description
grant_type This value should be client_credentials
client_id 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.

RESPONSE
{
	"access_token":"ACCESS_TOKEN",
	"token_type":"bearer",
	"expires_in":31536000
}
						

Sample Code
curl https://{{HOST_NAME}}/api/oauth2/access_token \
> -d "grant_type=client_credentials" \
> -d "client_id=CLIENT_ID" \
> -d "client_secret=CLIENT_SECRET" \
> -d "scope=read-write" \
> -H "Content-Type: application/x-www-form-urlencoded" \
> -X POST

						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/oauth2/access_token",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "grant_type=client_credentials&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&scope=read-write",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
var request = (HttpWebRequest)WebRequest.Create("https://{{HOST_NAME}}/api/oauth2/access_token");
var postData = "grant_type=client_credentials" + "&client_id=" + CLIENT_ID + "&client_secret=" + CLIENT_SECRET + "&scope=read-write";
var data = Encoding.ASCII.GetBytes(postData);

request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;

using (var stream = request.GetRequestStream())
            {
                stream.Write(data, 0, data.Length);
            }

var response = (HttpWebResponse)request.GetResponse();

using (var streamReader = new StreamReader(response.GetResponseStream()))
            {
                var responseString = streamReader.ReadToEnd();
            }

						
URL url= new URL("https://{{HOST_NAME}}/api/oauth2/access_token");
HttpURLConnection con= (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
con.setUseCaches(false);
con.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
String urlParameters = "grant_type=client_credentials&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&scope=read-write";
		
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(urlParameters);
	
	   
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();
						

Now you can make calls to the Foxit eSign API with this ACCESS_TOKEN. Please include ACCESS_TOKEN to request headers with every request as indicated.

Authorization: Bearer ACCESS_TOKEN

CURL
curl https://{{HOST_NAME}}/api/folders/createfolder \
> -i \
> -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
> -H "Content-Type: application/json"
...
						

Document(s) Folder API

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.

Responsive image

  1. Field Type: One of 'textfield', 'formulafield', 'signfield', 'initialfield', 'datefield', 'checkboxfield', 'attachmentfield', 'imagefield', 'accept', 'decline' or short notations.
  2. Party Number (optional): the sequence number of the recipient party from the parties list which will be responsible for filling this field.
  3. Required/Optional Field: 'y' makes the field mandatory to be filled before signing while 'n' makes it optional.
  4. 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.
  5. 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

${textfield:1:y:field_name:90:20:12:Numbers:14:gray}

Pre-Filled Value

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.

${textfield:1:y:field_name:90:20:12:Numbers:14:gray:default_value}
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.

${t:1:y:field_name:90:20:12:Numbers:14:gray:default_value:parent_field_name:value_of_parent_field:options}
Column Description
parent_field_name 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_fieldValue 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

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} - A checkbox assigned to party number 2 with initial value as checked with name 'male' and group 'gender'.
  • ${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.
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.

Responsive image

  1. Tag Type: Accepts only value as rp, which is an identifier of recipient party tags.
  2. Party First Name: First name of the recipient party.
  3. Party Last Name: Last name of the recipient party.
  4. Party email: Email of the recipient party.
  5. 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
  6. 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.
  7. 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.

  1. 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
  2. x - (int) the x location coordinate of the top left corner of the field in pixels
  3. y - (int) the y location coordinate of the top left corner of the field in pixels
  4. width - (int) the width of the field in the pixel
  5. height - (int) the height of the field in pixel
  6. documentNumber - (int) the document index in the document files array starting from 1
  7. 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)

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}) Responsive image
    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.

1. When using file URLs

/folders/createfolder
application/json

REQUEST
{
	"folderName":"Sample Documents",
	"fileUrls":[
		"URL_TO_DOCUMENT_1","URL_TO_DOCUMENT_2",...
	],
	"fileNames":[
		"document_1.pdf","document_2.pdf",...
	],
	"processTextTags":true,
	"processAcroFields":true,
	"signInSequence":false,
	"inPersonEnable":false,
	"custom_field1":{
  	"name":"NAME",
  	"value":"VALUE"
         },
    
      	"custom_field2":{
  	"name":"NAME",
  	"value":"VALUE"
         },    
	"sendNow":false,
	"signSuccessUrlAllParties":false,
	"emailTemplateId":2,
	"signerInstructionId":1,
	"confirmationInstructionId":2,
	"emailTemplateCustomFields":[
  	{
  		"tag":"CUSTOM_TAGS_1",
  		"type":"plain",
  		"value":"Please click on the View Document(s) link below to review and esign the documents as required."
  	},
  	{
  		"tag":"CUSTOM_TAGS_2",
  		"type":"hyperlink",
  		"value":"click here's",
  		"url":"HYPERTEXT_REFERENCE"
  	}
  	
  	
  	],
  	"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."
  	}
  	],
	"createEmbeddedSendingSession":false,
	"fixRecipientParties":true,
	"fixDocuments":true,	
	"hideSignerSelectOption":false,
	"enableStepByStep":false,
	"hideAddMeButton":false,
	"hideAddNewButton":true,
	"hideAddGroupButton":false,
	"hideSignerActions": false,
	"hideSenderName": true,
	"hideFolderName": false,
	"hideDocumentsName": true,
	"sendSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"sendErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"createEmbeddedSigningSession":true,
	"createEmbeddedSigningSessionForAllParties":false,
	"embeddedSignersEmailIds":["FIRST_EMBEDDED_SIGNER_EMAIL","SECOND_EMBEDDED_SIGNER_EMAIL"],
	"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"themeColor":"ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION",
	"sessionExpire":false,
	"expiry":300000,
	"allowSendNowAndEmbeddedSigningSession":false,
	"allowAdvancedEmailValidation":true,
	"metadata":{
	"DATA_KEY1":"DATA_VALUE1",
	"DATA_KEY2":"DATA_VALUE2",
	"DATA_KEY3":"DATA_VALUE3",
	"DATA_KEY4":"DATA_VALUE4",
	    ........
	}
	"hideFieldNameForRecipients":false,
        "hideCheckboxBorder":false,	
        "selfSign":false,
        "selfSignerSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SELF_SIGN_SESSION",
	"parties":[
		{
			"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY",
			"lastName":"LAST_NAME_OF_RECIPIENT_PARTY",
			"emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"hostEmailId":"EMAIL_ID_OF_INPERSON_ADMINISTRATOR",
			"allowNameChange":true,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"Email Access Code"
		},
		{
			"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY",
			"lastName":"LAST_NAME_OF_RECIPIENT_PARTY",
			"emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"hostEmailId":"EMAIL_ID_OF_INPERSON_ADMINISTRATOR",
			"allowNameChange":true,
			"signerAuthLevel":"User-defined Access Code",
			"userDefinedAccessCode":"123Test@"
		},
		....
	],
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":50,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"optional name",
			"tooltip":"",
			"value":"optional value",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters",
			"hideFieldNameForRecipients":false

		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1,
			"inputType":"url or base64",
			"imageName":"logo.png",
			"source": "URL or BASE64 String"		   
		},
		{
			"type":"text",
			"x":552,
			"y":150,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers"
		},
		{
                       "type":"formulafield",
                       "formulafieldName":"Formula_Field_Name",
                       "formula":"[n1] + [n2]",
                       "fontSize":8,
                       "fontFamily":"default",
                       "fontColor":"#000000",
                       "documentNumber":1,
                       "pageNumber":1,
                       "x":100,
                       "y":280,
                       "tabOrder":1,
                       "width":50,
                       "height":100,
                       "party": 1,
                       "decimalPlaces": 2
                },
		{
			"type":"signature",
			"x":200,
			"y":150,
			"width":100,
			"height":50,
			"documentNumber":1,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"dropdown",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"party":1,
			"value":"US",
			"options":["UK","Canada","Australia","US","France"]
		},
			"type":"accept",
			"party":1,
			"documentNumber":1,
			"pageNumber":1,
			"x":350,
			"y":505,
			"width":90,
			"height":15
		},
		{
			"type":"decline",
			"party":1,
			"documentNumber":1,
			"pageNumber":1,
			"x":450,
			"y":505,
			"width":90,
			"height":15
		},
		{
			"type":"attachment",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"party":1,
			"required":true,
			"name":"optional name"
			
		},
		{
			"type":"text",
			"textfieldName": "Signer Name",
			"x":300,
			"y":250,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"Signer Name",
			"characterLimit":100,
		 	"partyResponsible": 1,
			"required": true,
			"fontSize": 12,
			"fontFamily": "default",
			"fontColor": "#000000",
			"readOnly": true,
			"systemField": true
		},		
		{
			"type": "date",
			"x":220,
			"y":150,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"Date Signed",
			"required":true,
			"fontSize":12,
			"dateFormat": "MM-DD-YYYY",
			"readOnly": true,
			"systemField": true			
		},
		{
			"type":"hyperlink",
			"x":50,
			"y":350,
			"width":150,
			"height":15,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"HLFN1P1",
			"value":"click hear only party 1",
			"url":"https://developers.esigngenie.com/#createfolderfrompdfs",
			"tooltip":"Allow clickable for party 1 HFD_1_P1",
			"required":true,
			"fontSize":10,
			"fontColor":"#0000ff"
		}
		],
	"dependentFields":[
		{ 
			"dependentFieldName":"DEPENDENT_FIELD_NAME",
			"parentFieldName":"PARENT_FIELD_NAME",
			"parentFieldValue":"VALUE_OF_PARENT_FIELD",
			"options":"contains"
		},
		{ 
			"dependentFieldName":"DEPENDENT_FIELD_NAME",
			"parentFieldName":"PARENT_FIELD_NAME",
			"parentFieldValue":"VALUE_OF_PARENT_FIELD",
			"options":"contains"
		}....
		],
	"applyTemplate":true,
	"templateIds":[ID_OF_TEMPLATE_A,ID_OF_TEMPLATE_B],
	"templateFieldsValues": 
		{
    		"TEMPLATE_FIELD1_NAME":"FIELD1_VALUE",
          	"TEMPLATE_FIELD2_NAME":"FIELD2_VALUE"
            	....
    	},	
		
	"senderEmail":"user2@example.com"
	
}
						
Parameter Description
folderName (required) Name of the document(s) folder
inputType (optional)
Default url
Value can be either url or base64
fileUrls
(required if inputType is url)
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.
createEmbeddedSigningSessionForAllParties
(optional, default=false)
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.
hideNextRequiredFieldBtn (optional, default=false) 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.
allowSendNowAndEmbeddedSigningSession (optional, default=false) 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)
allowAdvancedEmailValidation (Optional) (default=false) 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
  1. Codes are not case-sensitive
  2. The system does not send this code so you must share this code with the signer directly
  3. 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.
hideFieldNameForRecipients (optional, default=false) 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.

RESPONSE
{
	"result":"success",
	"message":"folder of document(s) successfully created",
	"embeddedSigningSessions": [
          {
            "emailIdOfSigner": "johndoe@example.com",
            "embeddedToken": "EMBEDDED_TOKEN",
            "embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
          },
          {
            "emailIdOfSigner": "johndoe@example.com",
            "embeddedToken": "EMBEDDED_TOKEN",
            "embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
          }
        ],
	"folder":{
	    "folderId": 179,
	    "folderName": "fw4",
	    "folderAuthorId": 1,
	    "folderAuthorFirstName": "ABC",
	    "folderAuthorLastName": "XYZ",
	    "folderAuthorEmail": "abc@xyz.com",
	    "folderAuthorRole": "admin",
	    "folderCompanyId": 11,
	    "folderCreationDate": 1441268056000,
	    "folderSentDate": 1442470444000,
	    "folderStatus": "SHARED",
	    "folderDocumentIds": [
	      420
	    ],
	    "documentsList": [
	      {
	        "documentId": 420,
	        "companyId": 11,
	        "contractCreatedBy": 1,
	        "contractCreatedOn": 1441268055000,
	        "contractType": "W4",
	        "contractStatus": "WAITING_FOR_SIGNATURE",
	        "editable": false,
	        "contractVersionId": 488,
	        "contractVersionName": "fw4",
	        "contractVersionDesc": "This is a non-editable form W4",
	        "versionCreatedby": 1,
	        "versionCreatedOn": 1441268055000,
	        "contractVersionNumber": 1
	      }
	    ],
	    "folderRecipientParties": [
	      {
	        "partyId": 52,
	        "partyDetails": {
	          "partyId": 52,
	          "firstName": "John",
	          "lastName": "Doe",
	          "emailId": "johndoe@example.com",
	          "address": "",
	          "dateCreated": 1413013300000,
	          "signerAuthLevel":"Email Access Code"
	        },
	        "contractPermissions": "FILL_FIELDS_AND_SIGN",
	        "partySequence": 1,
	        "workflowSignSequence": 1,
	        "envelopeId": 179,
	        "sharingMode": "email",
	        "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=QoS4qeiO870mBXNbcuUWYA%3D%3D&partyId=52"
	      },
	      {
	        "partyId": 5,
	        "partyDetails": {
	          "partyId": 5,
	          "firstName": "test",
	          "lastName": "test",
	          "emailId": "test@esigngenie.com",
	          "address": "",
	          "dateCreated": 1413013300000,
	          "signerAuthLevel":"User-defined Access Code",
	          "userDefinedAccessCode":"123Test@"
	        },
	        "contractPermissions": "FILL_FIELDS_AND_SIGN",
	        "partySequence": 1,
	        "workflowSignSequence": 1,
	        "envelopeId": 179,
	        "sharingMode": "email",
	        "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=QoS4qeiO870mBXNbcuUWYA%3D%3D&partyId=52"
	      },
	      {
	        "partyId": 1,
	        "partyDetails": {
	          "partyId": 1,
	          "firstName": "John",
	          "lastName": "Doe",
	          "emailId": "johndoe@example.com",
	          "address": "New Delhi, India",
	          "dateCreated": 1404792207000
	        },
	        "contractPermissions": "FILL_FIELDS_AND_SIGN",
	        "partySequence": 2,
	        "workflowSignSequence": 2,
	        "envelopeId": 179,
	        "sharingMode": "email",
	        "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=QoS4qeiO870mBXNbcuUWYA%3D%3D&partyId=1"
	      }
	    ],
	    "folderAccessURLForAuthor": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=jZvyX4AFC2kv7AU%2BBtM16A%3D%3D&partyId=1",
	    "bulkId": 0,
	    "enforceSignWorkflow": false,
	    "currentWorkflowStep": 1,
	    "transactionSource": "API-1-via_file_upload",
	    "editable": false
	}
}
						

Sample Code (creating documents from file URLs)
echo '{
	"folderName":"Sample Documents",
	"fileUrls":[
		"URL_TO_DOCUMENT_1","URL_TO_DOCUMENT_2",...
	],
	"fileNames":[
		"document_1.pdf","document_2.pdf",...
	],
	"processTextTags":true,
	"processAcroFields":true,
	"signInSequence":false,
	"sendNow":false,
	"createEmbeddedSendingSession":false,
	"fixRecipientParties":true,
	"fixDocuments":true,
	"sendSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"sendErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"createEmbeddedSigningSession":true,
	"createEmbeddedSigningSessionForAllParties":true,
	"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"themeColor":"ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION",
	"sessionExpire":false,
	"expiry":300000,
	"allowSendNowAndEmbeddedSigningSession":false,
	"parties":[
		{
			"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY",
			"lastName":"LAST_NAME_OF_RECIPIENT_PARTY",
			"emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"Email Access Code"
		},
		....
	],
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":50,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"optional name",
			"tooltip":"",
			"value":"optional value",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"

		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                       "type":"formulafield",
                       "formulafieldName":"Formula_Field_Name",
                       "formula":"[n1] * [n2]",
                       "fontSize":8,
                       "fontFamily":"default",
                       "fontColor":"#000000",
                       "documentNumber":1,
                       "pageNumber":1,
                       "x":100,
                       "y":280,
                       "tabOrder":1,
                       "width":50,
                       "height":100,
                       "party": 1,
                       "decimalPlaces": 2
                },
		{
			"type":"text",
			"x":552,
			"y":150,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers"
		},
		{
			"type":"signature",
			"x":200,
			"y":150,
			"width":100,
			"height":50,
			"documentNumber":1,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"dropdown",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"party":1,
			"value":"US",
			"options":["UK","Canada","Australia","US","France"]
		}
		]
	
}' | curl https://{{HOST_NAME}}/api/folders/createfolder \
-i \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json;charset=UTF-8" \
-d @- \
-X POST
						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/createfolder",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
	"folderName":"Sample Documents",
	"fileUrls":[
		"URL_TO_DOCUMENT_1","URL_TO_DOCUMENT_2",...
	],
	"fileNames":[
		"document_1.pdf","document_2.pdf",...
	],
	"processTextTags":false,
	"processAcroFields":true,
	"signInSequence":false,
	"sendNow":false,
	"createEmbeddedSendingSession":false,
	"fixRecipientParties":true,
	"fixDocuments":true,
	"sendSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"sendErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"createEmbeddedSigningSession":true,
	"createEmbeddedSigningSessionForAllParties":true,
	"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"themeColor":"ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION",
	"sessionExpire":false,
	"expiry":300000,
	"allowSendNowAndEmbeddedSigningSession":false,
	"parties":[
		{
			"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY",
			"lastName":"LAST_NAME_OF_RECIPIENT_PARTY",
			"emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"Email Access Code"
		},
		....
	],
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":50,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"optional name",
			"tooltip":"",
			"value":"optional value",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"

		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                       "type":"formulafield",
                       "formulafieldName":"Formula_Field_Name",
                       "formula":"[n1] + [n2]",
                       "fontSize":8,
                       "fontFamily":"default",
                       "fontColor":"#000000",
                       "documentNumber":1,
                       "pageNumber":1,
                       "x":100,
                       "y":280,
                       "tabOrder":1,
                       "width":50,
                       "height":100,
                       "party": 1,
                       "decimalPlaces": 2
                },
		{
			"type":"text",
			"x":552,
			"y":150,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers"
		},
		{
			"type":"signature",
			"x":200,
			"y":150,
			"width":100,
			"height":50,
			"documentNumber":1,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"dropdown",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"party":1,
			"value":"US",
			"options":["UK","Canada","Australia","US","France"]
		}
		]
	
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
var webAddr = "https://{{HOST_NAME}}/api/folders/createfolder";
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 = @"{
	""folderName"":""test"",
	""fileUrls"":[""URL_TO_DOCUMENT_1""],
	""fileNames"":[""eSignGenieSampleUpload.pdf""],	
	""processTextTags"":true,
	"processAcroFields":true,
	""signInSequence"":false,
	""sendNow"":false,
	""createEmbeddedSendingSession"":false,
	""fixRecipientParties"":true,
	""fixDocuments"":true,
	""sendSuccessUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""sendErrorUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""createEmbeddedSigningSession"":true,
	""createEmbeddedSigningSessionForAllParties"":true,
	""signSuccessUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signDeclineUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signLaterUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signErrorUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""themeColor"":""ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION"",
	"allowSendNowAndEmbeddedSigningSession":false,
	""parties"":[
		{
			""firstName"":""FIRST_NAME_OF_RECIPIENT_PARTY"",
			""lastName"":""LAST_NAME_OF_RECIPIENT_PARTY"",
			""emailId"":""EMAIL_ID_OF_RECIPIENT_PARTY"",
			""permission"":""FILL_FIELDS_AND_SIGN"",
			""sequence"":1,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"SMS Access Code"
        }
		],
		""fields"":[
		{
			""type"":""text"",
			""x"":100,
			""y"":50,
			""width"":60,
			""height"":20,
			""documentNumber"":1,
			""pageNumber"":1,
			""tabOrder"":1,
			""party"":1,
			""name"":""optional name"",
			""tooltip"":"""",
			""value"":""optional value"",
			""required"":true,
			""characterLimit"":100,
			""fontSize"":12,
			""fontColor"":""#000000"",
			""validation"":""Letters""

		},
		{
			""type"":""text"",
			""x"":552,
			""y"":150,
			""width"":60,
			""height"":20,
			""documentNumber"":1,
			""pageNumber"":1,
			""tabOrder"":1,
			""party"":1,
			""fontSize"":8,
			""fontColor"":""#eee"",
			""validation"":""Numbers""
		},
		{
                       "type":"formulafield",
                       "formulafieldName":"Formula_Field_Name",
                       "formula":"[n1] + [n2]",
                       "fontSize":8,
                       "fontFamily":"default",
                       "fontColor":"#000000",
                       "documentNumber":1,
                       "pageNumber":1,
                       "x":100,
                       "y":280,
                       "tabOrder":1,
                       "width":50,
                       "height":100,
                       "party": 1,
                       "decimalPlaces": 2
                },
		{
			""type"":""signature"",
			""x"":200,
			""y"":150,
			""width"":100,
			""height"":50,
			""documentNumber"":1,
			""pageNumber"":1,
			""party"":1
		},
		{
			""type"":""dropdown"",
			""x"":200,
			""y"":250,
			""width"":80,
			""height"":20,
			""documentNumber"":1,
			""pageNumber"":1,
			""party"":1,
			""value"":""US"",
			""options"":[""UK"",""Canada"",""Australia"",""US"",""France""]
		}
		]
}";
                streamWriter.Write(json);
                streamWriter.Flush();
            }

            var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
                var result = streamReader.ReadToEnd();
            }

						
		URL url= new URL("https://{{HOST_NAME}}/api/folders/createfolder");
		HttpURLConnection con= (HttpURLConnection) url.openConnection();
		con.setDoOutput(true);
		try {
			con.setRequestMethod("POST");
			
		} catch (ProtocolException e) {
			e.printStackTrace();
		}
		con.setRequestProperty("Authorization", "Bearer ACCESS_TOKEN");
		con.setRequestProperty("Content-Type", "application/json");
		String input="{"
				+ "\"folderName\":\"Creating Folder From Uploading File\","
				+ "\"processTextTags\":true,"
				+ "\"processAcroFields\":true,"
				+ "\"sendNow\":false,"
				+ "\"fileUrls\":[\"https://developers.esigngenie.com/uploads/FoxiteSignAPISampleDoc.pdf\"]"
				
				+ "\"parties\":["
					+ "{"
						+ "\"firstName\":\"John\","
						+ "\"lastName\":\"Doe\","
						+ "\"emailId\":\"johndoe@example.com\","
						+ "\"permission\":\"FILL_FIELDS_AND_SIGN\","
						+ "\"sequence\":1"
					+ "},"
					+ "{"
						+ "\"firstName\":\"John\","
						+ "\"lastName\":\"Doe\","
						+ "\"emailId\":\"johndoe@example.com\","
						+ "\"permission\":\"FILL_FIELDS_AND_SIGN\","
						+ "\"sequence\":2"
					+ "}"
				+ "],"
				+ "\"createEmbeddedSigningSession\":true,"
				+ "\"createEmbeddedSigningSessionForAllParties\":true," 
				+ "\"allowSendNowAndEmbeddedSigningSession\":false,
		        + "\"senderEmail\":\"johndoe@example.com\""
				+ "}";	

		OutputStream os = con.getOutputStream();
		os.write(input.getBytes());
		os.flush();
		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();
						

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)
curl https://{{HOST_NAME}}/api/folders/createfolder \
-i \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: multipart/form-data;charset=UTF-8" \
-F data='{"folderName":"Sample Documents","processTextTags":true,"processAcroFields":true,"signInSequence":false,"sendNow":false,"createEmbeddedSendingSession":false,"fixRecipientParties":true,"fixDocuments":true,"sendSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","sendErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","createEmbeddedSigningSession":true,"createEmbeddedSigningSessionForAllParties":true,"allowSendNowAndEmbeddedSigningSession":false,"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","themeColor":"ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION","parties":[{"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY","lastName":"LAST_NAME_OF_RECIPIENT_PARTY","emailId":"EMAIL_ID_OF_RECIPIENT_PARTY","permission":"FILL_FIELDS_AND_SIGN","workflowSequence":1,"sequence":1}]}' \
-F file=@FILE_1_TO_UPLOAD \
-X POST						
						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/createfolder",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '
-----011000010111000001101001
Content-Disposition: form-data; name="file"; filename="file1.pdf"
Content-Type: application/octet-stream

'.file_get_contents('/path/to/your/file1').'
-----011000010111000001101001
Content-Disposition: form-data; name="file"; filename="file2.pdf"
Content-Type: application/octet-stream

'.file_get_contents('/path/to/your/file2').'
-----011000010111000001101001
 Content-Disposition: form-data; name="data"

{"folderName":"Sample Documents","processTextTags":true,"processAcroFields":true,"signInSequence":false,"sendNow":false,"createEmbeddedSendingSession":false,"fixRecipientParties":true,"fixDocuments":true,"sendSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","sendErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","createEmbeddedSigningSession":false,"allowSendNowAndEmbeddedSigningSession":false,"emailIdOfEmbeddedSigner":"EMAIL_ID_OF_ONE_OF_THE_RECIPIENTS","signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION","parties":[{"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY","lastName":"LAST_NAME_OF_RECIPIENT_PARTY","emailId":"EMAIL_ID_OF_RECIPIENT_PARTY","permission":"FILL_FIELDS_AND_SIGN","workflowSequence":1,"sequence":1}]}
-----011000010111000001101001--',

  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
URL url= new URL("https://{{HOST_NAME}}/api/folders/createfolder");
HttpURLConnection con= (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
String charset="UTF-8";
		
String input="{"
			+ "\"folderName\":\"Creating Folder From Uploading File\","
			+ "\"processTextTags\":true,"
			+ "\"processAcroFields\":true,"
			+ "\"sendNow\":false,"
			+ "\"parties\":["
				+ "{"
					+ "\"firstName\":\"John\","
					+ "\"lastName\":\"Doe\","
					+ "\"emailId\":\"johndoe@example.com\","
					+ "\"permission\":\"FILL_FIELDS_AND_SIGN\","
					+ "\"sequence\":1"
				+ "},"
				+ "{"
					+ "\"firstName\":\"John\","
					+ "\"lastName\":\"Doe\","
					+ "\"emailId\":\"johndoe@example.com\","
					+ "\"permission\":\"FILL_FIELDS_AND_SIGN\","
					+ "\"sequence\":2"
				+ "}"
			+ "],"
			+ "\"createEmbeddedSigningSession\":true,"
			+ "\"createEmbeddedSigningSessionForAllParties\":true," 
			+ "\"allowSendNowAndEmbeddedSigningSession\":false,"
	        + "\"senderEmail\":\"johndoe@example.com\""
			+ "}";	
		
		
File binaryFile = new File("D:\\Sample.pdf");
String boundary = "----"+ Long.toHexString(System.currentTimeMillis()) + "------"; 
String CRLF = "\r\n"; 
con.setRequestProperty("Content-Type","multipart/form-data; boundary=\"" + boundary + "\"");
		
con.setRequestProperty("Authorization", "Bearer ACCESS_TOKEN");
try (
	OutputStream output = con.getOutputStream();
	PrintWriter writer = new PrintWriter(new OutputStreamWriter(output, charset), true);
	) {
		   
	writer.append("--" + boundary).append(CRLF);
			    
	writer.append("Content-Disposition:form-data; name=\"data\"").append(CRLF);
			 
	writer.append(CRLF).append(input).append(CRLF).flush();
    writer.append("--" + boundary).append(CRLF);
	writer.append("Content-Disposition: form-data; name=\"file\"; filename=\"" + binaryFile.getName() + "\"").append(CRLF);
		   
	writer.append("Content-Transfer-Encoding: binary").append(CRLF);
	writer.append(CRLF).flush();
		    
	Files.copy(binaryFile.toPath(), output);
	output.flush();
	writer.append(CRLF).flush(); 
	writer.append("--" + boundary + "--").append(CRLF).flush();
		   
	}
	List<String> response = new ArrayList<String>();
	if (con.getResponseCode()== HttpURLConnection.HTTP_OK) {
	    BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));
		String line = null;
		while ((line = reader.readLine()) != null) {
			response.add(line);
		}
	            
		reader.close();
		con.disconnect();
	} else {
		throw new IOException("Server returned non-OK status: " + con.getResponseCode());
	}
		 
 
System.out.println("Finally Reply from server "+con.getResponseCode());
						
String file = @"C:\test\sample.pdf";
String url = "https://{{HOST_NAME}}/api/folders/createfolder";
String boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n");

HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(url);
wr.ContentType = "multipart/form-data; boundary=" + boundary;
wr.Method = "POST";
wr.KeepAlive = true;
wr.Credentials = System.Net.CredentialCache.DefaultCredentials;

Stream rs = wr.GetRequestStream();

string json = @"{
	""folderName"":""test"",
	""processTextTags"":true,
	""processAcroFields"":true,
	""signInSequence"":false,
	""sendNow"":false,
	""createEmbeddedSendingSession"":false,
	""fixRecipientParties"":true,
	""fixDocuments"":true,
	""sendSuccessUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""sendErrorUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""createEmbeddedSigningSession"":true,
	""createEmbeddedSigningSessionForAllParties"":true,
	""signSuccessUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signDeclineUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signLaterUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signErrorUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""themeColor"":""#0066cb"",
	""allowSendNowAndEmbeddedSigningSession"":false,
	""parties"":[
		{
			""firstName"":""FIRST_NAME_OF_RECIPIENT_PARTY"",
			""lastName"":""LAST_NAME_OF_RECIPIENT_PARTY"",
			""emailId"":""EMAIL_ID_OF_RECIPIENT_PARTY"",
			""permission"":""FILL_FIELDS_AND_SIGN"",
			""sequence"":1,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"SMS Access Code"
		}
		]	
}";

rs.Write(boundarybytes, 0, boundarybytes.Length);

string formdataTemplate = "Content-Disposition: form-data; name=\"data\"\r\n\r\n"+json;
byte[] formitembytes = System.Text.Encoding.UTF8.GetBytes(formdataTemplate);
rs.Write(formitembytes, 0, formitembytes.Length);

rs.Write(boundarybytes, 0, boundarybytes.Length);

string headerTemplate = "Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n\r\n";
      
byte[] headerbytes = System.Text.Encoding.UTF8.GetBytes(headerTemplate);
rs.Write(headerbytes, 0, headerbytes.Length);

FileStream fileStream = new FileStream(file, FileMode.Open, FileAccess.Read);
byte[] buffer = new byte[4096];
int bytesRead = 0;
while ((bytesRead = fileStream.Read(buffer, 0, buffer.Length)) != 0) {
          rs.Write(buffer, 0, bytesRead);
}
fileStream.Close();

byte[] trailer = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "--\r\n");
rs.Write(trailer, 0, trailer.Length);
rs.Close();

WebResponse wresp = null;
try {
     wresp = wr.GetResponse();
     Stream stream2 = wresp.GetResponseStream();
     StreamReader reader2 = new StreamReader(stream2);
     log.Debug(string.Format("File uploaded, server response is: {0}", reader2.ReadToEnd()));
} catch(Exception ex) {
     log.Error("Error uploading file", ex);
     if(wresp != null) {
         wresp.Close();
         wresp = null;
     }
} finally {
     wr = null;
}
    
						

Sending the Draft Folder

With Foxit eSign API, you can send any draft document by calling /folders/sendDraftFolder with the given parameters.


/folders/sendDraftFolder
application/json

REQUEST
{
	"folderId":51798,
	"folderName":"MainFolder",
	"folderPassword":"",
	"signInSequence":false,
	"inPersonEnable":false,
	"hideMoreAction": false,
	"sendNow":true,	
	"signSuccessUrlAllParties":true,
	"allowAdvancedEmailValidation":true,
	"parties":[
		{
			"firstName":"ABC",
			"lastName":"XYZ",
			"emailId":"abc@xyz.com",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"allowNameChange":false,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			 "signerAuthLevel":"SMS Access Code"
		},
		{
			"firstName":"PartyFirstName2",
			"lastName":"PartyLastName2",
			"emailId":"mno@xyz.com",
			"permission":"FILL_FIELDS_AND_SIGN",
			"sequence":2,
			"hostEmailId":"hosteduseremail@xyz.com",
			"allowNameChange":false,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"Email Access Code"
		},
		{
			"firstName":"PartyFirstName3",
			"lastName":"PartyLastName3",
			"emailId":"test@xyz.com",
			"permission":"FILL_FIELDS_AND_SIGN",
			"sequence":3,
			"hostEmailId":"hosteduseremail@xyz.com",
			"allowNameChange":false,			
			"signerAuthLevel":"User-defined Access Code",
			"userDefinedAccessCode":"123@Test"
		}
	],
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":130,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"TextFieldName",
			"tooltip":"",
			"value":"TextFieldValue",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"
			"hideFieldNameForRecipients":false
		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                       "type":"formulafield",
                       "formulafieldName":"Formula_Field_Name",
                       "formula":"[n1] * [n2]",
                       "fontSize":8,
                       "fontFamily":"default",
                       "fontColor":"#000000",
                       "documentNumber":1,
                       "pageNumber":1,
                       "x":100,
                       "y":280,
                       "tabOrder":1,
                       "width":50,
                       "height":100,
                       "party": 1,
                       "decimalPlaces": 2
                },
		{
			"type":"signature",
			"x":200,
			"y":130,
			"width":100,
			"height":50,
			"documentNumber":1,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"text",
			"textfieldName": "Signer Name",
			"x":300,
			"y":250,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"Signer Name",
			"characterLimit":100,
		 	"partyResponsible": 1,
			"required": true,
			"fontSize": 12,
			"fontFamily": "default",
			"fontColor": "#000000",
			"readOnly": true,
			"systemField": true
		},
		{
			"type":"text",
			"x":450,
			"y":130,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"TextFieldName2",
			"tooltip":"",
			"value":"12345",
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers",
			"required":true
		},
			"type":"accept",
			"party":1,
			"documentNumber":1,
			"pageNumber":1,
			"x":350,
			"y":505,
			"width":90,
			"height":15
		},
		{
			"type":"decline",
			"party":1,
			"documentNumber":1,
			"pageNumber":1,
			"x":450,
			"y":505,
			"width":90,
			"height":15
		},
		{
			"type":"text",
			"x":100,
			"y":230,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":2,
			"name":"TextFieldName3",
			"tooltip":"",
			"value":"TextFieldValueThree",
			"required":false,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"
		},
		{
			"type":"signature",
			"x":200,
			"y":230,
			"width":100,
			"height":50,
			"documentNumber":1,
			"pageNumber":1,
			"party":2
		},
		{
			"type":"text",
			"x":450,
			"y":230,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":2,
			"name":"12345678",
			"tooltip":"",
			"value":"1234",
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers",
			"required":true
		}
	],
	"createEmbeddedSigningSession":false,
		"emailIdOfEmbeddedSigner":"",
		"createEmbeddedSigningSessionForAllParties":false,
		"embeddedSignersEmailIds":["FIRST_EMBEDDED_SIGNER_EMAIL","SECOND_EMBEDDED_SIGNER_EMAIL"],
		"hideDeclineToSign":false,
		"hideNextRequiredFieldBtn":true,
		"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
		"signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
		"signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
		"signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
		"themeColor":"#C71585",
		"sessionExpire":false,
		"expiry":300000,
	"allowSendNowAndEmbeddedSigningSession":false,
	"createExecutedFolder": false,
	"custom_field1":{
			  	"name":"NAME",
			  	"value":"VALUE"
			},
	"custom_field2":{
			  	"name":"NAME",
			  	"value":"VALUE"
			},
		"emailTemplateId":0,
		"emailTemplateCustomFields":[
		  	{
		  		"tag":"custom_tag_value_1",
		  		"type":"plain",
		  		"value":"Email Template Custom value one."
		  	},
		  	{
		  		"tag":"custom_tag_1",
		  		"type":"plain",
		  		"value":""
		  	},
		  	{
		  		"tag":"custom_tag_2",
		  		"type":"plain",
		  		"value":"custom tag 2 Value."
		  	},
		  	{
		  		"tag":"custom_tag_link_1",
		  		"type":"hyperlink",
		  		"value":"",
		  		"url":"http://https://abc.com/hyperlink"
		  	}
		],
		"editEmailTemplate": {
			"emailTemplateSubject": "Email_Template_Subject'_${custom_tag_value_1}",
			"emailTemplateHtmlBody": 
				"<p>Email_Template_Body : </p>
				<p>${custom_tag_1} </p>
				<p>${custom_tag_2}</p>
				<p>$custom_tag_link_1}</p>
				<p>${custom_tag_1}</p>
				<p>&nbsp;  <span contenteditable=\"false\">${rec_full_name}</span>&nbsp;&nbsp; </p>
				<p><span contenteditable=\"false\">${rec_first_name}</span>&nbsp;&nbsp; </p>
				<p>&nbsp;&nbsp;<span contenteditable=\"false\">${sender_full_name}</span>&nbsp;&nbsp; </p>
				<p><span contenteditable=\"false\">${sender_first_name}</span>&nbsp;&nbsp; </p>
				<p>&nbsp;&nbsp;<span contenteditable=\"false\">${document_title}</span>&nbsp;&nbsp;</p>"
				....
			
			},
	"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.
createEmbeddedSigningSession (optional, 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.
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.
hideNextRequiredFieldBtn (optional, default=false) 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.
allowSendNowAndEmbeddedSigningSession (optional, default=false) 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.
allowAdvancedEmailValidation (Optional) (default=false) 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
  1. Codes are not case-sensitive
  2. The system does not send this code so you must share this code with the signer directly
  3. 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)
hideFieldNameForRecipients (optional, default=false) 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.

RESPONSE
{
    "embeddedSigningSessions": [
        {
            "emailIdOfSigner": "abc@xyz.com",
            "embeddedToken": "EMBEDDED_TOKEN",
            "embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
        },
        {
            "emailIdOfSigner": "mno@xyz.com",
            "embeddedToken": "EMBEDDED_TOKEN",
            "embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
        }
    ],
    "folder": {
        "folderId": 51798,
        "folderName": "Draft_Docs_Send_By_Id_1",
        "folderCustomName": "",
        "folderPassword": null,
        "folderAuthorId": 15603,
        "folderAuthorFirstName": "abc",
        "folderAuthorLastName": "xyz",
        "folderAuthorEmail": "abc@xyz.com",
        "folderAuthorRole": "super_admin",
        "folderCompanyId": 86,
        "folderCreationDate": 1580240968000,
        "folderSentDate": 1580460679339,
        "folderStatus": "SHARED",
        "custom_field1": {
            "name": "NAME",
            "value": "VALUE"
        },
        "custom_field2": {
            "name": "NAME",
            "value": "VALUE"
        },
        "folderDocumentIds": [
            51897
        ],
        "documentsList": [
            {
                "documentId": 51897,
                "contractId": 51897,
                "companyId": 86,
                "contractCreatedBy": 15603,
                "contractCreatedOn": 1580240967000,
                "contractType": null,
                "contractStatus": "WAITING_FOR_SIGNATURE",
                "editable": false,
                "contractVersionId": 26809,
                "contractVersionName": "fw4",
                "contractVersionDesc": "This is a non-editable form W4",
                "versionCreatedby": 15603,
                "versionCreatedOn": 1580240967000,
                "contractVersionNumber": 1,
                "contractTransactionSource": null
            }
        ],
        "folderRecipientParties": [
            {
                "partyId": 15573,
                "partyDetails": {
                    "partyId": 15573,
                    "firstName": "ABC",
                    "lastName": "XYZ",
                    "emailId": "abc@xyz.com",
                    "address": "",
                    "dateCreated": 1530046694000,
                    "optOutEmails": false,
                    "companyId": 86,
                    "userRole": "admin",
                    "userAddedDate": 1550638146000,
                    "department": "",
                    "title": "",
                    "active": true,
                    "requestLocale": "auto",
                    "share_among_department": false,
                    "dialingCode": "+1",
                    "mobileNumber": null,
                    "docStatusFilter": "all",
                    "docDateFilter": "last60",
                    "managerId": null
                },
                "contractPermissions": "FILL_FIELDS_AND_SIGN",
                "partySequence": 1,
                "workflowSignSequence": 1,
                "envelopeId": 0,
                "sharingMode": "direct",
                "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=gayQGLXYdB491iyhRYf25g%3D%3D&partyId=15573",
                "securityMode": "none",
                "extraComments": null,
                "allowNameChange": false,
                "signerNameUpdated": false,
                "signatureId": null
            },
            {
                "partyId": 15603,
                "partyDetails": {
                    "partyId": 15603,
                    "firstName": "PartyFirstName2",
                    "lastName": "PartyLasrName2",
                    "emailId": "mno@xyz.com",
                    "address": "",
                    "dateCreated": 1536713561000,
                    "optOutEmails": false,
                    "companyId": 86,
                    "userRole": "super_admin",
                    "userAddedDate": 1536713561000,
                    "department": "",
                    "title": "",
                    "active": true,
                    "requestLocale": "auto",
                    "share_among_department": false,
                    "dialingCode": "+1",
                    "mobileNumber": null,
                    "docStatusFilter": "all",
                    "docDateFilter": "last30",
                    "managerId": null
                },
                "contractPermissions": "FILL_FIELDS_AND_SIGN",
                "partySequence": 2,
                "workflowSignSequence": 2,
                "envelopeId": 0,
                "sharingMode": "direct",
                "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=gayQGLXYdB491iyhRYf25g%3D%3D&partyId=15603",
                "securityMode": "none",
                "extraComments": null,
                "allowNameChange": false,
                "signerNameUpdated": false,
                "signatureId": null
            }
        ],
        "folderAccessURLForAuthor": null,
        "bulkId": 0,
        "enforceSignWorkflow": false,
        "currentWorkflowStep": 1,
        "transactionSource": "API-5-via_draft_send",
        "editable": false,
        "inPersonSignable": false,
        "overrideAccountReminders": false,
        "overrideAccountRecipientDelegation": false,
        "allowRecipientsToDelegate": false,
        "envelopeId": 51798,
        "envelopeName": "fW4",
        "envelopeOriginatorId": 15603,
        "envelopeCompanyId": 86,
        "envelopeDate": 1580240968000,
        "envelopeSharedDate": 1580460679339,
        "envelopeStatus": "SHARED",
        "envelopeContractIds": [
            51897
        ],
        "envelopePartyPermissions": [
            {
                "partyId": 15573,
                "partyDetails": {
                    "partyId": 15573,
                    "firstName": "ABC",
                    "lastName": "XYZ",
                    "emailId": "abc@xyz.com",
                    "address": "",
                    "dateCreated": 1530046694000,
                    "optOutEmails": false,
                    "companyId": 86,
                    "userRole": "admin",
                    "userAddedDate": 1550638146000,
                    "department": "",
                    "title": "",
                    "active": true,
                    "requestLocale": "auto",
                    "share_among_department": false,
                    "dialingCode": "+1",
                    "mobileNumber": null,
                    "docStatusFilter": "all",
                    "docDateFilter": "last60",
                    "managerId": null
                },
                "contractPermissions": "FILL_FIELDS_AND_SIGN",
                "partySequence": 1,
                "workflowSignSequence": 1,
                "envelopeId": 0,
                "sharingMode": "direct",
                "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=gayQGLXYdB491iyhRYf25g%3D%3D&partyId=15573",
                "securityMode": "none",
                "extraComments": null,
                "allowNameChange": false,
                "signerNameUpdated": false,
                "signatureId": null
            },
            {
                "partyId": 15603,
                "partyDetails": {
                    "partyId": 15603,
                    "firstName": "PartyFirstName2",
                    "lastName": "PartyLasrName2",
                    "emailId": "mno@xyz.com",
                    "address": "",
                    "dateCreated": 1536713561000,
                    "optOutEmails": false,
                    "companyId": 86,
                    "userRole": "super_admin",
                    "userAddedDate": 1536713561000,
                    "department": "",
                    "title": "",
                    "active": true,
                    "requestLocale": "auto",
                    "share_among_department": false,
                    "dialingCode": "+1",
                    "mobileNumber": null,
                    "docStatusFilter": "all",
                    "docDateFilter": "last30",
                    "managerId": null
                },
                "contractPermissions": "FILL_FIELDS_AND_SIGN",
                "partySequence": 2,
                "workflowSignSequence": 2,
                "envelopeId": 0,
                "sharingMode": "direct",
                "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=gayQGLXYdB491iyhRYf25g%3D%3D&partyId=15603",
                "securityMode": "none",
                "extraComments": null,
                "allowNameChange": false,
                "signerNameUpdated": false,
                "signatureId": null
            }
        ],
        "envelopeAuthenticationLevel": "NO",
        "allowSingleSignerInBulk": false
    },
    "result": "success",
    "message": "Folder of the document(s) successfully created"
}
		

Modify the Shared Folder

With Foxit eSign API, you can modify any shared folder by calling /folders/modifySharedFolder with the given parameters.


/folders/modifySharedFolder
application/json

REQUEST
{
	"folderId":51798,
	"folderName":"MainFolder",
	"folderPassword":"",
	"signInSequence":false,
	"inPersonEnable":false,
	"hideMoreAction": false,
	"sendNow":true,
	"signSuccessUrlAllParties":true,
	"allowAdvancedEmailValidation":true,
	"parties":[
		{
			"firstName":"ABC",
			"lastName":"XYZ",
			"emailId":"abc@xyz.com",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"allowNameChange":false,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			 "signerAuthLevel":"SMS Access Code"
		},
		{
			"firstName":"PartyFirstName2",
			"lastName":"PartyLastName2",
			"emailId":"mno@xyz.com",
			"permission":"FILL_FIELDS_AND_SIGN",
			"sequence":2,
			"hostEmailId":"hosteduseremail@xyz.com",
			"allowNameChange":false,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"Email Access Code"
		},
		{
			"firstName":"Test",
			"lastName":"test",
			"emailId":"test@test.com",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"allowNameChange":false,
			"signerAuthLevel":"User-defined Access Code",
			"userDefinedAccessCode":"123Test@"
		}
	],
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":130,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"TextFieldName",
			"tooltip":"",
			"value":"TextFieldValue",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"
			"hideFieldNameForRecipients":false
		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                       "type":"formulafield",
                       "formulafieldName":"Formula_Field_Name",
                       "formula":"[n1] + [n2]",
                       "fontSize":8,
                       "fontFamily":"default",
                       "fontColor":"#000000",
                       "documentNumber":1,
                       "pageNumber":1,
                       "x":100,
                       "y":280,
                       "tabOrder":1,
                       "width":50,
                       "height":100,
                       "party": 1,
                       "decimalPlaces": 2
                },
		{
			"type":"signature",
			"x":200,
			"y":130,
			"width":100,
			"height":50,
			"documentNumber":1,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"text",
			"textfieldName": "Signer Name",
			"x":300,
			"y":250,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"Signer Name",
			"characterLimit":100,
		 	"partyResponsible": 1,
			"required": true,
			"fontSize": 12,
			"fontFamily": "default",
			"fontColor": "#000000",
			"readOnly": true,
			"systemField": true
		},
		{
			"type":"text",
			"x":450,
			"y":130,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"TextFieldName2",
			"tooltip":"",
			"value":"12345",
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers",
			"required":true
		},
		{
			"type":"accept",
			"party":1,
			"documentNumber":1,
			"pageNumber":1,
			"x":350,
			"y":505,
			"width":90,
			"height":15
		},
		{
			"type":"decline",
			"party":1,
			"documentNumber":1,
			"pageNumber":1,
			"x":450,
			"y":505,
			"width":90,
			"height":15
		},
		{
			"type":"text",
			"x":100,
			"y":230,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":2,
			"name":"TextFieldName3",
			"tooltip":"",
			"value":"TextFieldValueThree",
			"required":false,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"
		},
		{
			"type":"signature",
			"x":200,
			"y":230,
			"width":100,
			"height":50,
			"documentNumber":1,
			"pageNumber":1,
			"party":2
		},
		{
			"type":"text",
			"x":450,
			"y":230,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":2,
			"name":"12345678",
			"tooltip":"",
			"value":"1234",
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers",
			"required":true
		}
	],
	"createEmbeddedSigningSession":false,
	"emailIdOfEmbeddedSigner":"",
	"createEmbeddedSigningSessionForAllParties":false,
	"embeddedSignersEmailIds":["FIRST_EMBEDDED_SIGNER_EMAIL","SECOND_EMBEDDED_SIGNER_EMAIL"],
	"hideDeclineToSign":false,
	"hideNextRequiredFieldBtn":true,
	"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"themeColor":"#C71585",
	"sessionExpire":false,
	"expiry":300000,
	"allowSendNowAndEmbeddedSigningSession":false,
	"createEmbeddedSendingSession":false,
	"enableStepByStep":false,
	"hideSignerActions": false,
	"hideSenderName": true,
	"hideFolderName": false,
	"hideDocumentsName": true,
	"createExecutedFolder": false,
	"custom_field1":{
			  	"name":"NAME",
			  	"value":"VALUE"
			},
	"custom_field2":{
			  	"name":"NAME",
			  	"value":"VALUE"
			},
		"emailTemplateId":0,
		"emailTemplateCustomFields":[
		  	{
		  		"tag":"custom_tag_value_1",
		  		"type":"plain",
		  		"value":"Email Template Custom value one."
		  	},
		  	{
		  		"tag":"custom_tag_1",
		  		"type":"plain",
		  		"value":""
		  	},
		  	{
		  		"tag":"custom_tag_2",
		  		"type":"plain",
		  		"value":"custom tag 2 Value."
		  	},
		  	{
		  		"tag":"custom_tag_link_1",
		  		"type":"hyperlink",
		  		"value":"",
		  		"url":"http://https://abc.com/hyperlink"
		  	}
		],
		"editEmailTemplate": {
			"emailTemplateSubject": "Email_Template_Subject'_${custom_tag_value_1}",
			"emailTemplateHtmlBody": 
				"<p>Email_Template_Body : </p>
				<p>${custom_tag_1} </p>
				<p>${custom_tag_2}</p>
				<p>$custom_tag_link_1}</p>
				<p>${custom_tag_1}</p>
				<p>&nbsp;  <span contenteditable=\"false\">${rec_full_name}</span>&nbsp;&nbsp; </p>
				<p><span contenteditable=\"false\">${rec_first_name}</span>&nbsp;&nbsp; </p>
				<p>&nbsp;&nbsp;<span contenteditable=\"false\">${sender_full_name}</span>&nbsp;&nbsp; </p>
				<p><span contenteditable=\"false\">${sender_first_name}</span>&nbsp;&nbsp; </p>
				<p>&nbsp;&nbsp;<span contenteditable=\"false\">${document_title}</span>&nbsp;&nbsp;</p>"
				....
			
			},
	"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.
createEmbeddedSigningSession (optional, 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.
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.
hideNextRequiredFieldBtn (optional, default=false) 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.
allowSendNowAndEmbeddedSigningSession (optional, default=false) 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.
allowAdvancedEmailValidation (Optional) (default=false) 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
  1. Codes are not case sensitive
  2. System does not send this code so you must share this code with the signer directly
  3. 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)
hideFieldNameForRecipients (optional, default=false) 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.

RESPONSE
{
    "embeddedSigningSessions": [
        {
            "emailIdOfSigner": "abc@xyz.com",
            "embeddedToken": "EMBEDDED_TOKEN",
            "embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
        },
        {
            "emailIdOfSigner": "mno@xyz.com",
            "embeddedToken": "EMBEDDED_TOKEN",
            "embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
        }
    ],
    "folder": {
        "folderId": 51798,
        "folderName": "Folder_name_1",
        "folderCustomName": "",
        "folderPassword": null,
        "folderAuthorId": 15603,
        "folderAuthorFirstName": "abc",
        "folderAuthorLastName": "xyz",
        "folderAuthorEmail": "abc@xyz.com",
        "folderAuthorRole": "super_admin",
        "folderCompanyId": 86,
        "folderCreationDate": 1580240968000,
        "folderSentDate": 1580460679339,
        "folderStatus": "SHARED",
        "custom_field1": {
            "name": "NAME",
            "value": "VALUE"
        },
        "custom_field2": {
            "name": "NAME",
            "value": "VALUE"
        },
        "folderDocumentIds": [
            51897
        ],
        "documentsList": [
            {
                "documentId": 51897,
                "contractId": 51897,
                "companyId": 86,
                "contractCreatedBy": 15603,
                "contractCreatedOn": 1580240967000,
                "contractType": null,
                "contractStatus": "WAITING_FOR_SIGNATURE",
                "editable": false,
                "contractVersionId": 26809,
                "contractVersionName": "fw4",
                "contractVersionDesc": "this is a non editable form W4",
                "versionCreatedby": 15603,
                "versionCreatedOn": 1580240967000,
                "contractVersionNumber": 1,
                "contractTransactionSource": null
            }
        ],
        "folderRecipientParties": [
            {
                "partyId": 15573,
                "partyDetails": {
                    "partyId": 15573,
                    "firstName": "ABC",
                    "lastName": "XYZ",
                    "emailId": "abc@xyz.com",
                    "address": "",
                    "dateCreated": 1530046694000,
                    "optOutEmails": false,
                    "companyId": 86,
                    "userRole": "admin",
                    "userAddedDate": 1550638146000,
                    "department": "",
                    "title": "",
                    "active": true,
                    "requestLocale": "auto",
                    "share_among_department": false,
                    "dialingCode": "+1",
                    "mobileNumber": null,
                    "docStatusFilter": "all",
                    "docDateFilter": "last60",
                    "managerId": null
                },
                "contractPermissions": "FILL_FIELDS_AND_SIGN",
                "partySequence": 1,
                "workflowSignSequence": 1,
                "envelopeId": 0,
                "sharingMode": "direct",
                "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=gayQGLXYdB491iyhRYf25g%3D%3D&partyId=15573",
                "securityMode": "none",
                "extraComments": null,
                "allowNameChange": false,
                "signerNameUpdated": false,
                "signatureId": null
            },
            {
                "partyId": 15603,
                "partyDetails": {
                    "partyId": 15603,
                    "firstName": "PartyFirstName2",
                    "lastName": "PartyLasrName2",
                    "emailId": "mno@xyz.com",
                    "address": "",
                    "dateCreated": 1536713561000,
                    "optOutEmails": false,
                    "companyId": 86,
                    "userRole": "super_admin",
                    "userAddedDate": 1536713561000,
                    "department": "",
                    "title": "",
                    "active": true,
                    "requestLocale": "auto",
                    "share_among_department": false,
                    "dialingCode": "+1",
                    "mobileNumber": null,
                    "docStatusFilter": "all",
                    "docDateFilter": "last30",
                    "managerId": null
                },
                "contractPermissions": "FILL_FIELDS_AND_SIGN",
                "partySequence": 2,
                "workflowSignSequence": 2,
                "envelopeId": 0,
                "sharingMode": "direct",
                "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=gayQGLXYdB491iyhRYf25g%3D%3D&partyId=15603",
                "securityMode": "none",
                "extraComments": null,
                "allowNameChange": false,
                "signerNameUpdated": false,
                "signatureId": null
            }
        ],
        "folderAccessURLForAuthor": null,
        "bulkId": 0,
        "enforceSignWorkflow": false,
        "currentWorkflowStep": 1,
        "transactionSource": "API-5-via_draft_send",
        "editable": false,
        "inPersonSignable": false,
        "overrideAccountReminders": false,
        "overrideAccountRecipientDelegation": false,
        "allowRecipientsToDelegate": false,
        "envelopeId": 51798,
        "envelopeName": "fW4",
        "envelopeOriginatorId": 15603,
        "envelopeCompanyId": 86,
        "envelopeDate": 1580240968000,
        "envelopeSharedDate": 1580460679339,
        "envelopeStatus": "SHARED",
        "envelopeContractIds": [
            51897
        ],
        "envelopePartyPermissions": [
            {
                "partyId": 15573,
                "partyDetails": {
                    "partyId": 15573,
                    "firstName": "ABC",
                    "lastName": "XYZ",
                    "emailId": "abc@xyz.com",
                    "address": "",
                    "dateCreated": 1530046694000,
                    "optOutEmails": false,
                    "companyId": 86,
                    "userRole": "admin",
                    "userAddedDate": 1550638146000,
                    "department": "",
                    "title": "",
                    "active": true,
                    "requestLocale": "auto",
                    "share_among_department": false,
                    "dialingCode": "+1",
                    "mobileNumber": null,
                    "docStatusFilter": "all",
                    "docDateFilter": "last60",
                    "managerId": null
                },
                "contractPermissions": "FILL_FIELDS_AND_SIGN",
                "partySequence": 1,
                "workflowSignSequence": 1,
                "envelopeId": 0,
                "sharingMode": "direct",
                "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=gayQGLXYdB491iyhRYf25g%3D%3D&partyId=15573",
                "securityMode": "none",
                "extraComments": null,
                "allowNameChange": false,
                "signerNameUpdated": false,
                "signatureId": null
            },
            {
                "partyId": 15603,
                "partyDetails": {
                    "partyId": 15603,
                    "firstName": "PartyFirstName2",
                    "lastName": "PartyLasrName2",
                    "emailId": "mno@xyz.com",
                    "address": "",
                    "dateCreated": 1536713561000,
                    "optOutEmails": false,
                    "companyId": 86,
                    "userRole": "super_admin",
                    "userAddedDate": 1536713561000,
                    "department": "",
                    "title": "",
                    "active": true,
                    "requestLocale": "auto",
                    "share_among_department": false,
                    "dialingCode": "+1",
                    "mobileNumber": null,
                    "docStatusFilter": "all",
                    "docDateFilter": "last30",
                    "managerId": null
                },
                "contractPermissions": "FILL_FIELDS_AND_SIGN",
                "partySequence": 2,
                "workflowSignSequence": 2,
                "envelopeId": 0,
                "sharingMode": "direct",
                "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=gayQGLXYdB491iyhRYf25g%3D%3D&partyId=15603",
                "securityMode": "none",
                "extraComments": null,
                "allowNameChange": false,
                "signerNameUpdated": false,
                "signatureId": null
            }
        ],
        "envelopeAuthenticationLevel": "NO",
        "allowSingleSignerInBulk": false
    },
    "result": "success",
    "message": "folder of document(s) successfully created"
}
		

Sending Signature Reminders

With Foxit eSign API, you can send reminders to the signers by calling /folders/signaturereminder with the given parameters.


/folders/signaturereminder
application/json

REQUEST
{
		"folderId":51798
}
		
Parameter Description
folderId (required) Folder id for which you want to send signature reminders.

RESPONSE
{
    
    "result": "success",
    "reminder sent": 51798
}
		
Code Samples
curl -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
    "folderId":219
}' "https://{{HOST_NAME}}/api/folders/signaturereminder"
						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/signaturereminder",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  	"folderId":219
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
var webAddr = "https://{{HOST_NAME}}/api/folders/signaturereminder";

            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+ "}";
                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/signaturereminder/";
		    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}";
		
			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();
						

Cancel Folder

With Foxit eSign API, you can cancel/decline to sign documents by calling /folders/cancelFolder with the given parameters.


/folders/cancelFolder
application/json

REQUEST
{
	"folderId":51798,
	"reason_for_cancellation":"REASON_FOR_CANCELLATION"
}
		
Parameter Description
folderId (required) Folder id you want to use to cancel this folder.
reason_for_cancellation (required) Reason for Cancellation of the folder

RESPONSE
{
    "result": "success",
    "folders cancelled": 51798
}
		
Code Samples
curl -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
    "folderId":219,
    "reason_for_cancellation":"[REASON]"
}' "https://{{HOST_NAME}}/api/folders/cancelFolder"
						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/cancelFolder",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  	"folderId":219,
  	"reason_for_cancellation":"REASON_FOR_CANCELLATION"
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
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. Responsive image

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"	
			   },
	....
	}
	
}
						
RESPONSE
{
    "result": "success",
    "custom_field1":{
		"name":"NAME",
		"value":"VALUE"
	},

	"custom_field2":{
		"name":"NAME",
		"value":"VALUE"
  	},
    "allFieldsNameValue": [
        {
            "fieldId": 44796,
            "documentId": 4096,
            "documentVersionId": 4180,
            "fieldType": "textfield",
            "name": "FIELD1_NAME",
            "value": "VALUE"
        },
        {
            "fieldId": 44797,
            "documentId": 4096,
            "documentVersionId": 4180,
            "fieldType": "textfield",
            "name": "FIELD2_NAME",
            "value": "VALUE"
        }
    ]
}
					

Update Folder Recipients


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.

 /folders/updateFolder
application/json


Request
{
	"folderId":FOLDER_ID,
	"allowAdvancedEmailValidation":true,
	"parties":[
        {
			"action": "update",
			"sequence":2,
			"firstName": "UPDATEDFIRSTNAME",
			"lastName": "UPDATEDLASTNAME ",
			"emailId": "UPDATEDEMAILID",
			"dialingCode": "+1",
			"mobileNumber": "9999999999"
		},
		{
			"action": "change",
			"sequence":3,
			"firstName": "UPDATEDFIRSTNAME",
			"lastName": "UPDATEDLASTNAME",
			"emailId": "UPDATEDEMAILID",
			"dialingCode": "+1",
			"mobileNumber": "9999999999"
		},
		...
	]
}
						
Parameter Description
folderId (required) Folder id you want to use to update recipients details
allowAdvancedEmailValidation (Optional) (default=false) 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.

RESPONSE
{
    "parties": [
        {
            "Status": "Successfully Updated recipient party.",
            "partyDetails": {
                "partyId": 11111,
                "firstName": "UPDATEDFIRSTNAME",
                "lastName": "UPDATEDLASTNAME",
                "emailId": "UPDATEDEMAILID",
                "address": null,
                "dateCreated": null,
                "optOutEmails": false,
                "authenticationLevel": "NO",
                "companyId": COMPANY_ID,
                "subcontractorDescription": null,
                "subcontractorOrganization": null,
                "subcAddedDate": 1610516820000,
                "dialingCode": "+1",
                "mobileNumber": "9999999999",
                "placeholder": false
            }
        },
        {
            "Status": "Recipient replaced successfully.",
            "partyDetails": {
                "partyId": 22222,
                "firstName": "UPDATEDFIRSTNAME",
                "lastName": "UPDATEDLASTNAME",
                "emailId": "UPDATEDEMAILID",
                "address": null,
                "dateCreated": null,
                "optOutEmails": false,
                "authenticationLevel": "NO",
                "companyId": COMPANY_ID,
                "subcontractorDescription": null,
                "subcontractorOrganization": null,
                "subcAddedDate": 1610516820000,
                "dialingCode": "+1",
                "mobileNumber": "9999999999",
                "placeholder": false
            }
        }
    ],
    "folderId": FOLDER_ID
}
					

Regenerate Expired Embedded Signing Session Token


You can regenerate the expired folder embedded signing token for accessing the signature from the signer.

 /embedded/regenerateEmbeddedSigningSession
application/json


Request Parameters
{
    "folderId":FOLDER_ID,
    "emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
    "partyId":RECIPIENT_PARTY_Id
    "sessionExpire":true,
    "expiry":60000000
}
						
Parameter Description
folderId (required) 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.

Response
{
	"emailIdOfSigner": "EMAIL_ID_OF_RECIPIENT_PARTY",
	"embeddedToken": "EMBEDDED_TOKEN",
	"embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
}
						

Get Folder Data


You can poll our API to get the folder/document data

 /folders/myfolder?folderId={FOLDER_ID}


Request Parameters
folderId Your FOLDER_ID

RESPONSE
{
  "result": "success",
  "folder": {
    "folderId": 86377,
    "folderName": "eSignGenie Sample",
    "folderAuthorId": 1,
    "folderAuthorFirstName": "ABC",
    "folderAuthorLastName": "XYZ",
    "folderAuthorEmail": "abc@xyz.com",
    "folderAuthorRole": "admin",
    "folderCompanyId": 12,
    "folderCreationDate": 1473332678000,
    "folderSentDate": null,
    "folderStatus": "EXECUTED",
    "folderDocumentIds": [
      101857
    ],
    "documentsList": [
      {
        "documentId": 101857,
        "contractId": 101857,
        "companyId": 12,
        "contractCreatedBy": 1,
        "contractCreatedOn": 1473332676000,
        "contractType": "Sample",
        "contractStatus": "EXECUTED",
        "editable": false,
        "contractVersionId": 101715,
        "contractVersionName": "Foxit eSign Sample",
        "contractVersionDesc": "Foxit eSign Sample Document",
        "versionCreatedby": 1,
        "versionCreatedOn": 1473332676000,
        "contractVersionNumber": 1
      }
    ],
    "folderRecipientParties": [
      {
        "partyId": 1,
        "partyDetails": {
          "partyId": 1,
          "firstName": "John",
          "lastName": "Doe",
          "emailId": "johndoe@esigngenie.com",
          "address": "Delhi",
          "dateCreated": 1404837207000
        },
        "contractPermissions": "FILL_FIELDS_AND_SIGN",
        "partySequence": 1,
        "workflowSignSequence": 1,
        "envelopeId": 86377,
        "sharingMode": "email",
        "folderAccessURL": null,
        "securityMode": "none",
        "extraComments": null
      },
      {
        "partyId": 28,
        "partyDetails": {
          "partyId": 28,
          "firstName": "Jane",
          "lastName": "Doe",
          "emailId": "janedoe@esigngenie.com",
          "address": "",
          "dateCreated": 1404837216000
        },
        "contractPermissions": "FILL_FIELDS_AND_SIGN",
        "partySequence": 2,
        "workflowSignSequence": 2,
        "envelopeId": 86377,
        "sharingMode": "email",
        "folderAccessURL": null,
        "securityMode": "none",
        "extraComments": null
      }
    ],
    "folderAccessURLForAuthor": null,
    "bulkId": 0,
    "enforceSignWorkflow": false,
    "currentWorkflowStep": 0,
    "transactionSource": "eSignGenie WebApp",
    "editable": false,
    "inPersonSignable": false,
    "overrideAccountReminders": false,
    "envelopeId": 86377,
    "envelopeName": "eSignGenie Sample",
    "envelopeOriginatorId": 1,
    "envelopeCompanyId": 12,
    "envelopeDate": 1473332678000,
    "envelopeSharedDate": null,
    "envelopeStatus": "DRAFT",
    "envelopeContractIds": [
      101857
    ],
    "envelopePartyPermissions": [
      {
        "partyId": 1,
        "partyDetails": {
          "partyId": 1,
          "firstName": "John",
          "lastName": "Doe",
          "emailId": "johndoe@esigngenie.com",
          "address": "Delhi",
          "dateCreated": 1404837207000
        },
        "contractPermissions": "FILL_FIELDS_AND_SIGN",
        "partySequence": 1,
        "workflowSignSequence": 1,
        "envelopeId": 86377,
        "sharingMode": "email",
        "folderAccessURL": null,
        "securityMode": "none",
        "extraComments": null
      },
      {
        "partyId": 28,
        "partyDetails": {
          "partyId": 28,
          "firstName": "Jane",
          "lastName": "Doe",
          "emailId": "janedoe@esigngenie.com",
          "address": "",
          "dateCreated": 1404837216000
        },
        "contractPermissions": "FILL_FIELDS_AND_SIGN",
        "partySequence": 2,
        "workflowSignSequence": 2,
        "envelopeId": 86377,
        "sharingMode": "email",
        "folderAccessURL": null,
        "securityMode": "none",
        "extraComments": null
      }
    ]
  },
  "allFields": [
    {
      "fieldTagId": 898441,
      "contractId": 101857,
      "versionId": 101715,
      "templateId": 0,
      "companyId": 12,
      "fieldType": "textfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.14267,
      "coordinateYRatio": 0.421053,
      "elementWidthRatio": 0.212766,
      "elementHeightRatio": 0.0205592,
      "docFieldId": "898441",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "textfieldName": "Name of party",
      "value": "",
      "description": "",
      "partyResponsible": 1,
      "required": false,
      "multiLine": false,
      "fontSize": 8,
      "fontFamily": "default",
      "fontColor": "#000000",
      "readOnly": false,
      "systemField": false
    },
    {
      "fieldTagId": 898443,
      "contractId": 101857,
      "versionId": 101715,
      "templateId": 0,
      "companyId": 12,
      "fieldType": "signfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.505436,
      "coordinateYRatio": 0.73602,
      "elementWidthRatio": 0.212766,
      "elementHeightRatio": 0.0246711,
      "docFieldId": "898443",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "partyResponsible": 1,
      "signatureId": null
    },
    {
      "fieldTagId": 898445,
      "contractId": 101857,
      "versionId": 101715,
      "templateId": 0,
      "companyId": 12,
      "fieldType": "signfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.505436,
      "coordinateYRatio": 0.797697,
      "elementWidthRatio": 0.212766,
      "elementHeightRatio": 0.0246711,
      "docFieldId": "898445",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "partyResponsible": 28,
      "signatureId": null
    },
    {
      "fieldTagId": 898447,
      "contractId": 101857,
      "versionId": 101715,
      "templateId": 0,
      "companyId": 12,
      "fieldType": "datefield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.518202,
      "coordinateYRatio": 0.422697,
      "elementWidthRatio": 0.212766,
      "elementHeightRatio": 0.0205592,
      "docFieldId": "898447",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "datefieldName": "date of contract",
      "value": "",
      "description": "",
      "partyResponsible": 28,
      "required": false,
      "dateFormat": "DD-MMM-YYYY",
      "readOnly": false,
      "systemField": false
    },
    {
      "fieldTagId": 898449,
      "contractId": 101857,
      "versionId": 101715,
      "templateId": 0,
      "companyId": 12,
      "fieldType": "checkboxfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.453309,
      "coordinateYRatio": 0.578125,
      "elementWidthRatio": 0.0212766,
      "elementHeightRatio": 0.0164474,
      "docFieldId": "898449",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "cbname": "",
      "description": "",
      "partyResponsible": 28,
      "cbgroup": "",
      "checked": false,
      "oneCbMandatoryInGroup": false,
      "multiCheckGroup": false,
      "displayAsRadioButton": false
    },
    {
      "fieldTagId": 898451,
      "contractId": 101857,
      "versionId": 101715,
      "templateId": 0,
      "companyId": 12,
      "fieldType": "checkboxfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.580851,
      "coordinateYRatio": 0.578947,
      "elementWidthRatio": 0.0212766,
      "elementHeightRatio": 0.0164474,
      "docFieldId": "898451",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "cbname": "",
      "description": "",
      "partyResponsible": 28,
      "cbgroup": "",
      "checked": false,
      "oneCbMandatoryInGroup": false,
      "multiCheckGroup": false,
      "displayAsRadioButton": false
    },
    {
      "fieldTagId": 1724179,
      "contractId": 101857,
      "versionId": 101715,
      "templateId": 0,
      "companyId": 12,
      "fieldType": "dropdownfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.509028,
      "coordinateYRatio": 0.354372,
      "elementWidthRatio": 0.205761,
      "elementHeightRatio": 0.0206677,
      "docFieldId": "1486624780052513",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "dropdownFieldName": "Month",
      "description": "",
      "value": "January",
      "dropdownOptions": "df~||~as~||~aasd sa~||~dsd~||~Option 1~||~~||~January",
      "dropdownNoOfOptions": 0,
      "partyResponsible": 0
    }
  ],
  "allFieldsNameValue": [
    {
      "fieldId": 898441,
      "documentId": 101857,
      "documentVersionId": 101715,
      "fieldType": "textfield",
      "name": "Name of party",
      "value": ""
    },
    {
      "fieldId": 898443,
      "documentId": 101857,
      "documentVersionId": 101715,
      "fieldType": "signfield"
    },
    {
      "fieldId": 898445,
      "documentId": 101857,
      "documentVersionId": 101715,
      "fieldType": "signfield"
    },
    {
      "fieldId": 898447,
      "documentId": 101857,
      "documentVersionId": 101715,
      "fieldType": "datefield",
      "name": "date of contract",
      "value": ""
    },
    {
      "fieldId": 898449,
      "documentId": 101857,
      "documentVersionId": 101715,
      "fieldType": "checkboxfield",
      "name": "",
      "value": "No"
    },
    {
      "fieldId": 898451,
      "documentId": 101857,
      "documentVersionId": 101715,
      "fieldType": "checkboxfield",
      "name": "",
      "value": "No"
    },
    {
      "fieldId": 1724179,
      "documentId": 101857,
      "documentVersionId": 101715,
      "fieldType": "dropdownfield",
      "name": "Month",
      "value": "January"
    }
  ],
  "Folder History": [
    {
      "firstName": "John",
      "lastName": "Doe",
      "email": "johndoe@esigngenie.com",
      "envelopeId": 86377,
      "dateChanged": 1564737942000,
      "changeDoneByParty": 1,
      "action": "Created"
    },
    {
      "firstName": "John",
      "lastName": "Doe",
      "email": "johndoe@esigngenie.com",
      "envelopeId": 86377,
      "dateChanged": 1564737997000,
      "changeDoneByParty": 1,
      "action": "InviteSentTo"
    },
    {
      "firstName": "Jane",
      "lastName": "Doe",
      "email": "janedoe@esigngenie.com",
      "envelopeId": 86377,
      "dateChanged": 1564738073000,
      "changeDoneByParty": 28,
      "action": "InviteAccepted"
    },
    {
      "firstName": "Jane",
      "lastName": "Doe",
      "email": "janedoe@esigngenie.com",
      "envelopeId": 86377,
      "dateChanged": 1564738091000,
      "changeDoneByParty": 28,
      "action": "Signed"
    },
    {
      "firstName": "Jane",
      "lastName": "Doe",
      "email": "janedoe@esigngenie.com",
      "envelopeId": 86377,
      "dateChanged": 1564738092000,
      "changeDoneByParty": 1,
      "action": "InviteSentTo"
    }
  ]
}
						

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/folders/myfolder?folderId=179"
								
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/myfolder?folderId=179",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
								
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 Folder Status and Date


You can poll our API to get the folderIds data

 /folders/getAllFolderIdsByStatus?status={Folder Status}&dateFrom={Date from}&dateTo={Date To}


Request Parameters
Parameter Description
status (optional) 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
    ]
}
						

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/folders/getAllFolderIdsByStatus?status=SHARED&dateFrom=2021-08-15&dateTo=2021-12-14"
								
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/getAllFolderIdsByStatus?status=SHARED&dateFrom=2021-08-15&dateTo=2021-12-14",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
								
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();
								

Get Activity History


You can poll our API to get the folder history

 /folders/viewActivityHistory?folderId={FOLDER_ID}


Request Parameters
folderId Your FOLDER_ID

RESPONSE
{
  "result": "success",
  "details": {
        "folderId": 11111,
        "enclosedDocuments": "eSignGenie Sample",
        "envelopeRecipients": "ABC XYZ",
        "author": "ESG API",
        "status": "SHARED",
        "latestActivityDate": "12 Feb 2021, 11:44:06, IST",
        "dateCreated": "02 Feb 2021, 23:33:50, IST",
        "dateSent": "12 Feb 2021, 11:44:06, IST",
        "activities": [
            {
                "activity": "ESG API created this folder",
                "ipAddress": null,
                "folderStatus": "CREATED",
                "action": "Created",
                "time": "02 Feb 2021, 23:33:50, IST",
                "source": "Web",
                "user": "ESG API"
            },
            {
                "activity": "Invitation sent to ABC XYZ (test@test.com)",
                "ipAddress": null,
                "folderStatus": "SHARED",
                "action": "Invitation Sent",
                "time": "12 Feb 2021, 11:44:06, IST",
                "source": "Web",
                "user": "ABC XYZ"
            },
            {
                "activity": "Invitation accepted by ABC XYZ",
                "ipAddress": null,
                "folderStatus": "SHARED",
                "action": "Opened",
                "time": "12 Feb 2021, 11:46:45, IST",
                "source": "Web",
                "user": "ABC XYZ"
            },
            {
                "activity": "Folder viewed by ESG API (test@test1.com)",
                "ipAddress": null,
                "folderStatus": "SHARED",
                "action": "Viewed",
                "time": "12 Feb 2021, 11:44:07, IST",
                "source": "Web",
                "user": "ESG API"
            },
            {
                "activity": "Folder viewed by ABC XYZ (test@test.com)",
                "ipAddress": null,
                "folderStatus": "SHARED",
                "action": "Viewed",
                "time": "12 Feb 2021, 11:46:45, IST",
                "source": "Web",
                "user": "ABC XYZ"
            },
            {
                "activity": "Folder viewed by ABC XYZ (test@test.com)",
                "ipAddress": null,
                "folderStatus": "SHARED",
                "action": "Viewed",
                "time": "12 Feb 2021, 11:51:03, IST",
                "source": "Web",
                "user": "ABC XYZ"
            },
            {
                "activity": "Folder viewed by ABC XYZ (test@test.com)",
                "ipAddress": null,
                "folderStatus": "SHARED",
                "action": "Viewed",
                "time": "12 Feb 2021, 11:52:01, IST",
                "source": "Web",
                "user": "ABC XYZ"
            },
            {
                "activity": "Folder viewed by ESG API (test@test1.com)",
                "ipAddress": null,
                "folderStatus": "SHARED",
                "action": "Viewed",
                "time": "15 Feb 2021, 14:01:19, IST",
                "source": "Web",
                "user": "ESG API"
            },
            {
                "activity": "Folder viewed by ESG API (test@test1.com)",
                "ipAddress": null,
                "folderStatus": "SHARED",
                "action": "Viewed",
                "time": "15 Feb 2021, 15:08:35, IST",
                "source": "Web",
                "user": "ESG API"
            }
        ]
    }
}
						

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/folders/viewActivityHistory?folderId=11111"
								
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/viewActivityHistory?folderId=11111",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
								
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


Sample Code
var webAddr = "https://{{HOST_NAME}}/api/folders/download?folderId=" + FOLDER_ID +"&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/download?folderId="+fid;
	    String saveDir = "D:\\";
	            
	    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 {
                   
                    fileName = fileURL.substring(fileURL.lastIndexOf("/") + 1,
                            fileURL.length());
                }
     
               System.out.println("Content-Type = " + contentType);
                InputStream inputStream = httpConn.getInputStream();
                String saveFilePath = saveDir + File.separator + "abc.zip";
                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 line1 = null;
              while ((line1 = reader.readLine()) != null) {
                  response.add(line1);
              }
              
              reader.close();
              httpConn.disconnect();
              
        }
							

Download a Document


You can download the individual document as a pdf file.

 /folders/document/download?folderId={FOLDER_ID}&docNumber={DOC_NUMBER}


Request Parameters
folderId Your FOLDER_ID
docNumber The document index starts from 1, whose PDF you want to download.

Response

Returns PDF file binary stream of the document, which you can save as a PDF file.


Sample Code
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
RESPONSE
{
	"result":"success"
}
Code Samples
curl -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
    "folderIds":[219]
}' "https://{{HOST_NAME}}/api/folders/movetorecyclebin"
						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/movetorecyclebin",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  	"folderIds":[219]
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
var webAddr = "https://{{HOST_NAME}}/api/folders/movetorecyclebin";

            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 = @"{""folderIds"":["+ FOLDERIDSTODELETE+ "]}";
                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/movetorecyclebin/";
		    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="{\"folderIds\":[FOLDER_ID_1,FOLDER_ID_2]}";
		
			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();
						

Delete your Document(s) from Foxit eSign


Using Foxit eSign API, you can permanently remove your document(s) folders from Foxit eSign systems.

 /folders/delete
application/json


REQUEST
{
	"folderIds":[219]
}
Parameter Description
folderIds An array of folder IDs that you want to delete permanently.
RESPONSE
{
	"result":"success"
}
Code Samples
curl -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
    "folderIds":[219]
}' "https://{{HOST_NAME}}/api/folders/delete"
						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/delete",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  	"folderIds":[219]
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
var webAddr = "https://{{HOST_NAME}}/api/folders/delete";

            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 = @"{""folderIds"":["+ FOLDERIDSTODELETE+ "]}";
                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/delete/";
		    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="{\"folderIds\":[FOLDER_ID_1,FOLDER_ID_2]}";
		
			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();
						

Get Deleted Folder History


You can poll our API to get the deleted folder history

 folders/deletedLog?folderId={FOLDER_ID}


Request Parameters
folderId Your FOLDER_ID

RESPONSE
{
    "result": "success",
    "Deleted Folder Log Info": [
        {
            "folderName": "dummy",
            "documentName": "dummy",
            "folderId": 61697,
            "documentId": "62420",
            "deletionDate": 1613713332000,
            "deletedBy": "Dhananjay Vermaw"
        }
    ],
    "Deleted Folder Log History": [
        {
            "partiesName": "Dhananjay Vermaw",
            "source": "API",
            "event": "Delete All Parties From Folder"
        },
        {
            "partiesName": "Dhananjay Vermaw",
            "source": "API",
            "event": "Delete All Invitation"
        },
        {
            "partiesName": "Dhananjay Vermaw",
            "source": "API",
            "event": "Delete All Folder Contracts"
        },
        {
            "partiesName": "Dhananjay Vermaw",
            "source": "API",
            "event": "Removing Signature Certificate"
        },
        {
            "partiesName": "Dhananjay Vermaw",
            "source": "API",
            "event": "Delete All Folder History"
        },
        {
            "partiesName": "Dhananjay Vermaw",
            "source": "API",
            "event": "Delete Folder"
        }
    ]
}
						

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/folders/deletedLog?folderId=61692"
								
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/folders/deletedLog?folderId=61692",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
								
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.

Responsive image

  1. Field Type: One of 'textfield', 'signfield', 'initialfield', 'datefield', 'checkboxfield', 'attachmentfield', 'imagefield', 'accept', 'decline' or short notations.
  2. 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.
  3. Required/Optional Field: 'y' makes the field mandatory to be filled before signing while 'n' makes it optional.
  4. 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.
  5. 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

${textfield:1:y:field_name:90:20:12:Numbers:14:gray}

Pre-Filled Value

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.

${textfield:1:y:field_name:90:20:12:Numbers:14:gray:default_value}
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.

${t:1:y:field_name:90:20:12:Numbers:14:gray:default_value:parent_field_name:value_of_parent_field:options}
Column Description
parent_field_name 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_fieldValue 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

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} - A checkbox assigned to party number 2 with initial value as checked with name 'male' and group 'gender'.
  • ${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.
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.

Responsive image

  1. Tag Type: Accepts only value as rp, which is an identifier of recipient party tags.
  2. Party First Name: First name of the recipient party.
  3. Party Last Name: Last name of the recipient party.
  4. Party email: Email of the recipient party.
  5. 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
  6. 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.
  7. 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.

  1. 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
  2. x - (int) the x location coordinate of the top left corner of the field in pixels
  3. y - (int) the y location coordinate of the top left corner of the field in pixels
  4. width - (int) the width of the field in pixel
  5. height - (int) the height of the field in pixel
  6. 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.
    • customValidationValue - (URLEncoded UTF-8 Javascript Regular Expression only)
    • customValidationMsg - (string)
  • 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)

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.


1. When using file URLs

/templates/createtemplate
application/json

REQUEST
{
	"templateUrl":"URL_TO_DOCUMENT",
	"templateName":"template.pdf",
	"processTextTags":true,
	"processAcroFields":true,
	"numberOfParties":2,
	"themeColor":"#f4e542",
	"createEmbeddedTemplateSession":true,
 	"shareAll":true,
 	"authorEmail":"author@example.com",
	"redirectURL":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":50,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"optional name",
			"tooltip":"",
			"value":"optional value",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"

		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                       "type":"formulafield",
                       "formulafieldName":"Formula_Field_Name",
                       "formula":"[n1] + [n2]",
                       "fontSize":8,
                       "fontFamily":"default",
                       "fontColor":"#000000",
                       "documentNumber":1,
                       "pageNumber":1,
                       "x":100,
                       "y":280,
                       "tabOrder":1,
                       "width":50,
                       "height":100,
                       "party": 1,
                       "decimalPlaces": 2
                },
		{
			"type":"text",
			"x":552,
			"y":150,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"RegexValidation",
   			"customValidationType":"Warning",
   			"customValidationValue":"%2F%28%3F%3A%5Cd%7B3%7D%7C%5C%28%5Cd%7B3%7D%5C%29%29%28%5B-%5C%2F%5C.%5D%29%5Cd%7B3%7D%5C1%5Cd%7B4%7D%2F",
   			"customValidationMsg":"Phone Number Validation"
   			"hideFieldNameForRecipients":false
		},
		{
			"type":"signature",
			"x":200,
			"y":150,
			"width":100,
			"height":50,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"dropdown",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"pageNumber":1,
			"party":1,
			"value":"US",
			"options":["UK","Canada","Australia","US","France"]
		},
		{
			"type":"attachment",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"party":1,
			"required":true,
			"name":"optional name"
			
		},
		{
			"type":"text",
			"textfieldName": "Signer Name",
			"x":300,
			"y":250,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"Signer Name",
			"characterLimit":100,
		 	"partyResponsible": 1,
			"required": true,
			"fontSize": 12,
			"fontFamily": "default",
			"fontColor": "#000000",
			"readOnly": true,
			"systemField": true
		},
		{
			"type":"accept",
			"party":1,
			"pageNumber":1,
			"x":350,
			"y":505,
			"width":90,
			"height":20
		},
		{
			"type":"decline",
			"party":1,
			"pageNumber":1,
			"x":420,
			"y":505,
			"width":90,
			"height":20
		},		
		{
			"type": "date",
			"x":220,
			"y":150,
			"width":60,
			"height":20,
			"documentNumber":1,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"Date Signed",
			"required":true,
			"fontSize":12,
			"dateFormat": "MM-DD-YYYY",
			"readOnly": true,
			"systemField": true
		}
		],
		"parties":[
		{
			"permission":"FILL_FIELDS_AND_SIGN",
			"sequence":1,
			"partyRole":"PARTY_ROLE"
		},
		....
	]
	
}
						
Parameter Description
templateName (required) Name of the document(s) template
inputType (optional)
Default url
Value can be either url or base64
templateUrl (required if inputType is url) 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.
hideExistingContactSelectOption (optional, default=false) If true, it will hide the "Find and Add Existing Contact" input box on Recipient Parties in an embedded template session.
hideFieldNameForRecipients (optional, default=false) 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.

RESPONSE
{

    "embeddedToken": "EMBEDDED_TOKEN",
    "embeddedTemplateSessionURL": "UNIQUE_EMBEDDED_SESSION_URL",
    "template": {
        "templateId": 174,
        "templateName": "testTemplate",
        "templateDesc": null,
        "templateType": null,
        "templateCreationDate": null,
        "templateLastUpdateDate": null,
        "editable": false,
        "numberOfParties": 1,
        "totalPages": 0,
        "companyId": 50,
        "templateCreatedBy": {
            "partyId": 3062,
            "firstName": "Govind",
            "lastName": "Bhandari",
            "emailId": "gbhandari@esigngenie.com",
            "address": "",
            "dateCreated": 1503527343000,
            "optOutEmails": false,
            "companyId": 50,
            "userRole": "super_admin",
            "userAddedDate": 1504550757000,
            "department": "",
            "title": "",
            "active": true,
            "requestLocale": "en",
            "share_among_department": false,
            "managerId": null
        },
        "templateLastUpdatedBy": {
            "partyId": 3062,
            "firstName": "Govind",
            "lastName": "Bhandari",
            "emailId": "gbhandari@esigngenie.com",
            "address": "",
            "dateCreated": 1503527343000,
            "optOutEmails": false,
            "companyId": 50,
            "userRole": "super_admin",
            "userAddedDate": 1504550757000,
            "department": "",
            "title": "",
            "active": true,
            "requestLocale": "en",
            "share_among_department": false,
            "managerId": null
        },
        "shareAll": false,
        "templateCustomName": ""
    },
    "result": "success",
    "message": "template successfully created"
}
						

Sample Code (creating a template from file URL)
echo '{
	"templateUrl":"URL_TO_DOCUMENT",
	"templateName":"template.pdf",
	"processTextTags":true,
	"processAcroFields":true,
	"numberOfParties":2,
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":50,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"optional name",
			"tooltip":"",
			"value":"optional value",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"

		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                        "type":"formulafield",
                        "formulafieldName":"Formula_Field_Name",
                        "formula":"[n1] + [n2]",
                        "fontSize":8,
                        "fontFamily":"default",
                        "fontColor":"#000000",
                        "documentNumber":1,
                        "pageNumber":1,
                        "x":100,
                        "y":280,
                        "tabOrder":1,
                        "width":50,
                        "height":100,
                        "party": 1,
                        "decimalPlaces": 2
                },
		{
			"type":"text",
			"x":552,
			"y":150,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers"
		},
		{
			"type":"signature",
			"x":200,
			"y":150,
			"width":100,
			"height":50,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"dropdown",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"pageNumber":1,
			"party":1,
			"value":"US",
			"options":["UK","Canada","Australia","US","France"]
		}
		]
	
}' | curl https://{{HOST_NAME}}/api/templates/createtemplate \
-i \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json;charset=UTF-8" \
-d @- \
-X POST
						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/templates/createtemplate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS =>  '{
	"templateUrl":"URL_TO_DOCUMENT",
	"templateName":"template.pdf",
	"processTextTags":true,
	"processAcroFields":true,
	"numberOfParties":2,
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":50,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"optional name",
			"tooltip":"",
			"value":"optional value",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"

		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                        "type":"formulafield",
                        "formulafieldName":"Formula_Field_Name",
                        "formula":"[n1] * [n2]",
                        "fontSize":8,
                        "fontFamily":"default",
                        "fontColor":"#000000",
                        "documentNumber":1,
                        "pageNumber":1,
                        "x":100,
                        "y":280,
                        "tabOrder":1,
                        "width":50,
                        "height":100,
                        "party": 1,
                        "decimalPlaces": 2
                },
		{
			"type":"text",
			"x":552,
			"y":150,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers"
		},
		{
			"type":"signature",
			"x":200,
			"y":150,
			"width":100,
			"height":50,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"dropdown",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"pageNumber":1,
			"party":1,
			"value":"US",
			"options":["UK","Canada","Australia","US","France"]
		}
		]
	
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
var webAddr = "https://{{HOST_NAME}}/api/templates/createtemplate";
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 = @"{
	""templateUrl"":""URL_TO_DOCUMENT"",
	""templateName"":""template.pdf"",
	""processTextTags"":true,
	""processAcroFields"":true,
	""numberOfParties"":2,
	   ""fields"":[
		{
			""type"":""text"",
			""x"":100,
			""y"":50,
			""width"":60,
			""height"":20,
			""pageNumber"":1,
			""tabOrder"":1,
			""party"":1,
			""name"":""optional name"",
			""tooltip"":"""",
			""value"":""optional value"",
			""required"":true,
			""characterLimit"":100,
			""fontSize"":12,
			""fontColor"":""#000000"",
			""validation"":""Letters""

		},
		{
			""type"":""text"",
			""x"":552,
			""y"":150,
			""width"":60,
			""height"":20,
			""pageNumber"":1,
			""tabOrder"":1,
			""party"":1,
			""fontSize"":8,
			""fontColor"":""#eee"",
			""validation"":""Numbers""
		},
		{
                        ""type"":""formulafield"",
                        ""formulafieldName"":""Formula_Field_Name"",
                        ""formula"":""[n1] + [n2]"",
                        ""fontSize"":8,
                        ""fontFamily"":""default"",
                        ""fontColor"":""#000000"",
                        ""documentNumber"":1,
                        ""pageNumber"":1,
                        ""x"":100,
                        ""y"":280,
                        ""tabOrder"":1,
                        ""width"":50,
                        ""height"":100,
                        ""party"": 1,
                        ""decimalPlaces"": 2
                },
		{
			""type"":""signature"",
			""x"":200,
			""y"":150,
			""width"":100,
			""height"":50,
			""pageNumber"":1,
			""party"":1
		},
		{
			""type"":""dropdown"",
			""x"":200,
			""y"":250,
			""width"":80,
			""height"":20,
			""pageNumber"":1,
			""party"":1,
			""value"":""US"",
			""options"":[""UK"",""Canada"",""Australia"",""US"",""France""]
		}
		]
}";
                streamWriter.Write(json);
                streamWriter.Flush();
            }

            var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
                var result = streamReader.ReadToEnd();
            }

						
		URL url= new URL("https://{{HOST_NAME}}/api/templates/createtemplate");
		HttpURLConnection con= (HttpURLConnection) url.openConnection();
		con.setDoOutput(true);
		try {
			con.setRequestMethod("POST");
			
		} catch (ProtocolException e) {
			e.printStackTrace();
		}
		con.setRequestProperty("Authorization", "Bearer ACCESS_TOKEN");
		con.setRequestProperty("Content-Type", "application/json");
		String input="{"
				+ "\"templateUrl\":\"URL_TO_DOCUMENT\","
				+ "\"templateName\":\"template.pdf\","
				+ "\"processTextTags\":true,"
				+ "\"processAcroFields\":true,"
				+ "\"numberOfParties\":2,"
				+ "}";	

		OutputStream os = con.getOutputStream();
		os.write(input.getBytes());
		os.flush();
		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();
						

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)
curl https://{{HOST_NAME}}/api/templates/createtemplate \
-i \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: multipart/form-data;charset=UTF-8" \
-F data='
 '{
	"templateName":"template.pdf",
	"processTextTags":true,
	"processAcroFields":true,
	"numberOfParties":2,
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":50,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"optional name",
			"tooltip":"",
			"value":"optional value",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"

		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                        "type":"formulafield",
                        "formulafieldName":"Formula_Field_Name",
                        "formula":"[n1] + [n2]",
                        "fontSize":8,
                        "fontFamily":"default",
                        "fontColor":"#000000",
                        "documentNumber":1,
                        "pageNumber":1,
                        "x":100,
                        "y":280,
                        "tabOrder":1,
                        "width":50,
                        "height":100,
                        "party": 1,
                        "decimalPlaces": 2
                },
		{
			"type":"text",
			"x":552,
			"y":150,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers"
		},
		{
			"type":"signature",
			"x":200,
			"y":150,
			"width":100,
			"height":50,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"dropdown",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"pageNumber":1,
			"party":1,
			"value":"US",
			"options":["UK","Canada","Australia","US","France"]
		}
		]
	
} \
-F file=@FILE_1_TO_UPLOAD \
-X POST						
						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/templates/createtemplate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '
-----011000010111000001101001
Content-Disposition: form-data; name="file"; filename="file1.pdf"
Content-Type: application/octet-stream

'.file_get_contents('/path/to/your/file1').'
-----011000010111000001101001
 Content-Disposition: form-data; name="data"

 '{
	"templateName":"template.pdf",
	"processTextTags":true,
	"processAcroFields":true,
	"numberOfParties":2,
	"fields":[
		{
			"type":"text",
			"x":100,
			"y":50,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"name":"optional name",
			"tooltip":"",
			"value":"optional value",
			"required":true,
			"characterLimit":100,
			"fontSize":12,
			"fontColor":"#000000",
			"validation":"Letters"

		},{
			"type":"image",
			"name":"Image_Field_Name",
			"tooltip":"Image_Field_Description",
			"party":1,
			"required":false,		   
			"tabOrder":1,
			"width":220,
			"height":150,
			"x":350,
			"y":350,
			"documentNumber":1,
			"pageNumber":1		   
		},
		{
                        "type":"formulafield",
                        "formulafieldName":"Formula_Field_Name",
                        "formula":"[n1] + [n2]",
                        "fontSize":8,
                        "fontFamily":"default",
                        "fontColor":"#000000",
                        "documentNumber":1,
                        "pageNumber":1,
                        "x":100,
                        "y":280,
                        "tabOrder":1,
                        "width":50,
                        "height":100,
                        "party": 1,
                        "decimalPlaces": 2
                },
		{
			"type":"text",
			"x":552,
			"y":150,
			"width":60,
			"height":20,
			"pageNumber":1,
			"tabOrder":1,
			"party":1,
			"fontSize":8,
			"fontColor":"#eee",
			"validation":"Numbers"
		},
		{
			"type":"signature",
			"x":200,
			"y":150,
			"width":100,
			"height":50,
			"pageNumber":1,
			"party":1
		},
		{
			"type":"dropdown",
			"x":200,
			"y":250,
			"width":80,
			"height":20,
			"pageNumber":1,
			"party":1,
			"value":"US",
			"options":["UK","Canada","Australia","US","France"]
		}
		]
	
}
-----011000010111000001101001--',

  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
URL url= new URL("https://{{HOST_NAME}}/api/templates/createtemplate");
HttpURLConnection con= (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
String charset="UTF-8";
		
String input="{"
				+ "\"templateName\":\"template.pdf\","
				+ "\"processTextTags\":true,"
				+ "\"processAcroFields\":true,"
				+ "\"numberOfParties\":2,"
				+ "}";	
		
		
File binaryFile = new File("D:\\Sample.pdf");
String boundary = "----"+ Long.toHexString(System.currentTimeMillis()) + "------"; 
String CRLF = "\r\n"; 
con.setRequestProperty("Content-Type","multipart/form-data; boundary=\"" + boundary + "\"");
		
con.setRequestProperty("Authorization", "Bearer ACCESS_TOKEN");
try (
	OutputStream output = con.getOutputStream();
	PrintWriter writer = new PrintWriter(new OutputStreamWriter(output, charset), true);
	) {
		   
	writer.append("--" + boundary).append(CRLF);
			    
	writer.append("Content-Disposition:form-data; name=\"data\"").append(CRLF);
			 
	writer.append(CRLF).append(input).append(CRLF).flush();
    writer.append("--" + boundary).append(CRLF);
	writer.append("Content-Disposition: form-data; name=\"file\"; filename=\"" + binaryFile.getName() + "\"").append(CRLF);
		   
	writer.append("Content-Transfer-Encoding: binary").append(CRLF);
	writer.append(CRLF).flush();
		    
	Files.copy(binaryFile.toPath(), output);
	output.flush();
	writer.append(CRLF).flush(); 
	writer.append("--" + boundary + "--").append(CRLF).flush();
		   
	}
	List<String> response = new ArrayList<String>();
	if (con.getResponseCode()== HttpURLConnection.HTTP_OK) {
	    BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));
		String line = null;
		while ((line = reader.readLine()) != null) {
			response.add(line);
		}
	            
		reader.close();
		con.disconnect();
	} else {
		throw new IOException("Server returned non-OK status: " + con.getResponseCode());
	}
		 
 
System.out.println("Finally Reply from server "+con.getResponseCode());
						
String file = @"C:\test\sample.pdf";
String url = "https://{{HOST_NAME}}/api/templates/createtemplate";
String boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n");

HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(url);
wr.ContentType = "multipart/form-data; boundary=" + boundary;
wr.Method = "POST";
wr.KeepAlive = true;
wr.Credentials = System.Net.CredentialCache.DefaultCredentials;

Stream rs = wr.GetRequestStream();

string json = @"{
	""templateName"":""template.pdf"",
	""processTextTags"":true,
	""processAcroFields"":true,
	""numberOfParties"":2,
	   ""fields"":[
		{
			""type"":""text"",
			""x"":100,
			""y"":50,
			""width"":60,
			""height"":20,
			""pageNumber"":1,
			""tabOrder"":1,
			""party"":1,
			""name"":""optional name"",
			""tooltip"":"""",
			""value"":""optional value"",
			""required"":true,
			""characterLimit"":100,
			""fontSize"":12,
			""fontColor"":""#000000"",
			""validation"":""Letters""

		},
		{
                        ""type"":""formulafield"",
                        ""formulafieldName"":""Formula_Field_Name"",
                        ""formula"":""[n1] + [n2]"",
                        ""fontSize"":8,
                        ""fontFamily"":""default"",
                        ""fontColor"":""#000000"",
                        ""documentNumber"":1,
                        ""pageNumber"":1,
                        ""x"":100,
                        ""y"":280,
                        ""tabOrder"":1,
                        ""width"":50,
                        ""height"":100,
                        ""party"": 1,
                        ""decimalPlaces"": 2
                },
		{
			""type"":""text"",
			""x"":552,
			""y"":150,
			""width"":60,
			""height"":20,
			""pageNumber"":1,
			""tabOrder"":1,
			""party"":1,
			""fontSize"":8,
			""fontColor"":""#eee"",
			""validation"":""Numbers""
		},
		{
			""type"":""signature"",
			""x"":200,
			""y"":150,
			""width"":100,
			""height"":50,
			""pageNumber"":1,
			""party"":1
		},
		{
			""type"":""dropdown"",
			""x"":200,
			""y"":250,
			""width"":80,
			""height"":20,
			""pageNumber"":1,
			""party"":1,
			""value"":""US"",
			""options"":[""UK"",""Canada"",""Australia"",""US"",""France""]
		}
		]
}";

rs.Write(boundarybytes, 0, boundarybytes.Length);

string formdataTemplate = "Content-Disposition: form-data; name=\"data\"\r\n\r\n"+json;
byte[] formitembytes = System.Text.Encoding.UTF8.GetBytes(formdataTemplate);
rs.Write(formitembytes, 0, formitembytes.Length);

rs.Write(boundarybytes, 0, boundarybytes.Length);

string headerTemplate = "Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n\r\n";
      
byte[] headerbytes = System.Text.Encoding.UTF8.GetBytes(headerTemplate);
rs.Write(headerbytes, 0, headerbytes.Length);

FileStream fileStream = new FileStream(file, FileMode.Open, FileAccess.Read);
byte[] buffer = new byte[4096];
int bytesRead = 0;
while ((bytesRead = fileStream.Read(buffer, 0, buffer.Length)) != 0) {
          rs.Write(buffer, 0, bytesRead);
}
fileStream.Close();

byte[] trailer = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "--\r\n");
rs.Write(trailer, 0, trailer.Length);
rs.Close();

WebResponse wresp = null;
try {
     wresp = wr.GetResponse();
     Stream stream2 = wresp.GetResponseStream();
     StreamReader reader2 = new StreamReader(stream2);
     log.Debug(string.Format("File uploaded, server response is: {0}", reader2.ReadToEnd()));
} catch(Exception ex) {
     log.Error("Error uploading file", ex);
     if(wresp != null) {
         wresp.Close();
         wresp = null;
     }
} finally {
     wr = null;
}
    
						

Create a new folder of documents from templates


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:

 /templates/createFolder
 application/json


REQUEST
{
	"folderName":"Sample Documents",
	"templateIds":[ID_OF_TEMPLATE_A,ID_OF_TEMPLATE_B],
	"fields":
		{
			"FIELD1_NAME":"FIELD1_VALUE",
			"FIELD2_NAME":"FIELD2_VALUE",
			If image field
			"IMAGE_FIELD_NAME":{ 
				"inputType":"url or base64",
				"imageName":"logo.png",
				"source": "URL or BASE64 String"	
			   },
			....
		},
	"allowAdvancedEmailValidation":true,
	"metadata":{
	    "DATA_KEY1":"DATA_VALUE1",
	    "DATA_KEY2":"DATA_VALUE2",
	    "DATA_KEY3":"DATA_VALUE3",
	    "DATA_KEY4":"DATA_VALUE4",
	    ........
	}
	"parties":[
		{
			"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY",
			"lastName":"LAST_NAME_OF_RECIPIENT_PARTY",
			"emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"hostEmailId":"EMAIL_ID_OF_INPERSON_ADMINISTRATOR",
			"allowNameChange":true,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"Email Access Code"
		},
		{
			"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY",
			"lastName":"LAST_NAME_OF_RECIPIENT_PARTY",
			"emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"hostEmailId":"EMAIL_ID_OF_INPERSON_ADMINISTRATOR",
			"allowNameChange":true,
			"signerAuthLevel":"User-defined Access Code",
			"userDefinedAccessCode":"123@Test"
		},
		....
	],
	"senderEmail":"user2@example.com",
	"signInSequence":false,
	"custom_field1":{
  	"name":"NAME",
  	"value":"VALUE"
         },
    
      	"custom_field2":{
  	"name":"NAME",
  	"value":"VALUE"
         },
	"sendNow":false,
	"signSuccessUrlAllParties":false,
	"emailTemplateId":2,
	"signerInstructionId":1,
	"confirmationInstructionId":2,
	"emailTemplateCustomFields":[
  	{
  		"tag":"CUSTOM_TAGS_1",
  		"type":"plain",
  		"value":"Please click on the View Document(s) link below to review and esign the documents as required."
  	},
  	{
  		"tag":"CUSTOM_TAGS_2",
  		"type":"hyperlink",
  		"value":"click here's",
  		"url":"HYPERTEXT_REFERENCE"
  	}
  	
  	
  	],
  	"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."
  	}
  	],
	"createEmbeddedSendingSession":false,
	"inPersonEnable":false,
	"fixRecipientParties":true,
	"fixDocuments":true,	
	"hideSignerSelectOption":false,
	"hideSignerActions": false,
	"hideSenderName": true,
	"hideFolderName": false,
	"hideDocumentsName": true,
	"hideAddMeButton":false,
	"hideAddNewButton":true,
	"enableStepByStep":false,
	"hideAddGroupButton":false,
	"sendSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"sendErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"createEmbeddedSigningSession":true,
	"createEmbeddedSigningSessionForAllParties":false,
	"embeddedSignersEmailIds":["FIRST_EMBEDDED_SIGNER_EMAIL","SECOND_EMBEDDED_SIGNER_EMAIL"],
	"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"themeColor":"ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION",	
	"sessionExpire":false,
	"expiry":300000,
	"allowSendNowAndEmbeddedSigningSession":false
}						
						
Parameter Description
folderName (optional) 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}) Responsive image
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.
allowAdvancedEmailValidation (Optional) (default=false) 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
  1. Codes are not case-sensitive
  2. The system does not send this code so you must share this code with the signer directly
  3. 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.
createEmbeddedSigningSession
(optional, default=false)
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
createEmbeddedSigningSessionForAllParties
(optional, default=false)
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.
hideNextRequiredFieldBtn (optional, default=false) 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)
allowSendNowAndEmbeddedSigningSession (optional, default=false) 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

RESPONSE
{
	"result":"success",
	"message":"folder of document(s) successfully created",
	"embeddedSigningSessions": [
          {
            "emailIdOfSigner": "johndoe@example.com",
            "embeddedToken": "EMBEDDED_TOKEN",
            "embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
          },
          {
            "emailIdOfSigner": "johndoe@example.com",
            "embeddedToken": "EMBEDDED_TOKEN",
            "embeddedSessionURL": "UNIQUE_EMBEDDED_SESSION_URL"
          }
        ],
	"folder":{
		"folderId": 179,
	    "folderName": "fw4",
	    "folderAuthorId": 1,
	    "folderAuthorFirstName": "ABC",
	    "folderAuthorLastName": "XYZ",
	    "folderAuthorEmail": "abc@xyz.com",
	    "folderAuthorRole": "admin",
	    "folderCompanyId": 11,
	    "folderCreationDate": 1441268056000,
	    "folderSentDate": 1442470444000,
	    "folderStatus": "SHARED",
	    "folderDocumentIds": [
	      420
	    ],
	    "documentsList": [
	      {
	        "documentId": 420,
	        "companyId": 11,
	        "contractCreatedBy": 1,
	        "contractCreatedOn": 1441268055000,
	        "contractType": "W4",
	        "contractStatus": "WAITING_FOR_SIGNATURE",
	        "editable": false,
	        "contractVersionId": 488,
	        "contractVersionName": "fw4",
	        "contractVersionDesc": "This is a non-editable form W4",
	        "versionCreatedby": 1,
	        "versionCreatedOn": 1441268055000,
	        "contractVersionNumber": 1
	      }
	    ],
	    "folderRecipientParties": [
	      {
	        "partyId": 52,
	        "partyDetails": {
	          "partyId": 52,
	          "firstName": "John",
	          "lastName": "Doe",
	          "emailId": "johndoe@example.com",
	          "address": "",
	          "dateCreated": 1413013300000
	        },
	        "contractPermissions": "FILL_FIELDS_AND_SIGN",
	        "partySequence": 1,
	        "workflowSignSequence": 1,
	        "envelopeId": 179,
	        "sharingMode": "email",
	        "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=QoS4qeiO870mBXNbcuUWYA%3D%3D&partyId=52"
	      },
	      {
	        "partyId": 1,
	        "partyDetails": {
	          "partyId": 1,
	          "firstName": "John",
	          "lastName": "Doe",
	          "emailId": "johndoe@example.com",
	          "address": "New Delhi, India",
	          "dateCreated": 1404792207000
	        },
	        "contractPermissions": "FILL_FIELDS_AND_SIGN",
	        "partySequence": 2,
	        "workflowSignSequence": 2,
	        "envelopeId": 179,
	        "sharingMode": "email",
	        "folderAccessURL": "https://{{HOST_NAME}}/viewDocumentDirect?encrDocId=QoS4qeiO870mBXNbcuUWYA%3D%3D&partyId=1"
	      }
	    ],
	    "bulkId": 0,
	    "enforceSignWorkflow": false,
	    "currentWorkflowStep": 1,
	    "transactionSource": "API-1-via_templates:[46]",
	    "editable": false
	}
}
						

Code Samples
echo '{
	"folderName":"Sample Documents",
	"templateIds":[ID_OF_TEMPLATE_A,ID_OF_TEMPLATE_B],
	"fields":
		{
			"FIELD1_NAME":"FIELD1_VALUE",
			"FIELD2_NAME":"FIELD2_VALUE",
			....
		},
	"parties":[
		{
			"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY",
			"lastName":"LAST_NAME_OF_RECIPIENT_PARTY",
			"emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER",
			"signerAuthLevel":"SMS Access Code"
		},
		....
	],
	"signInSequence":false,
	"createEmbeddedSigningSession":true,
	"createEmbeddedSigningSessionForAllParties":true,
	"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"themeColor":"ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION",	
	"sessionExpire":false,
	"expiry":300000,
	"allowSendNowAndEmbeddedSigningSession":false
}' | curl https://{{HOST_NAME}}/api/templates/createFolder \
-i \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json;charset=UTF-8" \
-d @- \
-X POST

						
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/templates/createFolder",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  	"folderName":"Sample Documents",
	"templateIds":[ID_OF_TEMPLATE_A,ID_OF_TEMPLATE_B],
	"fields":
		{
			"FIELD1_NAME":"FIELD1_VALUE",
			"FIELD2_NAME":"FIELD2_VALUE",
			If image field
			"IMAGE_FIELD_NAME":{ 
				"inputType":"url or base64",
				"imageName":"logo.png",
				"source": "URL or BASE64 String"	
			   },
			....
		},
	"parties":[
		{
			"firstName":"FIRST_NAME_OF_RECIPIENT_PARTY",
			"lastName":"LAST_NAME_OF_RECIPIENT_PARTY",
			"emailId":"EMAIL_ID_OF_RECIPIENT_PARTY",
			"permission":"FILL_FIELDS_AND_SIGN",
			"workflowSequence":1,
			"sequence":1,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER"
		},
		....
	],
	"signInSequence":false,
	"createEmbeddedSigningSession":true,
	"createEmbeddedSigningSessionForAllParties":true,
	"signSuccessUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signDeclineUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signLaterUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"signErrorUrl":"YOUR_PAGE_TO_REDIRECT_USER_FROM_EMBEDDED_SESSION",
	"themeColor":"ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION",
	"sessionExpire":false,
	"expiry":300000,
	"allowSendNowAndEmbeddedSigningSession":false
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
						
var webAddr = "https://{{HOST_NAME}}/api/templates/createFolder"         
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 = @"{
	""folderName"":""Sample Documents"",
    ""templateIds"":[ID_OF_TEMPLATE_A],
	""fields"":
		{
			""Customer Name"":""[CustomerName]"",
			""Start Date"":""[StartDate]"",
""Included"":""[Included]"",
""Comments"":""[Comments]"",
""Signature Date"":""[SignatureDate]""
			
		},
	""parties"":[
		{
			""firstName"":""FIRST_NAME_OF_RECIPIENT_PARTY"",
			""lastName"":""LAST_NAME_OF_RECIPIENT_PARTY"",
			""emailId"":""EMAIL_ID_OF_RECIPIENT_PARTY"",
			""permission"":""FILL_FIELDS_AND_SIGN"",
			""sequence"":1,
			"dialingCode": "+1",
			"mobileNumber": "RECIPIENT_PARTY_MOBILE_NUMBER"

        }
		],
	""signInSequence"":false,
	""createEmbeddedSigningSession"":true,
	""createEmbeddedSigningSessionForAllParties"":true,
	""signSuccessUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signDeclineUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signLaterUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""signErrorUrl"":""https://{{HOST_NAME}}/demo-sign-success/"",
	""themeColor"":""ANY_CSS_COLOR_TO_MATCH_YOUR_APPLICATION"",
	""allowSendNowAndEmbeddedSigningSession"":false
}";

                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/templates/createFolder";
			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 input="{"
					+ "\"folderName\":\"Folder of Templates Using Java\","
					+ "\"templateIds\":[template_id_1,template_id_2],"
					+ "\"sendNow\":false,"
					+ "\"parties\":["
						+ "{"
							+ "\"firstName\":\"John\","
							+ "\"lastName\":\"Doe\","
							+ "\"emailId\":\"johndoe@example.com\","
							+ "\"permission\":\"FILL_FIELDS_AND_SIGN\","
							+ "\"sequence\":1"
						+ "},"
						+ "{"
							+ "\"firstName\":\"John\","
							+ "\"lastName\":\"Doe\","
							+ "\"emailId\":\"johndoe@example.com\","
							+ "\"permission\":\"FILL_FIELDS_AND_SIGN\","
							+ "\"sequence\":2"
						+ "}"
					+ "],"
					+ "\"createEmbeddedSigningSession\":true,"
					+ "\"createEmbeddedSigningSessionForAllParties\":true," 
					+ "\"allowSendNowAndEmbeddedSigningSession\":false,"
			        + "\"senderEmail\":\"johndoe@example.com\""
					+ "}";	
			
			OutputStream os = httpConn.getOutputStream();
	        os.write(input.getBytes());
	        os.flush();
		
	        if (httpConn.getResponseCode() != HttpURLConnection.HTTP_OK) {
	            throw new RuntimeException("Failed : HTTP error code : "+ httpConn.getResponseCode());
	        } else {
	        	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();
						

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.

 /templates/list


RESPONSE
{
  "result": "success",
  "total_templates": 9,
  "templatesList": [
    {
      "templateId": 1,
      "templateName": "Subcontractor Agreement Template ",
      "templateDesc": "A custom subcontractor agreement Template desc",
      "templateType": "Subcontracting",
      "templateCreationDate": 1413011470000,
      "templateLastUpdateDate": 1427099812000,
      "editable": true,
      "numberOfParties": 0,
      "companyId": 11,
      "templateCreatedBy": {
        "partyId": 1,
        "firstName": "John",
        "lastName": "Doe",
        "emailId": "johndoe@example.com",
        "address": null,
        "dateCreated": null,
        "companyId": 0,
        "userRole": null,
        "userAddedDate": null,
        "department": null,
        "title": null,
        "active": false,
        "managerId": null
      },
      "templateLastUpdatedBy": {
        "partyId": 1,
        "firstName": "John",
        "lastName": "Doe",
        "emailId": "johndoe@example.com",
        "address": null,
        "dateCreated": null,
        "companyId": 0,
        "userRole": null,
        "userAddedDate": null,
        "department": null,
        "title": null,
        "active": false,
        "managerId": null
      },
      "shareAll": true
    },
    {
      "templateId": 3,
      "templateName": "single party agreement",
      "templateDesc": "sample template  desc 1",
      "templateType": "DEED",
      "templateCreationDate": 1413541233000,
      "templateLastUpdateDate": 1430724568000,
      "editable": true,
      "numberOfParties": 0,
      "companyId": 11,
      "templateCreatedBy": {
        "partyId": 1,
        "firstName": "John",
        "lastName": "Doe",
        "emailId": "johndoe@example.com",
        "address": null,
        "dateCreated": null,
        "companyId": 0,
        "userRole": null,
        "userAddedDate": null,
        "department": null,
        "title": null,
        "active": false,
        "managerId": null
      },
      "templateLastUpdatedBy": {
        "partyId": 1,
        "firstName": "John",
        "lastName": "Doe",
        "emailId": "johndoe@example.com",
        "address": null,
        "dateCreated": null,
        "companyId": 0,
        "userRole": null,
        "userAddedDate": null,
        "department": null,
        "title": null,
        "active": false,
        "managerId": null
      },
      "shareAll": false
    },
    {
      "templateId": 6,
      "templateName": "NDA Template",
      "templateDesc": "A Non-Disclosure Agreement Template",
      "templateType": "NDA",
      "templateCreationDate": 1417083942000,
      "templateLastUpdateDate": 1461753204000,
      "editable": true,
      "numberOfParties": 0,
      "companyId": 11,
      "templateCreatedBy": {
        "partyId": 1,
        "firstName": "John",
        "lastName": "Doe",
        "emailId": "johndoe@example.com",
        "address": null,
        "dateCreated": null,
        "companyId": 0,
        "userRole": null,
        "userAddedDate": null,
        "department": null,
        "title": null,
        "active": false,
        "managerId": null
      },
      "templateLastUpdatedBy": {
        "partyId": 1,
        "firstName": "John",
        "lastName": "Doe",
        "emailId": "johndoe@example.com",
        "address": null,
        "dateCreated": null,
        "companyId": 0,
        "userRole": null,
        "userAddedDate": null,
        "department": null,
        "title": null,
        "active": false,
        "managerId": null
      },
      "shareAll": false
    },
    ...
    ]
   }
						

Sample Code
			String apiURL = "https://{{HOST_NAME}}/api/templates/list";
			
	        URL url= new URL(apiURL);
			HttpURLConnection httpConn= (HttpURLConnection) url.openConnection();
			httpConn.setDoOutput(true);
		
			httpConn.setRequestProperty("Authorization","Bearer ACCESS_TOKEN");
		   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();
								

Get the list of multiple templates by the template ids of your account


Using the following call, you can get a list of multiple template data by template id from your Foxit eSign account into your application.

 /templates/templateDetails
application/json


Request
{
	"templateIds":[ID_OF_TEMPLATE_A,ID_OF_TEMPLATE_B]
}

Parameter Description
templateIds An array of templateId IDs that you want to get.
RESPONSE
{
	"result": "success",
	"total_templates": 2,
	"templateIdList": {
		"ID_OF_TEMPLATE_A":{
			"template": {
				"templateId": ID_OF_TEMPLATE_A,
				"templateName": "Subcontractor Agreement Template ",
				"templateDesc": "A custom subcontractor agreement Template desc",
				"templateType": "Subcontracting",
				"templateCreationDate": 1413011470000,
				"templateLastUpdateDate": 1427099812000,
				"editable": true,
				"numberOfParties": 3,
				"templatePartyPermissions": [
                    {
                        "template_party_id": 565,
                        "templateId": ID_OF_TEMPLATE_A,
                        "templatePermissions": "FILL_FIELDS_AND_SIGN",
                        "partySequence": 1,
                        "templatePartyRole": null,
                        "partyId": 0,
                        "partyDetails": null
                    },
                    {
                        "template_party_id": 566,
                        "templateId": ID_OF_TEMPLATE_A,
                        "templatePermissions": "FILL_FIELDS_AND_SIGN",
                        "partySequence": 2,
                        "templatePartyRole": null,
                        "partyId": 101,
                        "partyDetails": {
                            "partyId": 101,
                            "firstName": "John",
                            "lastName": "Doe",
                            "emailId": "johndoe@example.com",
                            "placeholder": false,
                            "address": "",
                            "dateCreated": 1503527343000,
                            "optOutEmails": false,
                            "uniquePartyId": "UNIQUE_PARTY_ID",
                            "authenticationLevel": "NO",
                            "passwordUpdateDate": null,
                            "passwordUpdateStatus": false
                        }
                    },
                    {
                        "template_party_id": 567,
                        "templateId": ID_OF_TEMPLATE_A,
                        "templatePermissions": "FILL_FIELDS_AND_SIGN",
                        "partySequence": 3,
                        "templatePartyRole": "admin",
                        "partyId": 0,
                        "partyDetails": null
                    }
                ],
				"companyId": 11,
				"templateCreatedBy": {
				"partyId": 1,
				"firstName": "John",
				"lastName": "Doe",
				"emailId": "johndoe@example.com",
				"address": null,
			 	"dateCreated": null,
				"companyId": 0,
				"userRole": null,
				"userAddedDate": null,
				"department": null,
				"title": null,
				"active": false,
				"managerId": null
				},
				"templateLastUpdatedBy": {
					"partyId": 1,
					"firstName": "John",
			 		"lastName": "Doe",
					ilId": "johndoe@example.com",
					"address": null,
					"dateCreated": null,
					"companyId": 0,
					"userRole": null,
					"userAddedDate": null,
					"department": null,
					"title": null,
					"active": false,
					"managerId": null
				},
			 	"shareAll": true
			},
			"allfields": [ 
				{
					"fieldTagId": 48,
					"contractId": 0,
					"versionId": 0,
					"templateId": 46,
					"companyId": 11,
					"fieldType": "textfield",
					"documentPageNumber": 1,
					"coordinateXRatio": 0.142763,
					"coordinateYRatio": 0.415264,
					"elementWidthRatio": 0.197927,
					"elementHeightRatio": 0.0304487,
					"docFieldId": "48",
					"dependent": false,
					"parentTagId": "",
					"parentTagValueToCompare": "",
					"conditionResult": null,
					"tabOrder": null,
					"textfieldName": "",
					"value": "John",
					"description": "",
					"partyResponsible": 1,
					"required": false,
					"multiLine": false,
					"fontSize": 16,
					"fontFamily": "default",
					"fontColor": "#800080",
					"readOnly": false,
				 	"systemField": false
				},
				{
					.....
				}
			]
		},
		"ID_OF_TEMPLATE_B":{
			"template": {
				"templateId": ID_OF_TEMPLATE_B,
				"templateName": "single party agreement",
				"templateDesc": "sample template  desc 1",
				"templateType": "DEED",
				"templateCreationDate": 1413541233000,
				"templateLastUpdateDate": 1430724568000,
				"editable": true,
				"numberOfParties": 0,
				"companyId": 11,
				"templateCreatedBy": {
				"partyId": 1,
				"firstName": "John",
				"lastName": "Doe",
				"emailId": "johndoe@example.com",
				"address": null,
				"dateCreated": null,
				"companyId": 0,
				"userRole": null,
				"userAddedDate": null,
				"department": null,
				"title": null,
				"active": false,
				 "managerId": null
				},
				"templateLastUpdatedBy": {
					"partyId": 1,
					"firstName": "John",
					"lastName": "Doe",
					"emailId": "johndoe@example.com",
					"address": null,
					"dateCreated": null,
					"companyId": 0,
					"userRole": null,
					"userAddedDate": null,
					"department": null,
					"title": null,
					"active": false,
					"managerId": null
				},
				"shareAll": false
			},
			"allfields": [
				{
				"fieldTagId": 49,
				"contractId": 0,
				"versionId": 0,
				"templateId": 46,
				"companyId": 11,
				"fieldType": "signfield",
				"documentPageNumber": 1,
				"coordinateXRatio": 0.322042,
				"coordinateYRatio": 0.688126,
				"elementWidthRatio": 0.166667,
				"elementHeightRatio": 0.0198728,
				"docFieldId": "49",
				"dependent": false,
				"parentTagId": "",
				"parentTagValueToCompare": "",
				"conditionResult": null,
				"tabOrder": 1,
				"partyResponsible": 1,
				"signatureId": null
				},
				{
					....
				}
			]
		}
		...
	}
}
						

Sample Code
String apiURL = "https://{{HOST_NAME}}/api/templates/myTemplatesByIds";
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 input = "{"
	+ "\"templateIds\":\"[ID_OF_TEMPLATE_A,ID_OF_TEMPLATE_B]\"
	+ "}";
OutputStream os = httpConn.getOutputStream();
os.write(input.getBytes());
os.flush();
			
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();
								

Get Template Data


You can poll our API to get the template data

 /templates/mytemplate?templateId={TEMPLATE_ID}


Request Parameters
templateId Your TEMPLATE_ID

RESPONSE
{
  "result": "success",
  "template": {
    "templateId": 46,
    "templateName": "Copy of eSignGenie Sample",
    "templateDesc": null,
    "templateType": null,
    "templateCreationDate": 1468478204000,
    "templateLastUpdateDate": 1479106113000,
    "editable": false,
    "numberOfParties": 3,
    "templatePartyPermissions": [
        {
            "template_party_id": 565,
            "templateId": 46,
            "templatePermissions": "FILL_FIELDS_AND_SIGN",
            "partySequence": 1,
            "templatePartyRole": null,
            "partyId": 0,
            "partyDetails": null
        },
        {
            "template_party_id": 566,
            "templateId": 46,
            "templatePermissions": "FILL_FIELDS_AND_SIGN",
            "partySequence": 2,
            "templatePartyRole": null,
            "partyId": 101,
            "partyDetails": {
                "partyId": 101,
                "firstName": "John",
                "lastName": "Doe",
                "emailId": "johndoe@example.com",
                "placeholder": false,
                "address": "",
                "dateCreated": 1503527343000,
                "optOutEmails": false,
                "uniquePartyId": "UNIQUE_PARTY_ID",
                "authenticationLevel": "NO",
                "passwordUpdateDate": null,
                "passwordUpdateStatus": false
            }
        },
        {
            "template_party_id": 567,
            "templateId": 46,
            "templatePermissions": "FILL_FIELDS_AND_SIGN",
            "partySequence": 3,
            "templatePartyRole": "admin",
            "partyId": 0,
            "partyDetails": null
        }
    ],
    "companyId": 11,
    "templateCreatedBy": {
      "partyId": 1,
      "firstName": "John",
      "lastName": "Doe",
      "emailId": "johndoe@example.com",
      "address": null,
      "dateCreated": null,
      "companyId": 0,
      "userRole": null,
      "userAddedDate": null,
      "department": null,
      "title": null,
      "active": false,
      "managerId": null
    },
    "templateLastUpdatedBy": {
      "partyId": 52,
      "firstName": "John",
      "lastName": "Doe",
      "emailId": "johndoe@example.com",
      "address": null,
      "dateCreated": null,
      "companyId": 0,
      "userRole": null,
      "userAddedDate": null,
      "department": null,
      "title": null,
      "active": false,
      "managerId": null
    },
    "shareAll": false
  },
  "allfields": [
    {
      "fieldTagId": 48,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "textfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.142763,
      "coordinateYRatio": 0.415264,
      "elementWidthRatio": 0.197927,
      "elementHeightRatio": 0.0304487,
      "docFieldId": "48",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "textfieldName": "",
      "value": "John",
      "description": "",
      "partyResponsible": 1,
      "required": false,
      "multiLine": false,
      "fontSize": 16,
      "fontFamily": "default",
      "fontColor": "#800080",
      "readOnly": false,
      "systemField": false
    },
    {
      "fieldTagId": 49,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "signfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.322042,
      "coordinateYRatio": 0.688126,
      "elementWidthRatio": 0.166667,
      "elementHeightRatio": 0.0198728,
      "docFieldId": "49",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": 1,
      "partyResponsible": 1,
      "signatureId": null
    },
    {
      "fieldTagId": 51,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "datefield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.53841,
      "coordinateYRatio": 0.424516,
      "elementWidthRatio": 0.166945,
      "elementHeightRatio": 0.016129,
      "docFieldId": "51",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "datefieldName": "DOB",
      "value": "",
      "description": "",
      "partyResponsible": 1,
      "required": false,
      "dateFormat": "MMM/DD/YYYY",
      "readOnly": false,
      "systemField": false
    },
    {
      "fieldTagId": 52,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "signfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.580556,
      "coordinateYRatio": 0.680187,
      "elementWidthRatio": 0.211934,
      "elementHeightRatio": 0.0238474,
      "docFieldId": "52",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "partyResponsible": 2,
      "signatureId": null
    },
    {
      "fieldTagId": 59,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "checkboxfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.445075,
      "coordinateYRatio": 0.569793,
      "elementWidthRatio": 0.0390946,
      "elementHeightRatio": 0.0286169,
      "docFieldId": "14766189127327312",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": 3,
      "cbname": "",
      "description": "",
      "partyResponsible": 2,
      "cbgroup": "",
      "checked": false,
      "oneCbMandatoryInGroup": false
    },
    {
      "fieldTagId": 60,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "checkboxfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.573675,
      "coordinateYRatio": 0.571383,
      "elementWidthRatio": 0.0390946,
      "elementHeightRatio": 0.027027,
      "docFieldId": "14766189209789773",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": 4,
      "cbname": "",
      "description": "",
      "partyResponsible": 2,
      "cbgroup": "",
      "checked": false,
      "oneCbMandatoryInGroup": false
    },
    {
      "fieldTagId": 61,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "signfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.132317,
      "coordinateYRatio": 0.826073,
      "elementWidthRatio": 0.205761,
      "elementHeightRatio": 0.0238474,
      "docFieldId": "14770354742332322",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "partyResponsible": 3,
      "signatureId": null
    },
    {
      "fieldTagId": 69,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "textfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.328562,
      "coordinateYRatio": 0.722884,
      "elementWidthRatio": 0.205761,
      "elementHeightRatio": 0.0198728,
      "docFieldId": "14784287893213202",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "textfieldName": "Signer Name",
      "value": "",
      "description": "",
      "partyResponsible": 1,
      "required": false,
      "multiLine": false,
      "fontSize": 8,
      "fontFamily": "default",
      "fontColor": "#000000",
      "readOnly": true,
      "systemField": true
    },
    {
      "fieldTagId": 70,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "textfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.575926,
      "coordinateYRatio": 0.726391,
      "elementWidthRatio": 0.205761,
      "elementHeightRatio": 0.0206677,
      "docFieldId": "1478438292060593",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "textfieldName": "Signer Name",
      "value": "",
      "description": "",
      "partyResponsible": 2,
      "required": false,
      "multiLine": false,
      "fontSize": 8,
      "fontFamily": "default",
      "fontColor": "#000000",
      "readOnly": true,
      "systemField": true
    },
    {
      "fieldTagId": 71,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "textfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.372222,
      "coordinateYRatio": 0.825755,
      "elementWidthRatio": 0.205761,
      "elementHeightRatio": 0.0198728,
      "docFieldId": "147843830200324",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "textfieldName": "Signer Name",
      "value": "",
      "description": "",
      "partyResponsible": 3,
      "required": false,
      "multiLine": false,
      "fontSize": 8,
      "fontFamily": "default",
      "fontColor": "#000000",
      "readOnly": true,
      "systemField": true
    },
    {
      "fieldTagId": 72,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "datefield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.325926,
      "coordinateYRatio": 0.758665,
      "elementWidthRatio": 0.205761,
      "elementHeightRatio": 0.0198728,
      "docFieldId": "14784382692222212",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "datefieldName": "Date Signed",
      "value": "",
      "description": "",
      "partyResponsible": 1,
      "required": false,
      "dateFormat": "DD/MMMM/YYYY",
      "readOnly": true,
      "systemField": true
    },
    {
      "fieldTagId": 73,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "datefield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.569753,
      "coordinateYRatio": 0.762162,
      "elementWidthRatio": 0.205761,
      "elementHeightRatio": 0.0198728,
      "docFieldId": "14784383126396385",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "datefieldName": "Date Signed",
      "value": "",
      "description": "",
      "partyResponsible": 2,
      "required": false,
      "dateFormat": "DD/MMMM/YYYY",
      "readOnly": true,
      "systemField": true
    },
    {
      "fieldTagId": 74,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "datefield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.625309,
      "coordinateYRatio": 0.82496,
      "elementWidthRatio": 0.205761,
      "elementHeightRatio": 0.0206677,
      "docFieldId": "14784383209099086",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "datefieldName": "Date Signed",
      "value": "",
      "description": "",
      "partyResponsible": 3,
      "required": false,
      "dateFormat": "DD/MMMM/YYYY",
      "readOnly": true,
      "systemField": true
    },
    {
      "fieldTagId": 77,
      "contractId": 0,
      "versionId": 0,
      "templateId": 46,
      "companyId": 11,
      "fieldType": "attachmentfield",
      "documentPageNumber": 1,
      "coordinateXRatio": 0.465856,
      "coordinateYRatio": 0.16725,
      "elementWidthRatio": 0.0925926,
      "elementHeightRatio": 0.0238474,
      "docFieldId": "14791060033633622",
      "dependent": false,
      "parentTagId": "",
      "parentTagValueToCompare": "",
      "conditionResult": null,
      "tabOrder": null,
      "attachmentfieldName": "DL",
      "attachmentfieldDescription": "Please upload scanned copy of DL",
      "partyResponsible": 1,
      "required": true,
      "attachmentFileId": null
    }
  ]
}
						

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/templates/mytemplate?templateId=179"
								
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/templates/mytemplate?templateId=179",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
								
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.

 /parties/getEmailGroups
application/json


Request
{
  "emailGroupNames":[
    "Email_Group_1","Email_Group_2",...
  ]
}
					
RESPONSE
{
  "allEmailGroups": [
    {
      "groupId": 1,
      "groupName": "Email_Group_1",
      "groupDesc": "",
      "dateCreated": 1512677389000,
      "companyId": 11,
      "parties": [
        {
          "firstName": "Amanda",
          "lastName": "Williams",
          "emailId": "williams_ama@esigngenie.com"
         },
         {
           "firstName": "Hannah",
           "lastName": "Pitt",
           "emailId": "pitthannah@esigngenie.com"
         },..
      ]
     },
     {
       "groupId": 176,
       "groupName": "Email_Group_2",
       "groupDesc": ""Email_Group_Description"",
       "dateCreated": 1425120364000,
       "companyId": 11,
       "parties": [
         {
           "firstName": "Sandra",
           "lastName": "Smith",
           "emailId": "san_smith@esigngenie.com"
         },
         {
           "firstName": "Bruce",
           "lastName": "Wayne",
           "emailId": "bruce.wayne_as@esigngenie.com"
         },
         {
           "firstName": "Amanda",
           "lastName": "Williams",
           "emailId": "williams_ama@esigngenie.com"
         },..
       ]
     }
  ]
}
					

Create a email group


To create a new email group via API, please make a call to parties/createEmailGroup with the following parameters.

You can only pass up to 20 party details.

 parties/createEmailGroup
application/json


Request
{
  "emailGroupName":"Email_Group_Name",
  "emailGroupDescription":"Email_Group_Description",
  "allowAdvancedEmailValidation":true,
  "parties":[
    {
      "firstName": "Sandra",
      "lastName": "Smith",
      "emailId": "san_smith@esigngenie.com"
    },
    {
      "firstName": "Hannah",
      "lastName": "Pitt",
      "emailId": "pitthannah@esigngenie.com"
    },...
  ]
}
					
RESPONSE
{
  "result": "success",
  "message": "new email group successfully added",
  "emailGroup": {
    "groupId": 230,
    "groupName": "Email_Group_Name",
    "groupDesc": ""Email_Group_Description"",
    "dateCreated": 1561549235000,
    "companyId": 11,
    "parties": [
      {
        "firstName": "Sandra",
        "lastName": "Smith",
        "emailId": "san_smith@esigngenie.com"
      },
      {
        "firstName": "Hannah",
        "lastName": "Pitt",
        "emailId": "pitthannah@esigngenie.com"
      },...
    ]
   }
}
					

Webhooks

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.
Sample Webhook Request Body
{
    "event_name":"folder_signed",
    "event_date":1464237988093,
    "data":{
      "folder":{
        "folderId":649,
        "folderName":"NDA",
        "folderAuthorId":1,
        "folderAuthorFirstName": "ABC",
        "folderAuthorLastName": "XYZ",
        "folderAuthorEmail": "abc@xyz.com",
        "folderAuthorRole": "admin",
        "folderCompanyId":11,
        "folderCreationDate":1456385855000,
        "folderSentDate":1464237650000,
        "folderStatus":"SHARED",
        "folderDocumentIds":[1239,1240],
        "custom_field1":{
  			"name":"NAME",
  			"value":"VALUE"
         },
    
	"custom_field2":{
  			"name":"NAME",
  			"value":"VALUE"
         },
        "documentsList":[
          {
            "documentId":1239,
            "companyId":11,
            "contractCreatedBy":1,
            "contractCreatedOn":1456385853000,
            "contractType":"NDA",
            "contractStatus":"WAITING_FOR_SIGNATURE",
            "editable":false,
            "contractVersionId":1307,
            "contractVersionName":"NDA",
            "contractVersionDesc":"NDA",
            "versionCreatedby":1,
            "versionCreatedOn":1456385853000,
            "contractVersionNumber":1
          },
          {
            "documentId":1240,
            "companyId":11,
            "contractCreatedBy":1,
            "contractCreatedOn":1456385871000,
            "contractType":"IRS",
            "contractStatus":"WAITING_FOR_SIGNATURE",
            "editable":false,
            "contractVersionId":1308,
            "contractVersionName":"Form W9 copy",
            "contractVersionDesc":"Pdf sample template",
            "versionCreatedby":1,
            "versionCreatedOn":1456385871000,
            "contractVersionNumber":1
          }
        ],
        "folderRecipientParties":[
		  {
        	"partyId":1,
        	"partyDetails":{
        	  "partyId":1,
        	  "firstName":"John",
        	  "lastName":"Doe",
        	  "emailId":"johndoe@example.com",
        	  "address":"New Delhi, India",
        	  "dateCreated":1404837207000
        	},
        	"contractPermissions":"FILL_FIELDS_AND_SIGN",
        	"partySequence":1,
        	"workflowSignSequence":1,
        	"envelopeId":649,
        	"sharingMode":"email",
        	"folderAccessURL":null,
        	"securityMode":"none"
          },
          {
            "partyId":52,
            "partyDetails":{
              "partyId":52,
              "firstName":"John",
              "lastName":"Doe",
              "emailId":"johndoe@example.com",
              "address":"",
              "dateCreated":1413058300000
            },
            "contractPermissions":"FILL_FIELDS_AND_SIGN",
            "partySequence":2,
            "workflowSignSequence":2,
            "envelopeId":649,
            "sharingMode":"email",
            "folderAccessURL":null,
            "securityMode":"none"
            }
          ],
          "bulkId":0,
          "enforceSignWorkflow":false,
          "currentWorkflowStep":1,
          "transactionSource":"API-1-via_templates:[46]",
          "editable":false,
          "inPersonSignable":false
        },
        "signing_party":{
          "partyId":1,
          "firstName":"John",
          "lastName":"Doe",
          "emailId":"johndoe@example.com",
          "address":"New Delhi, India",
          "dateCreated":1404837207000
        }
      }
    }
						

Webhook Security

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.

You can generate the signature in PHP as follows:
$request_body = file_get_contents('php://input');
$s = hash_hmac('sha256', $request_body, 'mySecret', true);
echo base64_encode($s);

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:

https://www.test.com/WebhookHandler?signature=XXXXXXXXXXXXXXXXXXXXX

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.

 /webhook/createwebhookchannel
 application/json


REQUEST
{
	"channelName":"abc",
	"webhookUrl":"https://abc.com/xyz",
	"webhookSecret":"xyz",
	"webhookLevel":"Account",
	"events": {
		"folder_sent":true,
		"folder_viewed":true,
		"folder_signed":false,
		"folder_cancelled":true,
		"folder_executed":true,
		"folder_deleted":true
	}
}
		
Parameter Description
channelName (required) Name of the webhook channel
webhookUrl (required) 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.

RESPONSE
{
    "result": "success",
    "webhookChannel": {
       "channelId": 6,
       "companyId": 86,
       "channelName": "abc",
       "webhookUrl": "https://abc.com/xyz",
       "webhookSecret": "xyz",
       "dateCreated": null,
       "webhookLevel": "Account",
       "dateUpdated": null,
       "status": "active",
       "eventsSubscribedMap": {
       		"folder_sent": true,
        	"folder_cancelled": true,
        	"folder_viewed": true,
        	"folder_deleted": true,
        	"folder_executed": true,
        	"folder_signed": false
	        }
	    },
	    "message": "channel successfully created"
	}
		

Get Webhook Channel Data


You can poll our API to get the webhook channel data

 /webhook/mychannel?channelId={CHANNEL_ID}


Request Parameters
channelId Your CHANNEL_ID

RESPONSE
{
    "result": "success",
    "channel": {
        "channelId": 1,
        "companyId": 86,
        "channelName": "abc",
        "webhookUrl": "https://abc.com/xyz",
        "webhookSecret": "xyz",
        "dateCreated": 1575530182000,
        "webhookLevel": "API App",
        "dateUpdated": 1580359286000,
        "status": "active",
        "eventsSubscribedMap": {
            "folder_sent": true,
            "folder_viewed": true,
            "folder_signed": true,
            "folder_cancelled": true,
            "folder_executed": true,
            "folder_deleted": true
        }
    }
}
		

List all Webhook Channels


To get a list of all the webhook channels in the account, use the following call

 /webhook/channellist


RESPONSE
{
    "result": "success",
    "total_channel": 3,
    "templatesList": [
        {
            "channelId": 6,
            "companyId": 86,
            "channelName": "channal6",
            "webhookUrl": "https://abc.com/xyz",
            "webhookSecret": secret6",
            "dateCreated": 1580377929000,
            "webhookLevel": "Account",
            "dateUpdated": 1580377929000,
            "status": "active",
            "eventsSubscribedMap": {
                "folder_sent": true,
                "folder_viewed": true,
                "folder_signed": false,
                "folder_cancelled": true,
                "folder_executed": true,
                "folder_deleted": true
            }
        },
        {
            "channelId": 5,
            "companyId": 86,
            "channelName": "channal5",
            "webhookUrl": "https://qser.com/xyz",
            "webhookSecret": "secret5",
            "dateCreated": 1575970053000,
            "webhookLevel": "Account",
            "dateUpdated": 1576054860000,
            "status": "deactive",
            "eventsSubscribedMap": {
                "folder_sent": true,
                "folder_viewed": true,
                "folder_signed": false,
                "folder_cancelled": true,
                "folder_executed": true,
                "folder_deleted": true
            }
        },
        {
            "channelId": 1,
            "companyId": 86,
            "channelName": "channal1",
            "webhookUrl": "https://aser.com/xyz",
            "webhookSecret": "secret1",
            "dateCreated": 1575530182000,
            "webhookLevel": "API App",
            "dateUpdated": 1580359286000,
            "status": "active",
            "eventsSubscribedMap": {
                "folder_sent": true,
                "folder_viewed": true,
                "folder_signed": true,
                "folder_cancelled": true,
                "folder_executed": true,
                "folder_deleted": true
            }
        }
    ]
}
		

Update Webhook Channel


To create a new channel via API, please make a call to /webhook/updatewebhookchannel with the following parameters.

 /webhook/updatewebhookchannel
 application/json


REQUEST
{
	"channelId":1,
	"channelName":"updateName",
	"webhookUrl":"https://abc.com/xyz",
	"webhookSecret":"updatesecret",
	"webhookLevel":"Account",
	"status":"active",
	"events": {
		"folder_sent":true,
		"folder_viewed":true,
		"folder_signed":true,
		"folder_cancelled":true,
		"folder_executed":true,
		"folder_deleted":true
	}
}
		
Parameter Description
channelId (required) Your Channel_Id, you want to use to update
channelName (optional) Name of the webhook channel
webhookUrl (optional) 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.

RESPONSE
{
    "result": "success",
    "message": "channel successfully updated",
    "channel": {
        "channelId": 1,
        "companyId": 86,
        "channelName": "updateName",
        "webhookUrl": "https://abc.com/xyz",
        "webhookSecret": "updatesecret",
        "dateCreated": 1575530182000,
        "webhookLevel": "Account",
        "dateUpdated": 1580447800000,
        "status": "active",
        "eventsSubscribedMap": {
            "folder_sent": true,
            "folder_cancelled": true,
            "folder_viewed": true,
            "folder_deleted": true,
            "folder_executed": true,
            "folder_signed": true
        }
    }
}
		

Reactivate Webhook Channel


To reactivate a channel via API, please make a call to /webhook/channelreactivate

 /webhook/channelreactivate?channelId={CHANNEL_ID}


Request Parameters
channelId Your CHANNEL_ID

RESPONSE
{
    "result": "success",
    "templatesList": "channel successfully activated"
}
		

Deactivate Webhook Channel


To deactivate a channel via API, please make a call to /webhook/channeldeactivate

 /webhook/channeldeactivate?channelId={CHANNEL_ID}


Request Parameters
channelId Your CHANNEL_ID

RESPONSE
{
    "result": "success",
    "templatesList": "channel successfully deactivated"
}
		

Delete Webhook Channel


To delete a webhook channel via API, please make a call to /webhook/deletechannels with the following parameter.

 /webhook/deletechannels
application/json


REQUEST
{
	"channelIds":[2,3]
}		
		
Parameter Description
channelIds An array of channels IDs that you want to delete
RESPONSE
{
    "result": "success",
    "webhook channels deleted successfully": [2,3]
}
		

Users API

Create User


To create a new user via API, please make a call to /users/create with the following parameters.

 /users/create
 application/json


REQUEST
{
	"allowAdvancedEmailValidation":false,
	"user":{
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId":101,
        "active": true,
        "loginPassword": "TXxgjjezFLAqnR",
        "sendMailForPasswordReset": true,
        "dialingCode": "+1",
        "mobileNumber": "USER_MOBILE_NUMBER",
        "share_among_department" : true,
        "userSecureFieldAccess": false
	}
}
	
Parameter Description
firstName (required) First name of the account user
lastName (required) Last name of the account user
emailId (required) Email address of account user
allowAdvancedEmailValidation (optional) (default=false) Value can be either true or false
Validate the email address of the account user.
address (optional) Address of account user
userRole (required) It can be one of three values: 1) user, 2) admin, 3) super_admin
department (optional) Department of the user
title (optional) Designation/Title of the account user
managerId (optional) Party Id of one of the Admin or Super-Admin from your account, which will act as manager for this user
active (default=true) Value can be either true or false
loginPassword (optional) Values can depend on Complex or normal password settings, It can be combination of Uppercase/Lowercase letters, numbers and special characters
sendMailForPasswordReset (default=true) Value can be either true or false
dialingCode (default=+1) Use this field to assign a country dial-in codes are mobile number prefixes to a user.
mobileNumber Use this field to assign a mobile number to a user.
share_among_department (default=false) Value can be either true or false.
userSecureFieldAccess (default=false) Value can be either true or false.

RESPONSE
		{
		    "result": "success",
		    "message": "new user successfully added",
		    "user": {
		        "partyId": 54,
		        "firstName": "Steve",
		        "lastName": "Rogers",
		        "emailId": "abc@gmail.com",
		        "address": "New Delhi, India",
		        "dateCreated": null,
		        "companyId": 32567,
		        "userRole": "Admin",
		        "userAddedDate": null,
		        "department": "DEV",
		        "title": "Tech Lead",
		        "active": true,
		        "requestLocale": "auto",
		        "managerId": 101
		    }
		}
	

Code Samples
curl -X POST \
  https://{{HOST_NAME}}/api/users/create \
  -H 'authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
	"user":{
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "admin",
        "managerId":101,
        "department": "DEV",
        "title": "Tech Lead",
        "active": true
	}
}'
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/users/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
	"user":{
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "super_admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId":101,
        "active": true
	}
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

Update User


To update a user via API, please make a call to /users/update with the following parameters.

 /users/update
 application/json


REQUEST
{
    "user":{
        "partyId": "54",
        "firstName": "Steve",
        "lastName": "Rogers",
        "address": "New Delhi, India",
        "userRole": "super_admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId":"101",
        "active": false
	}
}
	
Parameter Description
partyId (required) the unique party id for the user to be updated
firstName (optional) First name of the account user
lastName (optional) Last name of the account user
emailId (optional) Email address of the account user
address (optional) Address of account user
userRole (optional) Can be one of three values: 1) user 2) admin 3) super_admin
department (optional) Department of the user
title (optional) Designation/Title of the account user
managerId (optional) Party Id of one of the Admin or Super-Admin from your account, which will act as manager for this user
active (default=false) Value can be either true or false
RESPONSE
{
	"result": "success",
	"message": "user 54 updated successfully."
}
	

Sample Code
curl -X POST \
  https:/{{HOST_NAME}}/api/users/update \
  -H 'authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
	"user":{
	    "partyId":123,
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "super_admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId":101,
        "active": true
	}
}'
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/users/update",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
	"user":{
        "partyId":123,
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "super_admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId":101,
        "active": true
	}
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

Delete User


To delete a user via API, please make a call to /users/delete with the following parameter.

 /users/delete?userId={userId}


Request Parameters
userId Party Id for that user

RESPONSE
		{
			"result":"success",
			"message":"User 54 deleted successfully"
			 
		}
	

Smaple Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/users/delete?userId=123"
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/users/delete?userId=123",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

List all Users


To get a list of all the users in the account, use the following call

 /users/list


RESPONSE
		{
		    "usersList": [
		        {
		            "partyId": 54,
		            "firstName": "Steve",
		            "lastName": "Rogers",
		            "emailId": "abc@gmail.com",
		            "address": "New Delhi, India",
		            "dateCreated": 1492662823000,
		            "companyId": 32567,
		            "userRole": "Admin",
		            "userAddedDate": 1504778908000,
		            "department": "DEV",
		            "title": "Tech Lead",
		            "active": true,
		            "requestLocale": "auto",
		            "managerId": null
		        },
		        {
		            "partyId": 123,
		            "firstName": "Sandra",
		            "lastName": "Smith",
		            "emailId": "san_smith@esigngenie.com",
		            "address": "East Delhi, India",
		            "dateCreated": 1492662823000,
		            "companyId": 32567,
		            "userRole": "Super-Administrator",
		            "userAddedDate": 1504779092000,
		            "department": "Testing",
		            "title": "Test Lead",
		            "active": true,
		            "requestLocale": "auto",
		            "managerId": null
		        },
		        {
		            "partyId": 456,
		            "firstName": "Amanda",
		            "lastName": "Williams",
		            "emailId": "williams_ama@esigngenie.com",
		            "address": "",
		            "dateCreated": 1492662824000,
		            "companyId": 32567,
		            "userRole": "super_admin",
		            "userAddedDate": 1504777539000,
		            "department": null,
		            "title": null,
		            "active": true,
		            "requestLocale": "auto",
		            "managerId": null
		        },
		        {
		            "partyId": 789,
		            "firstName": "Hannah",
		            "lastName": "Pitt",
		            "emailId": "pitthannah@esigngenie.com",
		            "address": null,
		            "dateCreated": 1492662824000,
		            "companyId": 32567,
		            "userRole": "super_admin",
		            "userAddedDate": 1504785081000,
		            "department": "",
		            "title": "",
		            "active": true,
		            "requestLocale": "auto",
		            "managerId": null
		        }
		    ],
		    "allActiveUsers": 4,
		    "allInactiveUsers": 0
		}
	

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/users/list"
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/users/list",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

Account API

Create New Account


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

 /accounts/create
 application/json


REQUEST
{
	"client_id":"YOUR_CLIENT_ID",
	"client_secret":"YOUR_CLIENT_SECRET",
	"company":{
		"companyName":"Wayne Tech",
		"companyAddress":"LA, US"
	},
	"user":{
		"firstName":"Bruce",
		"lastName":"Wayne",
		"emailId":"bruce.wayne_as@esigngenie.com",
		"loginPassword":"12345"
	},
	"planName":"Professional",
	"accountType":"partner-pay",
	"partner_code":"YOUR_PARTNER_CODE"
}
	
Parameter Description
client_id 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.

RESPONSE
{
    "refresh_token": "bd7f308011b34605bc1ab79cbca16c3c",
    "access_token": "952012fd55e7421faf8d1ac80e30dd0a",
    "token_type": "bearer",
    "expires_in": 31535999,
    "result": "success",
    "message": "new company registration successful",
    "company": {
        "companyId": 30,
        "companyName": "Wayne Tech",
        "companyAddress": "LA, US",
        "companyTimeZone": "America/Los_Angeles",
        "companyDateFormat": "MM/DD/YYYY",
        "creationDate": 1504696542000,
        "companyReferer": "test",
        "accountType": "partner-pay",
        "accountStatus": "active",
        "accountOwner": 1147,
        "passwordProtectEnvelopes": false,
        "attachCertificateToDocs": false,
        "defaultSignOption": "TYPE",
        "sendNotificationToOwner": false,
        "sendPDFWithMail": true,
        "defaultFieldNavigation": "ALL",
        "defaultDisplayIndicators": true,
        "allowRecipientsToDelegate": false,
        "allFeatures": [
            "Reports",
            "Digitally Certified Pdf",
            "Upload to Cloud",
            "Attachments"
        ],
        "signatureFont": null,
        "viewOnlyDefaulSignOption": false,
        "customSenderName": null,
        "customSenderEmail": null
    }
}
	

Note: access_token and refresh_token will only be issued if the request is made via a trusted partner's account code.


Sample Code
curl -X POST \
  https://{{HOST_NAME}}/api/accounts/create \
  -H 'authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
	"client_id":"YOUR_CLIENT_ID",
	"client_secret":"YOUR_CLIENT_SECRET",
	"company":{
		"companyName":"Wayne Tech",
		"companyAddress":"LA, US"
	},
	"user":{
		"firstName":"Bruce",
		"lastName":"Wayne",
		"emailId":"bruce.wayne_as@esigngenie.com"
	},
	"planName":"Professional",
	"accountType":"partner-pay",
	"partner_code":"second partner"
}'
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/accounts/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
	"client_id":"YOUR_CLIENT_ID",
	"client_secret":"YOUR_CLIENT_SECRET",
	"company":{
		"companyName":"Wayne Tech",
		"companyAddress":"LA, US"
	},
	"user":{
		"firstName":"Bruce",
		"lastName":"Wayne",
		"emailId":"bruce.wayne_as@esigngenie.com"
	},
	"planName":"Professional",
	"accountType":"partner-pay",
	"partner_code":"second partner"
}',
  
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

Cancel Account


To cancel an account via API, please make a call to /accounts/cancel

 /accounts/cancel


RESPONSE
		{
		    "result": "success",
		    "message": "company 32567 canceled successfully"
		}
	

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/accounts/cancel"
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/accounts/cancel",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

Reactivate Account


To reactivate an account via API, please make a call to /accounts/reactivate

 /accounts/reactivate


RESPONSE
		{
		    "result": "success",
		    "message": "Company 32567 reactivated successfully"
		}
	

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/accounts/reactivate"
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/accounts/reactivate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

Change The Number of Licenses


To change number of license of an account via API, please make a call to /accounts/changenumberoflicences

 /accounts/changenumberoflicences


Request Parameters
newNumberOfLicences The new required number of licenses for the account
partnerCode Enter the unique partner code assigned to the partner to link this account with the specified partner

RESPONSE
		{
		    "result": "success",
		    "message": "Company 32567 license number changed to 3"
		}
	

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/accounts/changenumberoflicences?newNumberOfLicences=5"
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/accounts/changenumberoflicences?newNumberOfLicences=5",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

Change Subscription Plan


To change the subscription plan of an account, please make a call to /accounts/changeplan

 /accounts/changeplan


Request Parameters
newPlan Name of plan that you want to subscribe to
newNumberOfLicences The new required number of licenses for the account in the new plan

RESPONSE
		{
		    "result": "success",
		    "message": "Company 32567 plan changed to Business Premium"
		}
	

Sample Code
curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Cache-Control: no-cache" "https://{{HOST_NAME}}/api/accounts/changeplan?newPlan=Professional&newNumberOfLicences=5"
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{HOST_NAME}}/api/accounts/changeplan?newPlan=Professional&newNumberOfLicences=5",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	

Channel Account API

CHANNEL_API_HOST_NAME https://api.foxitesign.foxit.com/

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.

  /api/v1/channelSubscription/createEsignSubscription
  application/json


REQUEST

Note: Required parameters are marked in red.

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": {
    "email": "abc@xyz.com",
    "first_name": "John",
    "last_name": "Doe",
    "app_code": "foxit_sign_individual",
    "send_from_appstore": true,
    "password":"M_1abc@124",
    "need_cus_confirm":"0", 
    "user_count": "1",
    "envelope_numbers": "20",  
    "template_numbers": "5",
    "billing_cycle":"monthly",
    "next_plan_period_start": "2023-06-29", 
    "id": "AS-eSgn-04-08-22-A3",  
    "order_id": "OI-eSgn-04-08-22-A3",  
    "external_id": "EI-eSgn-04-08-22-A3",
    "orgName": "Foxit eSign 04_08_22_A3",
    "orgCode": "FOXITESIGNTEST040822A3",
    "country": "US",  
    "currency": "USD",
    "language": ["en-US"],
    "price":"101",
    "amount":"101", 
    "send_welcome_mail": false,
    "custom_field1": {
        "name": "NAME",
      	"value": "VALUE"
    }
  }
}

	
Parameter Description
email (required) The administrator's email address
app_code (required) ex: foxit_sign_individual
Product Name app_code
Foxit eSign foxit_sign_individual
Foxit eSign Pro foxit_sign_pro_individual
PDF Editor Pro + for Mac pdfeditor_pro_plus_mac
PDF Editor Pro + for Win pdfeditor_pro_plus_win
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
id (optional) 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.
language (optional, default = en-US) ["en-US", "zh-CN", "zh-HK", "zh-TW", "da-DK", "nl-NL", "fi-FI", "fr-FR", "de-DE", "it-IT", "ja-JP", "ko-KR", "nb-NO", "pl-PL", "pt-BR", "pt-PT", "ru-RU", "es-419", "sv-SE"]
trackingId (optional) It should be a unique value. ex: CloudBlue
external_id (optional) It should be a unique value. ex: "AS-9571-3418-5429"
send_welcome_mail (optional, default = true) send a welcome email for the new subscription account.
Value can be either true or false
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

RESPONSE
{
    "ret": 200,
    "msg": "Request Success",
    "data": {
        "id": "SI-1671021888723-CloudBlue",
        "custom_field1": {
            "name": "NAME",
      		"value": "VALUE"
        }
    "activation_link":""
    }
}
	

Sample Code
POST: /api/v1/channelSubscription/createEsignSubscription
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": {
    "orgName": "Wayne Tech ",
    "email": "abc@xyz.com",
    "first_name": "John",
    "last_name": "Doe",
    "app_code": "foxit_sign_individual",
    "id": "SI-eSgn-04-08-22-A3",  
    "order_id": "OI-eSgn-04-08-22-A3",  
    "external_id": "EI-eSgn-04-08-22-A3",
    "orgCode": "FOXITESIGNTEST040822A3",  
    "user_count": "1",
    "envelope_numbers": "20",  
    "template_numbers": "5",  
    "next_plan_period_start": "2023-06-29", 
    "country": "US",  
    "currency": "USD",     
    "trackingId": "YOUR_DISTRIBUTOR_TRACKING_ID",
    "send_from_appstore": true,
    "password":"Welcome@123",
    "language": ["en-US"],
    "billing_cycle":"monthly",
    "price":"101",
    "amount":"101", 
    "send_welcome_mail":false,
    "send_email_to_val": "abc1@xyz.com;abc2@xyz.com",
    "custom_field1": {
        "name": "NAME",
      	"value": "VALUE"
    }
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createEsignSubscription' \
--header 'Content-Type: application/json' \
--data-raw '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": {
    "orgName": "Wayne Tech ",
    "email": "abc@xyz.com",
    "first_name": "John",
    "last_name": "Doe",
    "app_code": "foxit_sign_individual",
    "id": "SI-eSgn-04-08-22-A3",  
    "order_id": "OI-eSgn-04-08-22-A3",  
    "external_id": "EI-eSgn-04-08-22-A3",
    "orgCode": "FOXITESIGNTEST040822A3",  
    "user_count": "1",
    "envelope_numbers": "20",  
    "template_numbers": "5",  
    "next_plan_period_start": "2023-06-29", 
    "country": "US",  
    "currency": "USD",     
    "trackingId": "YOUR_DISTRIBUTOR_TRACKING_ID",
    "send_from_appstore": true,
    "password":"Welcome@123",
    "language": ["en-US"],
    "billing_cycle":"monthly",
    "price":"101",
    "amount":"101",
    "send_welcome_mail":false, 
    "send_email_to_val": "abc1@xyz.com;abc2@xyz.com",
    "custom_field1": {
        "name": "NAME",
      	"value": "VALUE"
    }
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createEsignSubscription',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": {
    "orgName": "Wayne Tech ",
    "email": "abc@xyz.com",
    "first_name": "John",
    "last_name": "Doe",
    "app_code": "foxit_sign_individual",
    "id": "SI-eSgn-04-08-22-A3",  
    "order_id": "OI-eSgn-04-08-22-A3",  
    "external_id": "EI-eSgn-04-08-22-A3",
    "orgCode": "FOXITESIGNTEST040822A3",  
    "user_count": "1",
    "envelope_numbers": "20",  
    "template_numbers": "5",  
    "next_plan_period_start": "2023-06-29", 
    "country": "US",  
    "currency": "USD",     
    "trackingId": "YOUR_DISTRIBUTOR_TRACKING_ID",
    "send_from_appstore": true,
    "password":"Welcome@123",
    "language": ["en-US"],
    "billing_cycle":"monthly",
    "price":"101",
    "amount":"101", 
    "send_welcome_mail":false,
    "send_email_to_val": "abc1@xyz.com;abc2@xyz.com",
    "custom_field1": {
        "name": "NAME",
      	"value": "VALUE"
    }
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createEsignSubscription");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": {
" + "\n" +
@"    ""orgName"": ""Wayne Tech "",
" + "\n" +
@"    ""email"": ""abc@xyz.com"",
" + "\n" +
@"    ""first_name"": ""John"",
" + "\n" +
@"    ""last_name"": ""Doe"",
" + "\n" +
@"    ""app_code"": ""foxit_sign_individual"",
" + "\n" +
@"    ""id"": ""SI-eSgn-04-08-22-A3"",  
" + "\n" +
@"    ""order_id"": ""OI-eSgn-04-08-22-A3"",  
" + "\n" +
@"    ""external_id"": ""EI-eSgn-04-08-22-A3"",
" + "\n" +
@"    ""orgCode"": ""FOXITESIGNTEST040822A3"",  
" + "\n" +
@"    ""user_count"": ""1"",
" + "\n" +
@"    ""envelope_numbers"": ""20"",  
" + "\n" +
@"    ""template_numbers"": ""5"",  
" + "\n" +
@"    ""next_plan_period_start"": ""2023-06-29"", 
" + "\n" +
@"    ""country"": ""US"",  
" + "\n" +
@"    ""currency"": ""USD"",     
" + "\n" +
@"    ""trackingId"": ""YOUR_DISTRIBUTOR_TRACKING_ID"",
" + "\n" +
@"    ""send_from_appstore"": true,
" + "\n" +
@"    ""password"":""Welcome@123"",
" + "\n" +
@"    ""language"": [""en-US""],
" + "\n" +
@"    ""billing_cycle"":""monthly"",
" + "\n" +
@"    ""price"":""101"",
" + "\n" +
@"    ""amount"":""101"", 
" + "\n" +
@"    ""send_welcome_mail"": false, 
" + "\n" +
@"    ""send_email_to_val"": ""abc1@xyz.com;abc2@xyz.com"",
" + "\n" +
@"    ""custom_field1"": {
" + "\n" +
@"        ""name"": ""NAME"",
" + "\n" +
@"      	""value"": ""VALUE""
" + "\n" +
@"    },
" + "\n" +
@"    ""custom_field2"": {
" + "\n" +
@"        ""name"": ""NAME"",
" + "\n" +
@"      	""value"": ""VALUE"" 
" + "\n" +
@"    }
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": {\r\n    \"orgName\": \"Wayne Tech \",\r\n    \"email\": \"abc@xyz.com\",\r\n    \"first_name\": \"John\",\r\n    \"last_name\": \"Doe\",\r\n    \"app_code\": \"foxit_sign_individual\",\r\n    \"id\": \"SI-eSgn-04-08-22-A3\",  \r\n    \"order_id\": \"OI-eSgn-04-08-22-A3\",  \r\n    \"external_id\": \"EI-eSgn-04-08-22-A3\",\r\n    \"orgCode\": \"FOXITESIGNTEST040822A3\",  \r\n    \"user_count\": \"1\",\r\n    \"envelope_numbers\": \"20\",  \r\n    \"template_numbers\": \"5\",  \r\n    \"next_plan_period_start\": \"2023-06-29\", \r\n    \"country\": \"US\",  \r\n    \"currency\": \"USD\",     \r\n    \"trackingId\": \"YOUR_DISTRIBUTOR_TRACKING_ID\",\r\n    \"send_from_appstore\": true,\r\n    \"password\":\"Welcome@123\",\r\n    \"language\": [\"en-US\"],\r\n    \"billing_cycle\":\"monthly\",\r\n    \"price\":\"101\",\r\n    \"amount\":\"101\", \r\n	 \"send_welcome_mail\": false,\r\n   \"send_email_to_val\": \"abc1@xyz.com;abc2@xyz.com\",\r\n    \"custom_field1\": {\r\n        \"name\": \"NAME\",\r\n      \t\"value\": \"VALUE\"\r\n    },\r\n    \"custom_field2\": {\r\n        \"name\": \"NAME\",\r\n      \t\"value\": \"VALUE\" \r\n    }\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createEsignSubscription")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Enterprise/Team Plans


This API allows Enterprise/Team subscription plans to be created through the Admin Console, Allowing effortless control and access to advanced features.

  /api/v1/channelSubscription/createEsignEntpSubscription
  application/json


REQUEST

Note: Required parameters are marked in red.

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": {
    "email": "abc@xyz.com",
    "first_name": "aaa1",
    "last_name": "bbb1",
    "send_from_appstore": false,
    "product": {
      "pdfeditor_pro_plus_win": {
        "id": "PI-Entp-04-08-22-A1",
        "user_count": "8",
        "envelope_numbers": "20",
        "template_numbers": "5",
        "expire_date": "2023-08-30",
        "product_price": "8.4",
        "product_amount": "67.2",
        "setup_admin":"setupadmin@xyz.com",
      }
    },
    "password": "M_1abc@124",
    "need_cus_confirm":"0", 
    "company_name": "YOUR_COMPANY_NAME",
    "order_id": "OI-Entp-04-08-22-A1",
    "external_id": "EI-Entp-04-08-22-A1",
    "admin_console_id": "AS-Entp-04-08-22-A1",
    "country": "US",
    "billing_cycle":"monthly",
    "next_plan_period_start": "2023-08-30",
    "currency":"USD",
    "amount": "67.2",
    "send_welcome_mail": false,
    "custom_field1": {
      "name": "NAME",
      "value": "VALUE"
    }
  }
}
	
Parameter Description
action (required) Create subscription, eg:1
email (required) The administrator's email address
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.
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

RESPONSE
{
    "ret": 200,
    "msg": "Request Success",
    "data": {
        "id": "AS-9547-0638-0102a2",
        "activation_link": "",
        "order_id": "OI-Entp-04-08-22-A1",
        "product_ids": {
            "PI-Entp-04-08-22-A1": "pdfeditor_pro_plus_win"
        }
    }
}		
	

Sample Code
POST /api/v1/channelSubscription/createEsignEntpSubscription
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": {
    "email": "abc@xyz.com",
    "first_name": "aaa1",
    "last_name": "bbb1",
    "send_from_appstore": false,
    "product": {
      "pdfeditor_pro_plus_win": {
        "id": "PI-Entp-04-08-22-A1",
        "user_count": "8",
        "envelope_numbers": "20",
        "template_numbers": "5",
        "expire_date": "2023-08-30",
        "product_price": "8.4",
        "product_amount": "67.2",
        "setup_admin":"setupadmin@xyz.com",
      }
    },
    "password": "M_1abc@124",
    "need_cus_confirm":"0", 
    "company_name": "YOUR_COMPANY_NAME",
    "order_id": "OI-Entp-04-08-22-A1",
    "external_id": "EI-Entp-04-08-22-A1",
    "admin_console_id": "AS-Entp-04-08-22-A1",
    "country": "US",
    "billing_cycle":"monthly",
    "next_plan_period_start": "2023-08-30",
    "currency":"USD",
    "amount": "67.2",
    "send_welcome_mail": false,
    "custom_field1": {
      "name": "NAME",
      "value": "VALUE"
    }
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createEsignEntpSubscription' \
--header 'Content-Type: application/json' \
--data-raw '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": {
    "email": "abc@xyz.com",
    "first_name": "aaa1",
    "last_name": "bbb1",
    "send_from_appstore": false,
    "product": {
      "pdfeditor_pro_plus_win": {
        "id": "PI-Entp-04-08-22-A1",
        "user_count": "8",
        "envelope_numbers": "20",
        "template_numbers": "5",
        "expire_date": "2023-08-30",
        "product_price": "8.4",
        "product_amount": "67.2",
        "setup_admin":"setupadmin@xyz.com",
      }
    },
    "password": "M_1abc@124",
    "need_cus_confirm":"0", 
    "company_name": "YOUR_COMPANY_NAME",
    "order_id": "OI-Entp-04-08-22-A1",
    "external_id": "EI-Entp-04-08-22-A1",
    "admin_console_id": "AS-Entp-04-08-22-A1",
    "country": "US",
    "billing_cycle":"monthly",
    "next_plan_period_start": "2023-08-30",
    "currency":"USD",
    "amount": "67.2",
    "send_welcome_mail": false,
    "custom_field1": {
      "name": "NAME",
      "value": "VALUE"
    }
  }
}'
			
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createEsignEntpSubscription',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": {
    "email": "abc@xyz.com",
    "first_name": "aaa1",
    "last_name": "bbb1",
    "send_from_appstore": false,
    "product": {
      "pdfeditor_pro_plus_win": {
        "id": "PI-Entp-04-08-22-A1",
        "user_count": "8",
        "envelope_numbers": "20",
        "template_numbers": "5",
        "expire_date": "2023-08-30",
        "product_price": "8.4",
        "product_amount": "67.2",
        "setup_admin":"setupadmin@xyz.com",
      }
    },
    "password": "M_1abc@124",
    "need_cus_confirm":"0", 
    "company_name": "YOUR_COMPANY_NAME",
    "order_id": "OI-Entp-04-08-22-A1",
    "external_id": "EI-Entp-04-08-22-A1",
    "admin_console_id": "AS-Entp-04-08-22-A1",
    "country": "US",
    "billing_cycle":"monthly",
    "next_plan_period_start": "2023-08-30",
    "currency":"USD",
    "amount": "67.2",
    "send_welcome_mail": false,
    "custom_field1": {
      "name": "NAME",
      "value": "VALUE"
    }
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createEsignEntpSubscription");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": {
" + "\n" +
@"    ""email"": ""abc@xyz.com"",
" + "\n" +
@"    ""first_name"": ""aaa1"",
" + "\n" +
@"    ""last_name"": ""bbb1"",
" + "\n" +
@"    ""send_from_appstore"": false,
" + "\n" +
@"    ""product"": {
" + "\n" +
@"      ""pdfeditor_pro_plus_win"": {
" + "\n" +
@"        ""id"": ""PI-Entp-04-08-22-A1"",
" + "\n" +
@"        ""user_count"": ""8"",
" + "\n" +
@"        ""envelope_numbers"": ""20"",
" + "\n" +
@"        ""template_numbers"": ""5"",
" + "\n" +
@"        ""expire_date"": ""2023-08-30"",
" + "\n" +
@"        ""product_price"": ""8.4"",
" + "\n" +
@"        ""product_amount"": ""67.2"",
" + "\n" +
@"        ""setup_admin"":""setupadmin@xyz.com"",
" + "\n" +
@"      }
" + "\n" +
@"    },
" + "\n" +
@"    ""password"": ""M_1abc@124"",
" + "\n" +
@"    ""need_cus_confirm"":""0"", 
" + "\n" +
@"    ""company_name"": ""YOUR_COMPANY_NAME"",
" + "\n" +
@"    ""order_id"": ""OI-Entp-04-08-22-A1"",
" + "\n" +
@"    ""external_id"": ""EI-Entp-04-08-22-A1"",
" + "\n" +
@"    ""admin_console_id"": ""AS-Entp-04-08-22-A1"",
" + "\n" +
@"    ""country"": ""US"",
" + "\n" +
@"    ""billing_cycle"":""monthly"",
" + "\n" +
@"    ""next_plan_period_start"": ""2023-08-30"",
" + "\n" +
@"    ""currency"":""USD"",
" + "\n" +
@"    ""amount"": ""67.2"",
" + "\n" +
@"    ""send_welcome_mail"": false,
" + "\n" +
@"    ""custom_field1"": {
" + "\n" +
@"      ""name"": ""NAME"",
" + "\n" +
@"      ""value"": ""VALUE""
" + "\n" +
@"    }
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": {\r\n    \"email\": \"abc@xyz.com\",\r\n    \"first_name\": \"aaa1\",\r\n    \"last_name\": \"bbb1\",\r\n    \"send_from_appstore\": false,\r\n    \"product\": {\r\n      \"pdfeditor_pro_plus_win\": {\r\n        \"id\": \"PI-Entp-04-08-22-A1\",\r\n        \"user_count\": \"8\",\r\n        \"envelope_numbers\": \"20\",\r\n        \"template_numbers\": \"5\",\r\n        \"expire_date\": \"2023-08-30\",\r\n        \"product_price\": \"8.4\",\r\n        \"product_amount\": \"67.2\",\r\n        \"setup_admin\":\"setupadmin@xyz.com\",\r\n      }\r\n    },\r\n    \"password\": \"M_1abc@124\",\r\n    \"need_cus_confirm\":\"0\", \r\n    \"company_name\": \"YOUR_COMPANY_NAME\",\r\n    \"order_id\": \"OI-Entp-04-08-22-A1\",\r\n    \"external_id\": \"EI-Entp-04-08-22-A1\",\r\n    \"admin_console_id\": \"AS-Entp-04-08-22-A1\",\r\n    \"country\": \"US\",\r\n    \"billing_cycle\":\"monthly\",\r\n    \"next_plan_period_start\": \"2023-08-30\",\r\n    \"currency\":\"USD\",\r\n    \"amount\": \"67.2\",\r\n    \"send_welcome_mail\": false,\r\n    \"custom_field1\": {\r\n      \"name\": \"NAME\",\r\n      \"value\": \"VALUE\"\r\n    }\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createEsignEntpSubscription")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Update Subscription


This API allows updating existing subscriptions by increasing/decreasing licenses, upgrading, downgrading, or canceling the subscription as needed.

  /api/v1/channelSubscription/updateEcommerceSubscription
  application/json

REQUEST

Note: Required parameters are marked in red.

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "action": "increase_license",
    "email": "abc@xyz.com",
    "subscription_items":[
        {
            "id": "AS/PI-Entp-04-08-22-A1",
            "app_code": "foxit_sign_individual",
            "billing_cycle": "yearly",
            "user_count": "4",
            "envelope_numbers": "250",
            "template_numbers": "1000",
            "amount":"100.00",
            "next_cycle_amount": "200.00",
            "add_pooling_allowed":"Yes"
       }
    ],
    "order_id": "OI-Entp-04-08-22-005"
  }
}
	
Parameter Description
action (required)
Parameter Description
increase_license 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 console id, then it will update all product subscriptions managed by the admin console.
    • If the parameter id passes the value of product id, then it will update the particular product only.
  • In the case of non-admin console subscription:
    • Passing the parameter value of subscription id 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
order_id(optional) Unique order id for update subscription

RESPONSE
{
    "ret": 200,
    "msg": "Request Success",
    "data": []
}
	

Sample Code
POST /api/v1/channelSubscription/updateEcommerceSubscription
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "action": "increase_license",
    "email": "29aug2@mailinator.com",
    "order_id": "OI-Entp-04-08-22-92",
    "subscription_items":[
        {
            "id": "a2122",
            "app_code": "foxit_sign_individual",
            "user_count": "4",
            "billing_cycle": "yearly",
            "envelope_numbers": "250",
            "template_numbers": "1000"
       }
    ]
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/updateEcommerceSubscription' \
--header 'Content-Type: application/json' \
--data-raw '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "action": "increase_license",
    "email": "29aug2@mailinator.com",
    "order_id": "OI-Entp-04-08-22-92",
    "subscription_items":[
        {
            "id": "a2122",
            "app_code": "foxit_sign_individual",
            "user_count": "4",
            "billing_cycle": "yearly",
            "envelope_numbers": "250",
            "template_numbers": "1000"
       }
    ]
  },
    "next_plan_period_start":"2022-08-31",
    "trackingId": "YOUR_DISTRIBUTOR_TRACKING_ID"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/updateEcommerceSubscription',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "action": "increase_license",
    "email": "29aug2@mailinator.com",
    "order_id": "OI-Entp-04-08-22-92",
    "subscription_items":[
        {
            "id": "a2122",
            "app_code": "foxit_sign_individual",
            "user_count": "4",
            "billing_cycle": "yearly",
            "envelope_numbers": "250",
            "template_numbers": "1000"
       }
    ]
  },
    "next_plan_period_start":"2022-08-31",
    "trackingId": "YOUR_DISTRIBUTOR_TRACKING_ID"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient(options);
var request = new RestRequest(https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/updateEcommerceSubscription, Method.Get);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": { 
" + "\n" +
@"    ""action"": ""increase_license"",
" + "\n" +
@"    ""email"": ""29aug2@mailinator.com"",
" + "\n" +
@"    ""order_id"": ""OI-Entp-04-08-22-92"",
" + "\n" +
@"    ""subscription_items"":[
" + "\n" +
@"        {
" + "\n" +
@"            ""id"": ""a2122"",
" + "\n" +
@"            ""app_code"": ""foxit_sign_individual"",
" + "\n" +
@"            ""user_count"": ""4"",
" + "\n" +
@"            ""billing_cycle"": ""yearly"",
" + "\n" +
@"            ""envelope_numbers"": ""250"",
" + "\n" +
@"            ""template_numbers"": ""1000""
" + "\n" +
@"       }
" + "\n" +
@"    ]
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": { \r\n  \"action\": \"increase_license\",\r\n  \"email\": \"29aug2@mailinator.com\",\r\n  \"order_id\": \"OI-Entp-04-08-22-92\",\r\n  \"subscription_items\":[\r\n  {\r\n  \"id\": \"a2122\",\r\n  \"app_code\": \"foxit_sign_individual\",\r\n  \"user_count\": \"4\",\r\n  \"billing_cycle\": \"yearly\",\r\n  \"envelope_numbers\": \"250\",\r\n  \"template_numbers\": \"1000\"\r\n }\r\n  ]\r\n  }\r\n}");
Request request = new Request.Builder()
  .url(https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/updateEcommerceSubscription)
  .method("GET", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Get Subscription Details by Subscription ID


To get subscription details, Using the Subscription ID. This API call will help retrieve all the essential information about the specific subscription.

  /api/v1/channelSubscription/getSubscriptionBySubscId
  application/json


REQUEST

Note: Required parameters are marked in red.

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue"
  }
}

	
Parameter Description
id (required) 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

RESPONSE
{
    "ret": 200,
    "msg": "",
    "data": {
        "id": "SI-1671021888723-CloudBlue",
        "external_id": "EID-1671021888723-CloudBlue",
        "status": "active",
        "user_count": 2,
        "envelope_numbers": 40,
        "template_numbers": 5,
        "next_plan_period_start": "2023-01-06",
        "auto_renewal_status": true
    }
}
	

Sample Code
POST /api/v1/channelSubscription/getSubscriptionBySubscId
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue"
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionBySubscId' \
--header 'Content-Type: application/json' \
--data-raw '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionBySubscId',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionBySubscId");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": { 
" + "\n" +
@"    ""id"": ""SI-1671021888723-CloudBlue""
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": { \r\n    \"id\": \"SI-1671021888723-CloudBlue\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionBySubscId")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Get Subscription Details by Email ID


To get subscription details, Using the Email ID. This API call will help retrieve all the essential information about the specific subscription.

  /api/v1/channelSubscription/getSubscriptionListByEmailId
  application/json


REQUEST

Note: Required parameters are marked in red.

{
  "partner_code": "YOUR_PARTNER_CODE",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "data": {
    "emailId":"abc@zyx.com"
  }
}

	
Parameter Description
emailId (required) email id of the subscription account owner is required.

RESPONSE
{
    "ret": 200,
    "msg": "",
    "data": [
        {
            "custom_field2": {
                "name": "customField2Data",
                "value": {
                    "payloadTrackingId": 1234,
                    "admin_console": true
                }
            },
            "id": "PI-1234-5678-001",
            "external_id": null,
            "company_id": 5678,
            "status": "active",
            "user_count": 4,
            "envelope_numbers": 80,
            "template_numbers": 20,
            "next_plan_period_start": "2024-02-17"
        },
        {
            "custom_field2": {
                "name": "customField2Data",
                "value": {
                    "payloadTrackingId": 1234,
                    "admin_console": true
                }
            },
            "id": "PI-1234-5678-002",
            "external_id": null,
            "company_id": 1234,
            "status": "active",
            "user_count": 3,
            "envelope_numbers": 80,
            "template_numbers": 20,
            "next_plan_period_start": "2024-02-17",
            "auto_renewal_status": true
        }
    ]
}
	

Sample Code
POST /api/v1/channelSubscription/getSubscriptionListByEmailId
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "partner_code": "YOUR_PARTNER_CODE",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "data": {
    "emailId":"abc@zyx.com"
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionListByEmailId' \
--header 'Content-Type: application/json' \
--data-raw '{
  "partner_code": "YOUR_PARTNER_CODE",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "data": {
    "emailId":"abc@zyx.com"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionListByEmailId',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "partner_code": "YOUR_PARTNER_CODE",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "data": {
    "emailId":"abc@zyx.com"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					

var options = new RestClientOptions("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionListByEmailId")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""data"": {
" + "\n" +
@"    ""emailId"":""abc@zyx.com""
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
					

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"data\": {\r\n    \"emailId\":\"abc@zyx.com\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionListByEmailId")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Get Subscription Details by External ID


To get subscription details using External ID, provide the specific External ID to the API, which will return the corresponding subscription information.

  /api/v1/channelSubscription/getSubscriptionByExternalId
  application/json


REQUEST

Note: Required parameters are marked in red.

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "external_id": "YOUR_EXTERNAL_ID"
  }
}
	
Parameter Description
external_id (required) Access subscription details using the external ID provided during eSign subscription creation

RESPONSE
{
    "ret": 200,
    "msg": "",
    "data": {
        "custom_field1": {
            "name": "NAME",
      		"value": "VALUE"
        },
        "custom_field2": {
            "name": "NAME",
      		"value": "VALUE"
        },
        "id": "SI-1671021888723-CloudBlue",
        "external_id": "EID-1671021888723-CloudBlue",
        "status": "active",
        "user_count": 2,
        "envelope_numbers": 40,
        "template_numbers": 5,
        "next_plan_period_start": "2023-01-06",
        "auto_renewal_status": true
    }
}
	

Sample Code
POST /api/v1/channelSubscription/getSubscriptionByExternalId
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "external_id": "YOUR_EXTERNAL_ID"
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionByExternalId' \
--header 'Content-Type: application/json' \
--data-raw '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "external_id": "YOUR_EXTERNAL_ID"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionByExternalId',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "external_id": "YOUR_EXTERNAL_ID"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionByExternalId");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": { 
" + "\n" +
@"    ""external_id"": ""YOUR_EXTERNAL_ID""
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": { \r\n    \"external_id\": \"YOUR_EXTERNAL_ID\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/getSubscriptionByExternalId")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Get Subscription Modification History


It retrieve a comprehensive modification history for any given subscription.

  /api/v1/channelSubscription/get-subscription-history
  application/json


REQUEST

Note: Required parameters are marked in red.

{
  
  "partner_code": "XXX",
  "client_id": "YYYY",
  "client_secret": "ZZZ",
  "data":
    {  "email":"abc@getnada.com",
       "id": "AS/PS-1234-5678"  
    }
}
	

Parameter Description
id(optional) 1. If it is an admin console subscription.

 a. The parameter id passes the value of the admin console id for managing subscriptions for all product modification history.

 b. The parameter id passes the value of the product id for managing individual product subscriptions.

2. For non-Admin Console subscriptions, the subscription id needs to be provided.
email(optional) Email id of the subscription account owner.


RESPONSE
{
    "ret": 200,
    "msg": "success",
    "data": [
        {
            "id": "1",
            "email": "abc@getnada.com",
            "order_id": "1",
            "app_code": "foxit_sign",
            "product_id": "9",
            "billing_cycle": "monthly",
            "user_count": "2",
            "template_numbers": "100",
            "envelope_numbers": "100",
            "currency": "USD",
            "custom_field": null,
            "amount": "100",
            "next_cycle_amount": "100",
            "type": "create_subscription"
        },
        {
            "id": "3",
            "email": "abc@getnada.com",
            "order_id": "3",
            "app_code": "foxit_sign",
            "product_id": "9",
            "billing_cycle": "monthly",
            "user_count": "2",
            "template_numbers": "100",
            "envelope_numbers": "100",
            "currency": "USD",
            "custom_field": {
                "custom_field2": {
                    "name": "customField2Data",
                    "value": {
                        "payloadTrackingId": 1330,
                        "admin_console": true
                    }
                }
            },
            "amount": "100",
            "next_cycle_amount": "100",
            "type": "upgrade"
        }
    ]
}
	


Sample Code
POST  /api/v1/channelSubscription/get-subscription-history
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json
Content-Length: 179
{
    "partner_code": "XXX",
    "client_id": "YYYY",
    "client_secret": "ZZZ",
    "data": {
        "email": "abc@getnada.com",
        "id": "AS/PS-1234-5678"
    }
}
				
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME} /api/v1/channelSubscription/get-subscription-history' \
--header 'Content-Type: application/json' \
--data-raw '{
    "partner_code": "XXX",
    "client_id": "YYYY",
    "client_secret": "ZZZ",
    "data": {
        "email": "abc@getnada.com",
        "id": "AS/PS-1234-5678"
    }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME} /api/v1/channelSubscription/get-subscription-history',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "partner_code": "XXX",
    "client_id": "YYYY",
    "client_secret": "ZZZ",
    "data": {
        "email": "abc@getnada.com",
        "id": "AS/PS-1234-5678"
    }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME} /api/v1/channelSubscription/get-subscription-history");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body =  @"{
" + "\n" +
@"    ""partner_code"": ""XXX"",
" + "\n" +
@"    ""client_id"": ""YYYY"",
" + "\n" +
@"    ""client_secret"": ""ZZZ"",
" + "\n" +
@"    ""data"": {
" + "\n" +
@"        ""email"": ""abc@getnada.com"",
" + "\n" +
@"        ""id"": ""AS/PS-1234-5678""
" + "\n" +
@"    }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"partner_code\": \"XXX\",\r\n    \"client_id\": \"YYYY\",\r\n    \"client_secret\": \"ZZZ\",\r\n    \"data\": {\r\n        \"email\": \"abc@getnada.com\",\r\n        \"id\": \"AS/PS-1234-5678\"\r\n    }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/get-subscription-history")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Cancel Automatic Renewal


This API call is used to cancel the automatic renewal of the subscription from the next billing cycle.

  /api/v1/channelSubscription/cancelAutoRenewalSubscrBySubscrId
  application/json


REQUEST

Note: Required parameters are marked in red.

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "AS-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
	
Parameter Description
id (required)
  • In case of an admin console subscription:
    • 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 product id, 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 subscription id will cancel the automatic renewal of the particular subscription.
order_id (optional) Unique Order id used to cancel automatic renewal

RESPONSE
{
    "ret": 200,
    "msg": "cancel success",
    "data": []
}
	

Sample Code
POST /api/v1/channelSubscription/cancelAutoRenewalSubscrBySubscrId
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/cancelAutoRenewalSubscrBySubscrId' \
--header 'Content-Type: application/json' \
--data-raw '{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/cancelAutoRenewalSubscrBySubscrId',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/cancelAutoRenewalSubscrBySubscrId");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"   ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"   ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"   ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": { 
" + "\n" +
@"    ""id"": ""SI-1671021888723-CloudBlue""
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n   \"client_id\": \"YOUR_CLIENT_ID\",\r\n   \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n   \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": { \r\n    \"id\": \"SI-1671021888723-CloudBlue\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/cancelAutoRenewalSubscrBySubscrId")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Enable Automatic Renewal


This endpoint reverts the most recent "cancel auto-renewal" request for a given subscription.

  /api/v1/channelSubscription/enable-auto-renewal
  application/json


REQUEST

Note: Required parameters are marked in red.

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "AS-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
	
Parameter Description
id (required)
  • In case of an admin console 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 product id, 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 subscription id will enable the automatic renewal of the particular subscription.
order_id (optional) Unique order ID is used to enable automatic renewal

RESPONSE
{
    "ret": 200,
    "msg": "Request Success",
    "data": []
}
	

Sample Code
POST /api/v1/channelSubscription/enable-auto-renewal
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/enable-auto-renewal' \
--header 'Content-Type: application/json' \
--data-raw '{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/enable-auto-renewal',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/enable-auto-renewal");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"   ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"   ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"   ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": { 
" + "\n" +
@"    ""id"": ""SI-1671021888723-CloudBlue""
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n   \"client_id\": \"YOUR_CLIENT_ID\",\r\n   \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n   \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": { \r\n    \"id\": \"SI-1671021888723-CloudBlue\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/enable-auto-renewal")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Cancel Subscription Immediately


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.

  /api/v1/channelSubscription/immediate-cancel-subscription
  application/json


REQUEST

Note: Required parameters are marked in red.

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "AS-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
	
Parameter Description
id (required)
  • In case of an admin console subscription:
    • If the parameter id passes the value of the admin console id, it will cancel all the product subscriptions managed by the admin console immediately.
    • If the parameter id passes the value of product id, it will cancel the subscription immediately for the particular product only.
  • In the case of non-admin console subscription:
    • Passing the parameter value of subscription id will cancel the particular subscription immediately.
order_id (optional) Unique order ID used to cancel the subscription immediately.

RESPONSE
{
    "ret": 200,
    "msg": "cancel success",
    "data": []
}
	

Sample Code
POST /api/v1/channelSubscription/immediate-cancel-subscription
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-cancel-subscription' \
--header 'Content-Type: application/json' \
--data-raw '{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-cancel-subscription',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-cancel-subscription");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"   ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"   ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"   ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": { 
" + "\n" +
@"    ""id"": ""SI-1671021888723-CloudBlue""
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n   \"client_id\": \"YOUR_CLIENT_ID\",\r\n   \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n   \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": { \r\n    \"id\": \"SI-1671021888723-CloudBlue\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-cancel-subscription")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Advance Subscription Renewal


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.

  /api/v1/channelSubscription/immediate-next-cycle-renewal
  application/json


REQUEST

Note: Required parameters are marked in red.

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "AS-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
	
Parameter Description
id (required)
  • In case of an admin console subscription:
    • If the parameter id passes the value of the admin console id, 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 product id, 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 subscription id will trigger the advance subscription renewal of the particular subscription.
order_id (optional) Unique order ID is used for early subscription renewal

RESPONSE
{
    "ret": 200,
    "msg": "cancel success",
    "data": []
}
	

Sample Code
POST /api/v1/channelSubscription/immediate-next-cycle-renewal
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-next-cycle-renewal' \
--header 'Content-Type: application/json' \
--data-raw '{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-next-cycle-renewal',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-next-cycle-renewal");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"   ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"   ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"   ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": { 
" + "\n" +
@"    ""id"": ""SI-1671021888723-CloudBlue""
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n   \"client_id\": \"YOUR_CLIENT_ID\",\r\n   \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n   \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": { \r\n    \"id\": \"SI-1671021888723-CloudBlue\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-next-cycle-renewal")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Resume Subscription


This API call is used to resume a subscription when an account expires due to the cancellation of automatic renewal, and the user wants to resume the subscription again.

  /api/v1/channelSubscription/immediate-resume-subscription
  application/json


REQUEST

Note: Required parameters are marked in red.

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "AS-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
	
Parameter Description
id (required)
  • In case of an admin console subscription:
    • If the parameter id passes the value of the admin console id, then it will resume subscription of all product subscriptions managed by the admin console.
    • If the parameter id passes the value of product id, then it will resume subscription of the particular product only.
  • In the case of non-admin console subscription:
    • Passing the parameter value of subscription id will resume subscription of the particular subscription.
order_id (optional) Unique order ID used to resume subscription

RESPONSE
{
    "ret": 200,
    "msg": "cancel success",
    "data": []
}
	

Sample Code
POST /api/v1/channelSubscription/immediate-resume-subscription
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}
					
curl --location --request POST 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-resume-subscription' \
--header 'Content-Type: application/json' \
--data-raw '{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}'
					
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-resume-subscription',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
  "data": { 
    "id": "SI-1671021888723-CloudBlue",
    "order_id": "OI-DellDemoQA-1671649886215-002"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

					
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-resume-subscription");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"   ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"   ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"   ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""data"": { 
" + "\n" +
@"    ""id"": ""SI-1671021888723-CloudBlue""
" + "\n" +
@"  }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n   \"client_id\": \"YOUR_CLIENT_ID\",\r\n   \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n   \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"data\": { \r\n    \"id\": \"SI-1671021888723-CloudBlue\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/immediate-resume-subscription")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Create a User via Channel API


To create a new user via channel API, please make a call to /channelSubscription/createUser with the following parameters.

 /api/v1/channelSubscription/createUser
 application/json


REQUEST

Note: Required parameters are marked in red.

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
   "companyId": COMPANY_ID,
   "user":{
        "emailId": "userEmailId@xyz.com",
        "firstName": "Steve ",
        "lastName": "Rogers",
        "userRole": "admin",
        "address": "US, Chino California",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId": 101,
        "active": true,
        "dialingCode": "+1",
        "mobileNumber": "MOB_NUMBER",
        "share_among_department": false,
        "userSecureFieldAccess": false
    }
}

	
Parameter Description
companyId (required) company Id of Account Owner
emailId (required) Email address of the new user.
firstName (required) First name of the new user.
lastName (required) Last name of the new user.
address (optional) Address of the new user.
userRole (required) It can be one of these values: User, Admin, Super Admin, Setup admin.
Department (optional) Department of the user
title (optional) Designation/Title of the new user.
managerId (optional) Party Id of one of the Admin or Super-Admin from your account, which will act as manager for this user
active (default=true) Value can be either true or false
dialingCode (default=+1) Use this field to assign country dial-in codes are mobile number prefixes to the new user.
mobileNumber Use this field to assign a mobile number to the new user.
share_among_department (default=false) Value can be either true or false.
userSecureFieldAccess (default=false) Value can be either true or false.

RESPONSE
{
    "result": "success",
    " message": "new user successfully added."
    "user": {
        "partyId": 1234,
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "userEmailId@xyz.com",
        "placeholder": false,
        "address": "US California",
        "dateCreated": 1549859492000,
        "optOutEmails": false,
        "uniquePartyId": null,
        "authenticationLevel": "NO",
        "passwordUpdateDate": null,
        "passwordUpdateStatus": false,
        "companyId": 123,
        "userRole": "admin",
        "department": "Developer",
        "title": "Software Developer",
        "active": true,
        "requestLocale": "auto",
        "share_among_department": false,
        "dialingCode": "+91",
        "mobileNumber": "MOB_NUMBER",
        "docStatusFilter": "all",
        "docDateFilter": "last60",
        "userSecureFieldAccess": false,
        "expandSidebar": true,
        "managerId": 5678,
        "loginCount": 0,
        "sendMailForPasswordReset": true
    }
}
        
	

Code Samples
POST /api/v1/channelSubscription/createUser
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "partner_code": "YOUR_PARTNER_CODE",
   "companyId": COMPANY_ID,
   "user":{
        "emailId": "userEmailId@xyz.com",
        "firstName": "Steve ",
        "lastName": "Rogers",
        "address": "US, Chino California",
        "userRole": "admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId": 101,
        "active": true,
        "dialingCode": "+1",
        "mobileNumber": "MOB_NUMBER",
        "share_among_department": false,
        "userSecureFieldAccess": false
    }
}
				
curl -X POST \
  https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createUser \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
	"user":{
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "admin",
        "managerId":101,
        "department": "DEV",
        "title": "Tech Lead",
        "active": true
	}
}'
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createUser",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
	"user":{
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "super_admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId":101,
        "active": true
	}
}',
  
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createUser");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"   ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"   ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"   ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"   ""companyId"": ""COMPANY_ID"",
" + "\n" +
@"   ""user"":{
" + "\n" +
@"        ""emailId"": ""userEmailId@xyz.com"",
" + "\n" +
@"        ""firstName"": ""Steve "",
" + "\n" +
@"        ""lastName"": ""Rogers"",
" + "\n" +
@"        ""address"": ""US, Chino California"",
" + "\n" +
@"        ""userRole"": ""admin"",
" + "\n" +
@"        ""department"": ""DEV"",
" + "\n" +
@"        ""title"": ""Tech Lead"",
" + "\n" +
@"        ""managerId"": 101,
" + "\n" +
@"        ""active"": true,
" + "\n" +
@"        ""dialingCode"": ""+1"",
" + "\n" +
@"        ""mobileNumber"": ""MOB_NUMBER"",
" + "\n" +
@"        ""share_among_department"": false,
" + "\n" +
@"        ""userSecureFieldAccess"": false
" + "\n" +
@"    }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n   \"client_id\": \"YOUR_CLIENT_ID\",\r\n   \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n   \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n   \"companyId\": \"COMPANY_ID\",\r\n   \"user\":{\r\n        \"emailId\": \"userEmailId@xyz.com\",\r\n        \"firstName\": \"Steve \",\r\n        \"lastName\": \"Rogers\",\r\n        \"address\": \"US, Chino California\",\r\n        \"userRole\": \"admin\",\r\n        \"department\": \"DEV\",\r\n        \"title\": \"Tech Lead\",\r\n        \"managerId\": 101,\r\n        \"active\": true,\r\n        \"dialingCode\": \"+1\",\r\n        \"mobileNumber\": \"MOB_NUMBER\",\r\n        \"share_among_department\": false,\r\n        \"userSecureFieldAccess\": false\r\n    }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/createUser")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Update User via Channel API


To update a user via API, please make a call to /channelSubscription/updateUser with the following parameters.

 /api/v1/channelSubscription/updateUser
 application/json


REQUEST

Note: Required parameters are marked in red.

{
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "partner_code": "YOUR_PARTNER_CODE",
    "companyId": COMPANY_ID,
    "user":{
        "emailId": "userEmailId@xyz.com",
        "firstName": "Steve ",
        "lastName": "Rogers",
        "address": "US, 5460 Philadelphia St, California",
        "userRole": "admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId": 102,
        "active": true,
        "dialingCode": "+1",
        "mobileNumber": "MOB_NUMBER",
        "share_among_department": false,
        "userSecureFieldAccess": false
    }
}
	
Parameter Description
companyId (required) company Id of Account Owner
emailId (required) Email address of the user
firstName (optional) First name of the user
lastName (optional) Last name of the user
address (optional) Address of user
userRole (optional) It can be one of these values: User, Admin, Super Admin, Setup admin.
Department (optional) Department of the user
title (optional) Designation/Title of the account user
managerId (optional) Party Id of one of the Admin or Super-Admin from your account, which will act as manager for this user
active (optional) Value can be either true or false
dialingCode (optional) Use this field to assign country dial-in codes are mobile number prefixes to the new user.
mobileNumber (optional) Use this field to assign a mobile number to the new user.
share_among_department (optional) Value can be either true or false.
userSecureFieldAccess (optional) Value can be either true or false.
RESPONSE
{
    "result": "success",
    "message": " user userEmailId@xyz.com updated successfully."
    "user": {
    	"partyId": 1234,
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "userEmailId@xyz.com",
        "placeholder": false,
        "address": "US California",
        "dateCreated": 1549859492000,
        "optOutEmails": false,
        "uniquePartyId": null,
        "authenticationLevel": "NO",
        "passwordUpdateDate": null,
        "passwordUpdateStatus": false,
        "companyId": 123,
        "userRole": "admin",
        "department": "Developer",
        "title": "Software Developer",
        "active": true,
        "requestLocale": "auto",
        "share_among_department": false,
        "dialingCode": "+91",
        "mobileNumber": "MOB_NUMBER",
        "docStatusFilter": "all",
        "docDateFilter": "last60",
        "userSecureFieldAccess": false,
        "expandSidebar": true,
        "managerId": 5678,
        "loginCount": 0,
        "sendMailForPasswordReset": true
    }
}
	

Sample Code
POST /api/v1/channelSubscription/updateUser 
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "partner_code": "YOUR_PARTNER_CODE",
    "companyId": COMPANY_ID,
    "user":{
        "emailId": "userEmailId@xyz.com",
        "firstName": "Steve ",
        "lastName": "Rogers",
        "address": "US, 5460 Philadelphia St, California",
        "userRole": "admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId": 102,
        "active": true,
        "dialingCode": "+1",
        "mobileNumber": "MOB_NUMBER",
        "share_among_department": false,
        "userSecureFieldAccess": false
    }
}
					
curl -X POST \
  https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/updateUser \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
	"user":{
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "admin",
        "managerId":101,
        "department": "DEV",
        "title": "Tech Lead",
        "active": true
	}
}'
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/updateUser",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
	"user":{
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "abc@gmail.com",
        "address": "New Delhi, India",
        "userRole": "super_admin",
        "department": "DEV",
        "title": "Tech Lead",
        "managerId":101,
        "active": true
	}
}',
  
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/updateUser");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"    ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"    ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"    ""companyId"": ""COMPANY_ID"",
" + "\n" +
@"    ""user"":{
" + "\n" +
@"        ""emailId"": ""userEmailId@xyz.com"",
" + "\n" +
@"        ""firstName"": ""Steve "",
" + "\n" +
@"        ""lastName"": ""Rogers"",
" + "\n" +
@"        ""address"": ""US, 5460 Philadelphia St, California"",
" + "\n" +
@"        ""userRole"": ""admin"",
" + "\n" +
@"        ""department"": ""DEV"",
" + "\n" +
@"        ""title"": ""Tech Lead"",
" + "\n" +
@"        ""managerId"": 102,
" + "\n" +
@"        ""active"": true,
" + "\n" +
@"        ""dialingCode"": ""+1"",
" + "\n" +
@"        ""mobileNumber"": ""MOB_NUMBER"",
" + "\n" +
@"        ""share_among_department"": false,
" + "\n" +
@"        ""userSecureFieldAccess"": false
" + "\n" +
@"    }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"client_id\": \"YOUR_CLIENT_ID\",\r\n    \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n    \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n    \"companyId\": \"COMPANY_ID\",\r\n    \"user\":{\r\n        \"emailId\": \"userEmailId@xyz.com\",\r\n        \"firstName\": \"Steve \",\r\n        \"lastName\": \"Rogers\",\r\n        \"address\": \"US, 5460 Philadelphia St, California\",\r\n        \"userRole\": \"admin\",\r\n        \"department\": \"DEV\",\r\n        \"title\": \"Tech Lead\",\r\n        \"managerId\": 102,\r\n        \"active\": true,\r\n        \"dialingCode\": \"+1\",\r\n        \"mobileNumber\": \"MOB_NUMBER\",\r\n        \"share_among_department\": false,\r\n        \"userSecureFieldAccess\": false\r\n    }\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/updateUser")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

List all Users via Channel API


Use this API request to retrieve a list of all users associated with the account.

 /api/v1/channelSubscription/allUserDetail
 application/json


REQUEST

Note: Required parameters are marked in red.

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
}
	
Parameter Description
companyId (required) Company Id of Account Owner
RESPONSE
{
    "result": "success",
    "total_user": 4,
    "allActiveUsers": 3,
    "allInactiveUsers": 1,
    "usersList": [
     {
        "partyId": 1234,
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "userEmailId@xyz.com",
        "placeholder": false,
        "address": "US California",
        "dateCreated": 1549859492000,
        "optOutEmails": false,
        "uniquePartyId": null,
        "authenticationLevel": "NO",
        "passwordUpdateDate": null,
        "passwordUpdateStatus": false,
        "companyId": 123,
        "userRole": "admin",
        "department": "Developer",
        "title": "Software Developer",
        "active": true,
        "requestLocale": "auto",
        "share_among_department": false,
        "dialingCode": "+91",
        "mobileNumber": "MOB_NUMBER",
        "docStatusFilter": "all",
        "docDateFilter": "last60",
        "userSecureFieldAccess": false,
        "expandSidebar": true,
        "managerId": 5678,
        "loginCount": 0,
        "sendMailForPasswordReset": true
    }, {
    .....
    },
    ………
    ]
}
	

Sample Code
POST /api/v1/channelSubscription/allUserDetail
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
}
				
  curl -X POST \
  https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/allUserDetail \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID
}'
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/allUserDetail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID
}',
  
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/allUserDetail");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""companyId"": ""COMPANY_ID""
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"companyId\": \"COMPANY_ID\"\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/allUserDetail")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Get Single User Detail via Channel API


To get a user via API, please make a call to /channelSubscription/userDetail with the following parameter.

 /api/v1/channelSubscription/userDetail
 application/json

REQUEST

Note: Required parameters are marked in red.

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
  "userEmailId": "userEmailId@xyz.com"
}

	
Parameter Description
companyId (required) company Id of Account Owner
userEmailId (required) Email address of the user
RESPONSE
{
    "result": "success",
    "user": {
        "partyId": 1234,
        "firstName": "Steve",
        "lastName": "Rogers",
        "emailId": "userEmailId@xyz.com",
        "placeholder": false,
        "address": "US California",
        "dateCreated": 1549859492000,
        "optOutEmails": false,
        "uniquePartyId": null,
        "authenticationLevel": "NO",
        "passwordUpdateDate": null,
        "passwordUpdateStatus": false,
        "companyId": 123,
        "userRole": "admin",
        "department": "Developer",
        "title": "Software Developer",
        "active": true,
        "requestLocale": "auto",
        "share_among_department": false,
        "dialingCode": "+91",
        "mobileNumber": "MOB_NUMBER",
        "docStatusFilter": "all",
        "docDateFilter": "last60",
        "userSecureFieldAccess": false,
        "expandSidebar": true,
        "managerId": 5678,
        "loginCount": 0,
        "sendMailForPasswordReset": true
    }
}
        
	

Smaple Code
POST /api/v1/channelSubscription/userDetail
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
  "userEmailId": "userEmailId@xyz.com"
}
				
  curl -X POST \
  https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/userDetail \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
  "userEmailId": "userEmailId@xyz.com"
}'
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/userDetail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
  "userEmailId": "userEmailId@xyz.com"
}',
  
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/userDetail");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""companyId"": ""COMPANY_ID"",
" + "\n" +
@"  ""userEmailId"": ""userEmailId@xyz.com""
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"companyId\": \"COMPANY_ID\",\r\n  \"userEmailId\": \"userEmailId@xyz.com\"\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/userDetail")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Delete Single User via Channel API


To delete a user via API, please make a call to /channelSubscription/userDelete with the following parameter.

 /api/v1/channelSubscription/userDelete
 application/json

REQUEST

Note: Required parameters are marked in red.

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
  "userEmailId": "userEmailId@xyz.com",
  "transferOwnerEmailId": "transferOwnerEmailId@xyz.com"
}
	
Parameter Description
companyId (required) company Id of Account Owner
userEmailId (required) Email address of user
transferOwnerEmailId (required) Transfer Email address
RESPONSE
{
    "result": "success",
    " message": "user userEmailId@xyz.com deleted successfully."
}
	

Smaple Code
POST /api/v1/channelSubscription/userDelete
Host: https://{CHANNEL_API_HOST_NAME}
Content-Type: application/json

{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
  "userEmailId": "userEmailId@xyz.com",
  "transferOwnerEmailId": "transferOwnerEmailId@xyz.com"
}
				
  curl -X POST \
  https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/userDelete \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
  "userEmailId": "userEmailId@xyz.com",
  "transferOwnerEmailId": "transferOwnerEmailId@xyz.com"
}'
	
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/userDelete",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "partner_code": "YOUR_PARTNER_CODE",
  "companyId": COMPANY_ID,
  "userEmailId": "userEmailId@xyz.com",
  "transferOwnerEmailId": "transferOwnerEmailId@xyz.com"
}',
  
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
	
var client = new RestClient("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/userDelete");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"  ""client_id"": ""YOUR_CLIENT_ID"",
" + "\n" +
@"  ""client_secret"": ""YOUR_CLIENT_SECRET"",
" + "\n" +
@"  ""partner_code"": ""YOUR_PARTNER_CODE"",
" + "\n" +
@"  ""companyId"": ""COMPANY_ID"",
" + "\n" +
@"  ""userEmailId"": ""userEmailId@xyz.com"",
" + "\n" +
@"  ""transferOwnerEmailId"": ""transferOwnerEmailId@xyz.com""
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
					
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"client_id\": \"YOUR_CLIENT_ID\",\r\n  \"client_secret\": \"YOUR_CLIENT_SECRET\",\r\n  \"partner_code\": \"YOUR_PARTNER_CODE\",\r\n  \"companyId\": \"COMPANY_ID\",\r\n  \"userEmailId\": \"userEmailId@xyz.com\",\r\n  \"transferOwnerEmailId\": \"transferOwnerEmailId@xyz.com\"\r\n}");
Request request = new Request.Builder()
  .url("https://{CHANNEL_API_HOST_NAME}/api/v1/channelSubscription/userDelete")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
					

Report API

Download Report


You can download all folder reports as an Excel file.

 /folders/getFolders/download
 application/json


REQUEST
{
    "status":"EXECUTED",
    "creationDateFrom":"2017-12-13",
    "creationDateTo":"2017-12-14",
    "folderName":"sample",
    "includeFields":true,
    "authorEmail": "yourmail@esigngenie.com",
    "signerEmail": "yourmail@esigngenie.com"
}
	
    
Parameter Description
status (optional) 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

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.
August 10, 2017
August 01, 2017
  • Added Users API.
July 18, 2017
June 27, 2017
  • Added Fields Input in Folder API.
Feb 28, 2017
  • Added Java samples.
Dec 06, 2016
  • 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.
June 23, 2016
  • Added delete folder API.
June 06, 2016
  • Added a webhooks feature.