I’m using the Docusign C# SDK to create and send envelopes. At the time of creation I would like to add an ‘Envelope Attachment’ to include some internal metadata about the envelope. (I want to use it later after receiving notification of envelope completion via the Docusign Connect webhook).
The problem is that the documentation is vague about what is needed to do this. I’ve got an envelopeDefintion
object with the envelope definition and am doing the following to add the attachment:
envelopeDefinition.EnvelopeAttachments =
[
new Attachment(AttachmentId: "1", Label: "Test Label", Name: "Test Name", AttachmentType: ".txt", Data: testDocumentAsBase64String),
];
The envelope gets created as expected, but no attachment is created. The documentation doesn’t say what values are accepted for most of the fields so I’ve tried various combinations with no luck. Any ideas why this wouldn’t be working? The envelope is being created with an initialStatus of “Sent”.
I read something about this being available in draft or in-process, but I would think that “Sent” would count as in process. Or do I need to create a draft with the attachment, and then send separately?
To be clear since other similar posts seem to get signer and envelope attachments confused, I’m aware that these types of attachments would only be available through the API. After creating the envelope, querying the API for envelope attachments returns an empty data set, which is how I’m verifying that no attachment was created.