I'm attempting to Request a signature using the DocuSign API via Javascript. Below is the multipart request that I'm sending. The problem is that I'm receiving an error response: "The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line. Envelope definition missing." Clearly, I'm including the "envelopeDefinition" xml in my request, and I'm pretty sure all the required elements are there. Any guidance would be greatly appreciated.
--BOUNDARY--
Content-Type: application/xml
Content-Disposition: form-data
<envelopeDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi"><emailSubject>Test Subject</emailSubject><documents><name>document.pdf</name><documentId>1</documentId></documents><recipients><signers><tabs><signHereTabs><pageNumber>1</pageNumber><documentId>1</documentId><xPosition>100</xPosition><yPosition>100</yPosition></signHereTabs></tabs><routingOrder>1</routingOrder><recipientId>1</recipientId><name>My Name</name><email>[email protected]</email></signers></recipients><status>sent</status></envelopeDefinition>
--BOUNDARY--
Content-Type: application/pdf
Content-Disposition: file; filename="document.pdf"; documentId=1
[document bytes go here]
--BOUNDARY--
Also, I should mention I'm using Msxml2.XMLHTTP.