Create envelope
POST
/envelope/create
const url = 'https://app.legaldoc.com/api/v2/envelope/create';const form = new FormData();form.append('payload', '{ "title": "example", "type": "DOCUMENT", "delegatedDocumentOwner": "example", "externalId": "example", "visibility": "EVERYONE", "globalAccessAuth": [ "ACCOUNT" ], "globalActionAuth": [ "ACCOUNT" ], "formValues": { "additionalProperty": "example" }, "folderId": "example", "recipients": [ { "email": "", "name": "example", "role": "CC", "signingOrder": 1, "accessAuth": [], "actionAuth": [], "fields": [ { "type": "SIGNATURE", "fieldMeta": { "type": "signature", "fontSize": 18, "overflow": "auto" }, "identifier": "example", "page": 1, "positionX": 1, "positionY": 1, "width": 1, "height": 1 } ] } ], "meta": { "subject": "example", "message": "example", "timezone": "example", "dateFormat": "yyyy-MM-dd hh:mm a", "distributionMethod": "EMAIL", "signingOrder": "PARALLEL", "allowDictateNextSigner": true, "redirectUrl": "example", "language": "de", "typedSignatureEnabled": true, "uploadSignatureEnabled": true, "drawSignatureEnabled": true, "emailId": "example", "emailReplyTo": "example", "emailSettings": { "recipientSigningRequest": true, "recipientRemoved": true, "recipientSigned": true, "documentPending": true, "documentCompleted": true, "documentDeleted": true, "ownerDocumentCompleted": true, "ownerRecipientExpired": true, "ownerDocumentCreated": true }, "envelopeExpirationPeriod": { "unit": "day", "amount": 1 }, "reminderSettings": { "sendAfter": { "unit": "day", "amount": 1 }, "repeatEvery": { "unit": "day", "amount": 1 } } }, "attachments": [ { "label": "example", "data": "https://example.com", "type": "link" } ] }');form.append('files', 'example');
const options = {method: 'POST', headers: {Authorization: '<Authorization>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.legaldoc.com/api/v2/envelope/create \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: multipart/form-data' \ --form 'payload={ "title": "example", "type": "DOCUMENT", "delegatedDocumentOwner": "example", "externalId": "example", "visibility": "EVERYONE", "globalAccessAuth": [ "ACCOUNT" ], "globalActionAuth": [ "ACCOUNT" ], "formValues": { "additionalProperty": "example" }, "folderId": "example", "recipients": [ { "email": "", "name": "example", "role": "CC", "signingOrder": 1, "accessAuth": [], "actionAuth": [], "fields": [ { "type": "SIGNATURE", "fieldMeta": { "type": "signature", "fontSize": 18, "overflow": "auto" }, "identifier": "example", "page": 1, "positionX": 1, "positionY": 1, "width": 1, "height": 1 } ] } ], "meta": { "subject": "example", "message": "example", "timezone": "example", "dateFormat": "yyyy-MM-dd hh:mm a", "distributionMethod": "EMAIL", "signingOrder": "PARALLEL", "allowDictateNextSigner": true, "redirectUrl": "example", "language": "de", "typedSignatureEnabled": true, "uploadSignatureEnabled": true, "drawSignatureEnabled": true, "emailId": "example", "emailReplyTo": "example", "emailSettings": { "recipientSigningRequest": true, "recipientRemoved": true, "recipientSigned": true, "documentPending": true, "documentCompleted": true, "documentDeleted": true, "ownerDocumentCompleted": true, "ownerRecipientExpired": true, "ownerDocumentCreated": true }, "envelopeExpirationPeriod": { "unit": "day", "amount": 1 }, "reminderSettings": { "sendAfter": { "unit": "day", "amount": 1 }, "repeatEvery": { "unit": "day", "amount": 1 } } }, "attachments": [ { "label": "example", "data": "https://example.com", "type": "link" } ] }' \ --form files=exampleCreate an envelope using form data.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
payload
required
object
title
required
string
type
required
string
delegatedDocumentOwner
string
externalId
string
visibility
string
globalAccessAuth
Array<string>
globalActionAuth
Array<string>
folderId
string
recipients
Array<object>
object
name
required
string
role
required
string
signingOrder
number
accessAuth
Array<string>
actionAuth
Array<string>
fields
Array
object
One of:
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
object
type
required
string
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
textAlign
string
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
textAlign
string
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
textAlign
string
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
textAlign
string
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
text
string
characterLimit
number
textAlign
string
lineHeight
number | null
letterSpacing
number | null
verticalAlign
string | null
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
numberFormat
string | null
value
string
minValue
number | null
maxValue
number | null
textAlign
string
lineHeight
number | null
letterSpacing
number | null
verticalAlign
string | null
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
values
Array<object>
object
id
required
number
checked
required
boolean
value
required
string
direction
string
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
values
Array<object>
object
id
required
number
checked
required
boolean
value
required
string
validationRule
string
validationLength
number
direction
string
object
type
required
string
fieldMeta
object
label
string
placeholder
string
required
boolean
readOnly
boolean
fontSize
number
overflow
string
type
required
string
values
Array<object>
object
value
required
string
defaultValue
string
page
required
number
positionX
required
number
positionY
required
number
width
required
number
height
required
number
meta
object
subject
string
message
string
timezone
string
dateFormat
string
distributionMethod
string
signingOrder
string
allowDictateNextSigner
boolean
redirectUrl
string
language
string
typedSignatureEnabled
boolean
uploadSignatureEnabled
boolean
drawSignatureEnabled
boolean
emailId
string | null
emailReplyTo
string | null
emailSettings
object
recipientSigningRequest
boolean
recipientRemoved
boolean
recipientSigned
boolean
documentPending
boolean
documentCompleted
boolean
documentDeleted
boolean
ownerDocumentCompleted
boolean
ownerRecipientExpired
boolean
ownerDocumentCreated
boolean
envelopeExpirationPeriod
attachments
Array<object>
object
label
required
string
data
required
string format: uri
type
string
files
Array<string>
Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
id
required
string
Examplegenerated
{ "id": "example"}Invalid input data
Media typeapplication/json
object
message
required
string
code
required
string
issues
Array<object>
object
message
required
string
Examplegenerated
{ "message": "example", "code": "example", "issues": [ { "message": "example" } ]}Authorization not provided
Media typeapplication/json
object
message
required
string
code
required
string
issues
Array<object>
object
message
required
string
Examplegenerated
{ "message": "example", "code": "example", "issues": [ { "message": "example" } ]}Insufficient access
Media typeapplication/json
object
message
required
string
code
required
string
issues
Array<object>
object
message
required
string
Examplegenerated
{ "message": "example", "code": "example", "issues": [ { "message": "example" } ]}Internal server error
Media typeapplication/json
object
message
required
string
code
required
string
issues
Array<object>
object
message
required
string
Examplegenerated
{ "message": "example", "code": "example", "issues": [ { "message": "example" } ]}