Create with Template (POST /v2.0/envelopes/create_with_template)

This method creates an envelope using a template ID and provided parameters.

Request Parameters

 

Request Headers

Header Value
Authorization Bearer {access_token}
app_auth_type jsign-oauth2

Request Body Parameters

Field Type Required Description
template_id String Yes Template ID that you get in the response of either the /template/create_with_files or /template/create API calls
envelope JSON Object Yes Contains envelope basic details
envelope.name String Yes Envelope name
envelope.expiration_day Integer No Number of days after which the envelope will expire
envelope.email_reminders Boolean No Enable to sends automatic reminders
envelope.reminder_period Integer No Send automatic reminders before [n] days of expiration
envelope.append_verification_qr_code Boolean No Append QA code to the envelope post signing
envelope.remove_signed_envelope Boolean No Remove envelope file envelope post signing
envelope.enforce_signers_location Boolean No Capture GPS location of a signer
envelope.send_email_to_recipients Boolean No Send signing invitation email to the recipients
envelope.sign_process_flow String No Signing flow [Sequential, Parallel, Hybrid]
recipients JSON Object Yes Contains signers and observers information
recipients.signers[] Array Yes Signers information along with template signer's titles.
recipients.signers[].signer_title String Yes Signer's title
recipients.signers[].name String Yes Signer's first name and last name, e.g, Jon Smith
recipients.signers[].email String Yes Signer's email
recipients.signers[].country_code Integer Conditional Signer's country ISD code (without + symbol). E.g ,91
recipients.signers[].phone_number String Conditional Signer's phone number
recipients.signers[].signing_order Boolean No Signing order only considered if document flow is set to sequential
recipients.signers[].private_note String No Private message for signers, this will be sent into an email
recipients.signers[].form_fields[] Array No Custom fields information for setting default values
recipients.signers[].form_fields[].placeholder String Yes Placeholder of custom field for which default value is to be set
recipients.signers[].form_fields[].default_value String Yes Default value of the placeholder to be set
recipients.signers[].form_fields[].editable Boolean Yes Set placeholder as editable. Allowable values are TRUE or FALSE.
recipients.observers[] JSON Array No Observer's information along with title only
recipients.observers[].observer_title String Conditional Observer's title
recipients.observers[].name String Conditional Observer's full name
recipients.observers[].email String Conditional Observer's email

Response Parameters

 

Response Body Message Field

Field Value
message The envelope was successfully created

Response Body Data Field

Field Always Present Notes
envelope_id Yes Envelope ID of the created envelope

 

Sample Success Response - Fixed Position

REQUEST:
curl --location --request POST '/api/v2.0/envelopes/create_with_template' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'app_auth_type: jsign-oauth2' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_id": "e802548-bdd2-4e30-9d0e-d888d20ddb61",
"envelope": {
"name": "Sample Envelope",
"expiration_days": 4,
"email_reminders": true,
"reminder_period": 2,
"append_verification_qr_code": false,
"remove_signed_envelope": false,
"enforce_signers_location": false,
"send_email_to_recipients": true,
"sign_process_flow": "Parallel"
"recipients": {
"signers": [
{
"signer_title": "Signer 1",
"name": "Jon Smith",
"email": "[email protected]",
"country_code": 91,
"phone_number": "1234567899",
"signing_order": 1,
"private_note": "Please sign as soon as you receive the envelope",
"form_fields":[
{
"placeholder": "textbox 1",
"default_value": "testing first text box",
"editable": true
}
]
}
],
"observers": [
{
"observer_title": "Observer 1",
"name": "Neal Davis",
"email": "[email protected]"
}
]
}
},

RESPONSE:
{
"message": "Document created successfully.",
"data": {
"document_id": "f2e4f43a-4dfb-4967-bd05-fb4bb90e77bc"
}
}

Sample Error Response

REQUEST:
curl --location --request POST '/api/v2.0/envelope/create_with_template' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'app_auth_type: jsign-oauth2' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_id": "e802548-bdd2-4e30-9d0e-d888d20ddb61",
"envelope": {
"name": "Sample Envelope",
[as above except signer title not provided]...
}
}'

RESPONSE:
{
"errors": [
{
"error_code": "SIGNER_TITLE_IS_REQUIRED",
developer_message": "Signer title cannot be null or empty."
}
]
}

Note: View the full list of applicable error code for this method here.

Return to the top of this page.