Introduction
One-liner: send yourself a contract
To send yourself a test contract replace the EMAIL_ADDRESS:
curl -X POST -H 'Content-type:application/json' https://c21bc7:@esignatures.io/api/contracts -d '{"template_id": "20ac76c9","signers":[{"name":"Sam Signer","email":"EMAIL_ADDRESS"}]}'
Requests, responses
The API calls are organized around REST. Our API is predictable, uses HTTP response codes (2xx, 4xx, 5xx) to indicate API results/errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. JSON is returned by all API responses, including errors.
Basic Authentication
POST https://<secret-token>:@esignatures.io/api/<action> HTTP/1.1
curl -X POST -H 'Content-type:application/json' https://<secret-token>:@esignatures.io/api/<action>
Authenticate your account when using the API by including your secret API token in the request.
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password. API requests without authentication will fail.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail.
Basic auth | Description |
---|---|
username | Your API secret token, displayed on your API dashboard page, when logged in |
Zapier integration
eSignatures.io currently has the following Zapier triggers and actions:
- action: send contract
- trigger: contract sent to signer
- trigger: contract signed by signer
- trigger: contract signed by everyone
Find us on this Zapier page...
Contracts
Contracts can be fully managed via the API. Sending a contract can be done with a single API call, and after that signatures are collected, and notifications are provided at every stage of the contract’s lifecycle via webhooks.
Sending a contract
POST /api/contracts HTTP/1.1
JSON request parameters
{
"template_id": "4templ44-6666-3333-4444-555555555555",
"title": "Loan Agreement - Saver package",
"metadata": "ID0001",
"locale": "en",
"test": "no",
"signers": [
{
"name": "Benny Bell",
"email": "benny@me.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"redirect_url": "https://your-website.com/aftersign",
"signing_order": "1",
"auto_sign": "no",
"embedded_sign_page": "no",
"embedded_redirect_iframe_only": "no",
"skip_signature_request": "no",
"skip_signer_identification": "no",
"skip_final_contract_delivery":"no"
}
],
"placeholder_fields": [
{
"api_key": "interest_rate",
"value": "3.2%"
},
{
"api_key": "floor-plan",
"document_elements": [{"type": "image", "image_base64": "PD94bW...yc2lvbj0iM="}]
}
],
"signer_fields": [
{
"api_key": "preferred_term",
"default_value": "15 years"
}
],
"emails": {
"signature_request_subject": "Your document is ready to sign",
"signature_request_text": "Hi __FULL_NAME__, \n\n To review and sign the contract please press the button below \n\n Kind Regards",
"final_contract_subject": "Your document is signed",
"final_contract_text": "Hi __FULL_NAME__, \n\n Your document is signed.\n\nKind Regards",
"cc_email_addresses": ["tom@email.com", "francis@email.com"],
"reply_to": "support@customdomain.com"
},
"custom_branding": {
"company_name": "WhiteLabel LLC",
"logo_url": "https://online-logo-store.com/yourclient-logo.png"
}
}
JSON response
{
"status": "queued",
"data": {
"contract": {
"id": "1contr11-2222-3333-4444-555555555555",
"status": "sent",
"title": "Loan Agreement - Saver package",
"metadata": "ID0001",
"source": "api",
"test": "no",
"signers": [
{
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Benny Bell",
"email": "benny@me.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"sign_page_url": "https://esignatures.io/sign/6signer6-9999-2222-4444-111111111111"
}
]
}
}
}
Example request
curl -X POST -H 'Content-type:application/json' https://<secret-token>:@esignatures.io/api/contracts -d '{"template_id": "4templ44-6666-3333-4444-555555555555","signers":[{"name":"Sam Signer","email":"sam@tenants.com","mobile":"+12481234567"}],"placeholder_fields":[{"api_key":"preferred_term","value":"24 months"}], "test": "yes"}'
This request creates the contract and sends the links (via email or SMS) to the signers to collect their signatures.
Parameter | Required | Description |
---|---|---|
template_id | yes | Specifies the template to be used for the contract (the template_id is shown when editing the template) |
title | no | The unique title of the contract (Template name when not specified). It appears in emails, generated documents, and on dashboard pages |
metadata | no | Custom information |
locale | no | Setting the signer page/emails language. Currently available locales: fr en rs ja sv ro pt es en-GB id nl sl no cz it pl de hr sk hu vi |
test | no | The sent contract is marked as 'demonstration only', and no fee is deducted for sending the contract. |
signers | List of signers | |
signers:name | yes | Name of the signer |
signers:email | cond | Email address of the signer - for identification. Either email or mobile is required |
signers:mobile | cond | Mobile number of the signer - for identification. Either email or mobile is required |
signers:company_name | no | Company name for the signer |
signers:redirect_url | no | The signer will be redirected to that URL after signing the contract. |
signers:signing_order | no | A number that defines the order of signers. When the same number is used for two or more signers they will receive the signature request at the same time. By default the signers will receive the signature requests in order (not at the same time). |
signers:auto_sign | no | When yes , the signer's signature will automatically be added to the contract |
signers:embedded_sign_page | no | The signing page can be embedded within an iframe when set to yes , and no signature requests will be delivered. |
signers:embedded_redirect_iframe_only | no | When the signing page is embedded within an iframe, setting this flag to yes prevents redirecting the entire page. |
signers:skip_signature_request | no | When yes , the signer will not receive the signature request email/SMS |
signers:skip_signer_identification | no | When yes , the signer won't receive the email/SMS verification code. Note: it is a legal requirement in most of the countries to identify the signers. If the skip_signer_identification is yes you will need to identify the signer via email, SMS or other means to form legally binding contracts. |
signers:skip_final_contract_delivery | no | When yes , the signer won't receive the last notification of the signed document. Note: it is a legal requirement in most of the countries to deliver the signed document to the signing parties. If the skip_final_contract_delivery is yes you will need to deliver the documents to the signers. |
placeholder_fields | no | Placeholder fields are the highlighted texts in the template between curly brackets, eg {{interest_rate}} . Replace the Placeholder fields with simple custom text using the placeholder_fields:value parameter, or with headers, paragraphs using the placeholder_fields:document_elements parameter. |
placeholder_fields:api_key | The "api_key" is the text between the curly brackets in the contract templates. Eg: {{interest_rate}} |
|
placeholder_fields:document_elements | Replace the Placeholder field with headers, formatted text, images or tables. Find the detailed document_elements documentation under the Notes section. |
|
placeholder_fields:value | Replace the Placeholder field with simple text. | |
signer_fields | no | Use signer_fields to pre-fill Signer input fields. |
signer_fields:api_key | Specify the "api_key" in the template editor for the given Signer input field | |
signer_fields:default_value | The initial (default) value for the input field (Use '1' to tick checkboxes) | |
signer_fields:select_position | For Select fields only - The index of the pre-selected option (starting from 0) | |
emails:signature_request_subject | no | The subject in the email that will be sent to the signers when collecting their signatures |
emails:signature_request_text | no | The text in the email that will be sent to the signers. __FULL_NAME__ constant is replaced with the name of the signer. |
emails:final_contract_subject | no | The subject in the email that will be sent to the signers with the final PDF contract |
emails:final_contract_text | no | The text in the email that will be sent to the signers with the final PDF contract. __FULL_NAME__ constant is replaced with the name of the signer. |
emails:cc_email_addresses | no | List of email addresses to CC the signed PDF contract |
emails:reply_to | no | Custom reply_to email address (your API support email when not specified) |
custom_branding:company_name | no | Custom sender company name |
custom_branding:logo_url | no | Custom logo (PNG x400 recommended) |
Response field | Description |
---|---|
status | queued |
contract:id | Id of the contract |
contract:title | The unique title of the contract |
contract:metadata | The metadata provided in the original request |
contract:source | The source of the contract being api , ui or zapier |
contract:test | yes means test contract, no means live contract |
contract:signers:id | Id of the signer |
contract:signers:name | Name of the signer |
contract:signers:email | Email of the signer |
contract:signers:mobile | Mobile of the signer |
contract:signers:company_name | Company name for the signer |
contract:signers:sign_page_url | Unique sign page URL for the given signer. It can be embedded in an iframe or used standalone. Note: As part of the json response, this string will be encoded and simple copy paste of the URL won't work. |
Querying contract details
GET /api/contracts/<contract_id> HTTP/1.1
JSON response
{
"data": {
"id": "1contr11-2222-3333-4444-555555555555",
"status": "sent",
"title": "Tenancy Agreement",
"metadata": "ID0001",
"source": "api",
"test": "no",
"contract_pdf_url": "https://aws.com/contracts/1contr11-2222-3333-4444-555555555555?secret_token=x123y",
"signers": [
{
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"sign_page_url": "https://esignatures.io/sign/6signer6-9999-2222-4444-111111111111",
"events": [
{
"event": "sign_contract",
"timestamp": "2015-10-22T18:19:35.979"
}
],
"signer_fields": [
{
"api_key": "city",
"value": "Boston"
}
]
}
]
}
}
Example request
curl -X GET https://<secret-token>:@esignatures.io/api/contracts/1contr11-2222-3333-4444-555555555555
Returns the details of a contract, the details of the signers, including the contract events, the signer events, and the values the signers entered.
Response field | Description |
---|---|
id | Id of the contract |
status | 'sent' / 'signed' / 'withdrawn' |
title | The unique title of the contract |
metadata | The metadata provided in the original request |
source | The source of the contract being api , ui or zapier |
test | yes means test contract, no means live contract |
contract_pdf_url | When the contract is signed, the finalized PDF can be accessed via this url. Expires in 7 days following the request. (As part of the json response, this string will be encoded and simple copy paste of the URL won't work.) |
signers | List of signers |
signers:id | Id of the signer |
signers:name | Name of the signer |
signers:email | Email of the signer |
signers:mobile | Mobile of the signer |
signers:company_name | Company name for the signer |
signers:sign_page_url | Unique sign page URL for the given signer. It can be embedded in an iframe or used standalone. Note: As part of the json response, this string will be encoded and simple copy paste of the URL won't work. |
signers:events | Events of the signer |
signers:events:event | 'contract_sent' / 'reminder_emailed' / 'reminder_sms_sent' / 'contract_viewed' / 'delivering_contract_email_failure' / 'email_spam_complaint' / 'delivering_contract_sms_failure' / 'sign_contract' / 'final_contract_sent'/ 'signature_declined' / 'disable_reminders' |
signers:events:timestamp | Time of the event |
signers:signer_fields | Information provided by the signer for Text fields, Dropdowns and Checkboxes. |
signers:signer_fields:api_key | The "api_key" specified by you in the template editor for a given Signer field |
signers:signer_fields:value | The value the signer entered/selected for that field (Checkbox is '1' when ticked) |
Withdrawing a contract
Withdrawn contracts can't be signed any more, and signed contracts can't be withdrawn.
Withdrawing the contract doesn't result in deletion of the contract related information, the contract details can still be queried.
POST /api/contracts/<contract_id>/withdraw HTTP/1.1
JSON response
{
"status": "queued"
}
Example request
curl -X POST https://<secret-token>:@esignatures.io/api/contracts/1contr11-2222-3333-4444-555555555555/withdraw
Response field | Description |
---|---|
status | 'queued' |
Signers
Updating signer details
POST /api/contracts/<contract_id>/signers/<signer_id> HTTP/1.1
JSON request parameters
{
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+1 541 754 3010"
}
JSON response
{
"status": "queued"
}
Example request
curl -X POST -H 'Content-type:application/json' https://<secret-token>:@esignatures.io/api/contracts/1contr11-2222-3333-4444-555555555555/signers/6signer6-9999-2222-4444-111111111111 -d '{"email":"sam@tenants.com", "name":"Sam Signer-Smith"}'
The contact details of a signer can be updated via this API request. Note: The contract is not emailed automatically when updating signer.
Parameter | Required | Description |
---|---|---|
name | no | Name of the signer |
no | Email to identify the signer | |
mobile | no | Mobile number to identify the signer |
Response field | Description |
---|---|
status | 'queued' |
(Re-)Sending sign request
POST /api/contracts/<contract_id>/signers/<signer_id>/send_contract HTTP/1.1
JSON response
{
"status": "queued"
}
Example request
curl -X POST https://<secret-token>:@esignatures.io/api/contracts/1contr11-2222-3333-4444-555555555555/signers/6signer6-9999-2222-4444-111111111111/send_contract
Response field | Description |
---|---|
status | 'queued' |
Templates
Templates can be created and maintained using the built-in editor. You can import/export template via the UI.
List of templates
GET /api/templates HTTP/1.1
JSON response
{
"data": [
{
"template_id": "4templ44-6666-3333-4444-555555555555",
"template_name": "Residential Tenancy Agreement"
}
]
}
Example request
curl -X GET https://<secret-token>:@esignatures.io/api/templates
Returns the list of templates you can send.
Response field | Description |
---|---|
template_id | Id of the template |
template_name | Name of the template |
Query template details
GET /api/templates/<template_id> HTTP/1.1
JSON response
{
"data": {
"template_id": "4templ44-6666-3333-4444-555555555555",
"template_name": "Residential Tenancy Agreement",
"created_at": "2015-10-24T15:15:35.979",
"placeholder_fields": ["interest_rate"]
}
}
Example request
curl -X GET https://<secret-token>:@esignatures.io/api/templates/4templ44-6666-3333-4444-555555555555
Returns the details of the template. The Placeholder keys are specified with the template editor between {{ }}
double curly brackets.
Response field | Description |
---|---|
template_id | Id of the template |
template_name | Name of the template |
created_at | Date of creation |
placeholder_fields | List of Placeholder fields in the template |
Embedded signing
Iframe code
<iframe src="SIGN_PAGE_URL">
</iframe>
Iframe code with auto-resize
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdncf.esignatures.io/assets/iframeResizer.4.2.10.min.js"></script>
<iframe
src="SIGN_PAGE_URL"
id="eSignaturesIOIframe"
onload="iFrameResize({heightCalculationMethod: 'bodyScroll'}, '#eSignaturesIOIframe')"
style="width: 1px;min-width: 100%;">
</iframe>
Example POST#contracts request to create the contract
curl -X POST -H 'Content-type:application/json' https://<secret-token>:@esignatures.io/api/contracts -d '{"template_id": "4templ44-6666-3333-4444-555555555555","signers":[{"name":"Sam Signer","email":"sam@tenants.com","embedded_sign_page":"yes"}]}'
The sign page can be embedded into an iframe. Steps:
- Create a contract with
POST#contracts
, and specifyembedded_sign_page=yes
for the signer. - The response json will include a
data:contract:signers:sign_page_url
for that signer. - In the 'iframe code' (see example), replace the
SIGN_PAGE_URL
with thesign_page_url
.
Optional:
- Specify the
redirect_url
when creating a contract, and the signers will be redirected to that URL after signing the docuemnt. - Set the
skip_signer_identification
toyes
to skip the identification process. Note: it is a legal requirement to identify the signers. If theskip_signer_identification
isyes
you will need to identify the signer via email, SMS or other means to form legally binding contracts. - Set the
embedded_redirect_iframe_only
toyes
to prevent the entire page being redirected. Only the iframe will load the redirect page when set toyes
.
Webhooks
Use webhooks to be notified about events that happen real-time. For example, when a contract gets signed, a request is triggered to the Webhook URL specified by you on the API dashboard page. Creating a webhoook endpoint on your server means simply accepting POST requests at a given URL. Webhook data is sent as JSON in the POST request body.
If a webhook is not successfully received (not 2xx response code), eSignatures.io will continue trying to send the webhook once an hour for up to six times. The requests timeout is 5 seconds.
All Webhook requests we trigger use BASIC auth. You can enforce or ignore that. The username is your API secret token, without password.
Contract sent to signer
JSON body
{
"status": "contract-sent-to-signer",
"data": {
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"signing_order": "1",
"auto_sign": "no",
"embedded_sign_page": "no",
"redirect_url": "",
"contract": {
"id": "1contr11-2222-3333-4444-555555555555",
"title": "Sample NDA",
"metadata": "ID0001",
"source": "api",
"test": "no",
"placeholder_fields": [
{
"api_key": "interest_rate",
"value": "3.2%"
}
]
}
}
}
This webhook notification is triggered, when the contract is sent to the signer for signature.
Signer viewed the contract
JSON body
{
"status": "signer-viewed-the-contract",
"data": {
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"signing_order": "1",
"auto_sign": "no",
"embedded_sign_page": "no",
"redirect_url": "",
"contract": {
"id": "mobile1contr11-2222-3333-4444-555555555555",
"title": "Sample NDA",
"metadata": "ID0001",
"source": "api",
"test": "no"
},
"events": [
{
"event": "contract_viewed",
"timestamp": "2015-10-22T18:19:35.979"
}
]
}
}
This webhook notification is triggered, when the signer views the contract the first time.
Signer signed the contract
JSON body
{
"status": "signer-signed",
"data": {
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"signing_order": "1",
"auto_sign": "no",
"embedded_sign_page": "no",
"redirect_url": "",
"contract": {
"id": "1contr11-2222-3333-4444-555555555555",
"title": "Sample NDA",
"metadata": "ID0001",
"source": "api",
"test": "no",
"placeholder_fields": [
{
"api_key": "interest_rate",
"value": "3.2%"
}
]
},
"signer_fields": [
{
"api_key": "city",
"value": "Boston"
}
]
}
}
This webhook notification is triggered when a signer signs the contract. It includes the details of the signer, and the texts for the Signer fields, if the signer entered any.
Contract signed
JSON body
{
"status": "contract-signed",
"data": {
"id": "1contr11-2222-3333-4444-555555555555",
"title": "Sample NDA",
"metadata": "ID0001",
"source": "api",
"test": "no",
"contract_pdf_url": "https://aws.com/contracts/1contr11-2222-3333-4444-555555555555?secret_token=x123y",
"placeholder_fields": [
{
"api_key": "interest_rate",
"value": "3.2%"
}
],
"signers": [
{
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"sign_page_url": "https://esignatures.io/sign/6signer6-9999-2222-4444-111111111111",
"events": [
{
"event": "sign_contract",
"timestamp": "2015-10-22T18:19:35.979"
}
],
"signer_fields": [
{
"api_key": "city",
"value": "Boston"
}
]
}
]
}
}
This webhook notification is triggered once every signer has signed the contract. It returns the generatede PDF file.
Field | Description |
---|---|
status | 'contract-signed' |
id | Id of the contract |
title | The unique title of the contract |
metadata | The metadata provided in the original request |
source | The source of the contract being api , ui or zapier |
test | yes means test contract, no means live contract |
contract_pdf_url | The finalized PDF can be accessed via this url. Expires in 7 days following the request. (As part of the json response, this string will be encoded and simple copy paste of the URL won't work.) |
placeholder_fields | The provided list of placeholder_fields which replaced the {{ }} Placeholders in the document |
signers | List of signers |
signers:id | Id of the signer |
signers:name | Name of the signer |
signers:email | Email of the signer |
signers:mobile | Mobile of the signer |
signers:company_name | Company name for the signer |
signers:sign_page_url | Unique sign page URL for the given signer. It can be embedded in an iframe or used standalone. Note: As part of the json response, this string will be encoded and simple copy paste of the URL won't work. |
signers:events | Events of the signer |
signers:events:event | 'contract_sent' / 'reminder_emailed' / 'reminder_sms_sent' / 'contract_viewed' / 'delivering_contract_email_failure' / 'email_spam_complaint' / 'delivering_contract_sms_failure' / 'sign_contract' / 'final_contract_sent'/ 'signature_declined' / 'disable_reminders' |
signers:events:timestamp | Time of the event |
signers:signer_fields | Information provided by the signer (Text field, List) |
signers:signer_fields:api_key | The "api_key" specified by you in the template editor for a given Signer field |
signers:signer_fields:value | The value the signer entered for this field |
Contract withdrawn
JSON body
{
"status": "contract-withdrawn",
"data": {
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"signing_order": "1",
"auto_sign": "no",
"embedded_sign_page": "no",
"redirect_url": "",
"contract": {
"id": "1contr11-2222-3333-4444-555555555555",
"title": "Sample NDA",
"metadata": "ID0001",
"source": "api",
"test": "no",
"placeholder_fields": [
{
"api_key": "interest_rate",
"value": "3.2%"
}
],
"signers": [
{
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"company_name": "ACME Corp"
}
]
}
}
}
This webhook notification is triggered, when the contract is withdrawn.
Signer declined the signature
JSON body
{
"status": "signer-declined",
"data": {
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"company_name": "ACME Corp",
"signing_order": "1",
"auto_sign": "no",
"embedded_sign_page": "no",
"redirect_url": "",
"contract": {
"id": "1contr11-2222-3333-4444-555555555555",
"title": "Sample NDA",
"metadata": "ID0001",
"source": "api",
"test": "no",
"placeholder_fields": [
{
"api_key": "interest_rate",
"value": "3.2%"
}
]
},
"events": [
{
"event": "signature_declined",
"reason_for_decline": "Commencement date is 5th of June",
"timestamp": "2015-10-22T18:19:35.979"
}
]
}
}
This webhook notification is triggered, when the signer declined signing the contract.
Signer requested a Mobile Number update
JSON body
{
"status": "signer-mobile-update-request",
"data": {
"id": "6signer6-9999-2222-4444-111111111111",
"name": "Sam Signer",
"email": "sam@tenants.com",
"mobile": "+12481234567",
"mobile_new": "+16789123456",
"company_name": "ACME Corp",
"signing_order": "1",
"embedded_sign_page": "no",
"auto_sign": "no",
"redirect_url": "",
"contract": {
"id": "1contr11-2222-3333-4444-555555555555",
"title": "Sample NDA",
"metadata": "ID0001",
"placeholder_fields": [
{
"api_key": "interest_rate",
"value": "3.2%"
}
]
}
}
}
This webhook notification is triggered, when the signer requested a Mobile Number update.
Field | Description |
---|---|
id | Id of the signer |
mobile | Mobile of the signer |
mobile_new | The requested Mobile number |
contract:id | Id of the contract |
Webhook error notifications
JSON body
{
"status": "error",
"data": {
"error_code": "email-delivery-failed"
}
}
error_code | Description |
---|---|
email-delivery-failed | Sending the contract to the signer has failed |
sms-delivery-failed | Sending the sms to the signer has failed |
custom-branding-logo-error | An error occurred while downloading the custom_branding:logo_url |
Notes
Document elements
JSON body
[
{
"type": "text_header_two",
"text": "Special conditions"
},
{
"type": "text_normal",
"text": "I agree to the above terms and conditions.",
"text_alignment": "right",
"text_styles": [
{
"offset": 2,
"length": 6,
"style": "bold"
}
]
},
{
"type": "image",
"image_base64": "PD94bW...yc2lvbj0iM=",
"image_alignment": "center",
"image_height_rem": 8
},
{
"type": "table",
"table_column_styles": [{"align": "center"}, {"align": "right"}],
"table_cells": [
[{"text": "Header1", "styles": ["bold"]}, {"text": "Header2", "styles": ["bold"]}],
[{"text": "cell1"}, {"text": "cell2"}]
]
}
]
document_elements
help you to construct entire sections in a contract.
Field | Required | Description |
---|---|---|
type | yes | Type of the contract line, one of the following options: text_header_one , text_header_two , text_header_three , text_normal , image , table . |
text | cond | The text for the given line. |
text_alignment | no | The alignment of the given line. Options: center , right , justified . By default: left |
text_styles | no | Ranges of styles |
text_styles:style:offset | The beginning of the range (starting with 0) | |
text_styles:style:length | The length of the range | |
text_styles:style:style | The style to apply. Options: bold , italic , underline |
|
image_base64 | cond | Base64 encoded png or jpg image, max 0.5MB |
image_alignment | no | The horizontal position of the image. Options: center , right . By default: left |
image_height_rem | no | Image height (2-38) |
table_cells | cond | A nested list of rows/cells. |
table_column_styles | no | A list of column styles. |
table_column_styles:align | no | Column alignment. Options: left , center , right |
table_cells:text | The text in the given cell. | |
table_cells:styles | no | The list of styles for the given cell. Options: bold , italic |
Have a question?