I am using the POST /restapi/v2.1/accounts/{accountId}/envelopes endpoint with multipart/form-data to create envelopes.
The request payload is shown below:
--AAA
Content-Type: application/json
Content-Disposition: form-data
{
"documents": [
{
"documentId": "1",
"fileExtension": "txt",
"name": "test1.txt",
"order": "1"
}
],
"emailBlurb": "this is a test",
"emailSubject": "test",
"eventNotification": {
"envelopeEvents": [
{
"envelopeEventStatusCode": "Completed"
},
{
"envelopeEventStatusCode": "Declined"
},
{
"envelopeEventStatusCode": "Voided"
}
],
"requireAcknowledgment": "true",
"signMessageWithX509Cert": "true",
"url": "dummyurl",
"useSoapInterface": "false"
},
"notification": {
"useAccountDefaults": "true"
},
"recipients": {
"recipientCount": "2",
"signers": [
{
"email": "randomemail1@gmail.com",
"name": "test",
"recipientId": "1",
"roleName": "SIGNER",
"routingOrder": "1"
},
{
"email": "randomemail2@gmail.com",
"name": "test2",
"recipientId": "2",
"roleName": "SIGNER",
"routingOrder": "2"
}
]
},
"status": "sent"
}
--AAA
Content-Type: application/txt
Content-Disposition: file; filename="test1.txt"; documentid=1
Test Document 1
Sign1 Here _______________________________ Custom1 Approve:
Sign2 Here _______________________________ Custom2 Approve:
--AAA--The envelope is created successfully with two signers.
After creation, I navigate to Agreements > Waiting for Others in the DocuSign web application. I can see the envelope created by the API. From the ellipsis menu on the envelope, I select Correct, which opens the page where I can edit the recipient details.
The issue is that the two signers do not appear to be treated as separate recipients. When I edit the name of the first signer, the second signer's name is updated automatically. The same happens with the email address—changing it for one signer also changes it for the other.
I found a community post describing a similar issue, but that example used templates rather than supplying documents directly through the API. One of the suggestions was to set a signing order, which I have already done by specifying different routingOrder values (1 and 2), but the behavior is unchanged.
Is there something missing or incorrect in my envelope definition that could cause both signers to be linked together in the Correct view?
Back to Docusign.com

