Upload a new document and get a presigned URL
POST
/api/v1/documents
const url = 'https://app.legaldoc.io/api/v1/documents';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"title":"example","externalId":"example","recipients":[{"name":"example","email":"[email protected]","role":"CC","signingOrder":1}],"meta":{},"authOptions":{"globalAccessAuth":"ACCOUNT","globalActionAuth":"ACCOUNT"},"formValues":{"additionalProperty":"example"}}'};
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.io/api/v1/documents \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "externalId": "example", "recipients": [ { "name": "example", "email": "[email protected]", "role": "CC", "signingOrder": 1 } ], "meta": {}, "authOptions": { "globalAccessAuth": "ACCOUNT", "globalActionAuth": "ACCOUNT" }, "formValues": { "additionalProperty": "example" } }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Body
Media typeapplication/json
object
title
required
string
externalId
string
recipients
required
Array<object>
object
name
required
string
email
required
string format: email
role
string
signingOrder
number
meta
object
subject
string
message
string
timezone
The timezone of the date. Must be one of the options listed in the list below.
string
dateFormat
The format of the date. Must be one of the options listed in the list below.
string
redirectUrl
string
signingOrder
string
allowDictateNextSigner
boolean
language
string
typedSignatureEnabled
boolean
uploadSignatureEnabled
boolean
drawSignatureEnabled
boolean
distributionMethod
string
emailSettings
authOptions
Authentication options for the document.
object
globalAccessAuth
The type of authentication required for the recipient to access the document.
string
globalActionAuth
The type of authentication required for the recipient to sign the document.
string
Responses
Section titled “Responses”200
Media typeapplication/json
object
uploadUrl
required
string
documentId
required
number
externalId
string
recipients
required
Array<object>
object
id
required
number
name
required
string
email
required
string
Examplegenerated
{ "uploadUrl": "example", "documentId": 1, "externalId": "example", "recipients": [ { "id": 1, "name": "example", "email": "example" } ]}401
Media typeapplication/json
object
message
required
string
Examplegenerated
{ "message": "example"}404
Media typeapplication/json
object
message
required
string
Examplegenerated
{ "message": "example"}