Request

HTTP request

PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID GUID.

attachmentIdstring

The unique identifier for the attachment.

envelopeIdstring

The envelope's GUID.

Example: 93be49ab-afa0-4adf-933c-f752070d71ec

Request Body

attachment

Responses

CodeDescriptionReference
200

Successful response.

envelopeAttachmentsResult
400

Error encountered.

errorDetails

SDK Method

Envelopes::putAttachment

Definitions

attachment

Contains information about an attachment.

accessControlstring

Valid values are sender and senderAndAllRecipients.

attachmentIdstring

The unique identifier for the attachment.

attachmentTypestring

Specifies the type of the attachment for the recipient. Possible values are:

  • .htm
  • .xml

datastring

A Base64-encoded representation of the attachment that is used to upload and download the file. File attachments may be up to 50 MB in size.

labelstring

A label for the attachment. Potential values include:

  • guidedForm: Guided forms provide a step-by-step, mobile-ready experience to help signers easily complete long or complex forms.
  • eventNotifications: A list of envelope-level event statuses that trigger Connect to send updates to the endpoint specified in the url property.

namestring

The name of the attachment.

remoteUrlstring

The URL of a previously staged chunked upload. Using a chunked upload enables you to stage a large, chunkable temp file. You then use the remoteUrl property to reference the chunked upload as the content in attachment and document-related requests. The remoteUrl property cannot be used for downloads.

envelopeAttachmentsResult

attachments[EnvelopeAttachments]

An array of attachment objects that contain information about the attachments.

errorDetails

This object describes errors that occur. It is only valid for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

EnvelopeAttachments

accessControlstring

Valid values are sender and senderAndAllRecipients.

attachmentIdstring

The unique identifier for the attachment.

attachmentTypestring

Specifies the type of the attachment for the recipient. Possible values are:

  • .htm
  • .xml

errorDetailserrorDetails

This object describes errors that occur. It is only valid for responses and ignored in requests.

labelstring

A label for the attachment. Potential values include:

  • guidedForm: Guided forms provide a step-by-step, mobile-ready experience to help signers easily complete long or complex forms.
  • eventNotifications: A list of envelope-level event statuses that trigger Connect to send updates to the endpoint specified in the url property.

namestring

The name of the attachment.

Examples

Generic JSON Request/Response

Request
{
  "attachmentId": "sample string 1",
  "label": "sample string 2",
  "attachmentType": "sample string 3",
  "name": "sample string 4",
  "accessControl": "sample string 5",
  "data": "sample string 6",
  "remoteUrl": "sample string 7"
}
Response
{
  "attachments": [
    {
      "attachmentId": "sample string 1",
      "label": "sample string 2",
      "attachmentType": "sample string 3",
      "name": "sample string 4",
      "accessControl": "sample string 5",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      }
    }
  ]
}
Generic XML Request/Response

Request
<attachment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <accessControl>sample string 5</accessControl>
  <attachmentId>sample string 1</attachmentId>
  <attachmentType>sample string 3</attachmentType>
  <data>sample string 6</data>
  <label>sample string 2</label>
  <name>sample string 4</name>
  <remoteUrl>sample string 7</remoteUrl>
</attachment> 
Response
<envelopeAttachmentsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <attachments>
    <envelopeAttachment>
      <accessControl>sample string 5</accessControl>
      <attachmentId>sample string 1</attachmentId>
      <attachmentType>sample string 3</attachmentType>
      <errorDetails>
        <errorCode>sample string 1</errorCode>
        <message>sample string 2</message>
      </errorDetails>
      <label>sample string 2</label>
      <name>sample string 4</name>
    </envelopeAttachment>
  </attachments>
</envelopeAttachmentsResult> 
}} />