Reputation: 135
I want to create a new envelope with a new document through the DocuSign Api.
According to the docs, I understand that I need to send a POST request to https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes.
But I haven't found an example how to add the document to the body of the request.
Can someone give me an code example? How exactly the body of the request should look like?
Thanks so much.
Upvotes: 0
Views: 81
Reputation: 14005
Here is a link to examples, some using our SDKs
The body of your JSON may look like this:
{
"emailSubject": "Please sign this document set",
"documents": [
{
"documentBase64": "' > $request_data
cat $doc1_base64 >> $request_data
printf '",
"name": "Lorem Ipsum",
"fileExtension": "pdf",
"documentId": "1"
}
],
"recipients": {
"carbonCopies": [
{
"email": "{USER_EMAIL}",
"name": "Charles Copy",
"recipientId": "2",
"routingOrder": "2"
}
],
"signers": [
{
"email": "{USER_EMAIL}",
"name": "{USER_FULLNAME}",
"recipientId": "1",
"routingOrder": "1",
"clientUserId": "1000",
"tabs": {
"signHereTabs": [
{
"anchorString": "/sn1/",
"anchorUnits": "pixels",
"anchorXOffset": "20",
"anchorYOffset": "10"
}
]
}
}
]
},
"status": "sent"
}
Upvotes: 0