This method updates the document visibility for a template recipient.

Note: A document cannot be hidden from a recipient if the recipient has tabs assigned to them on the document. Carbon Copy, Certified Delivery (Needs to Sign), Editor, and Agent recipients can always see all documents.

Request

HTTP request

PUT /restapi/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/document_visibility

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

recipientIdstring

A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each recipientId must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a recipientId of 1.

templateIdstring

The id of the template.

Responses

CodeDescriptionReference
200

Successful response.

templateDocumentVisibilityList
400

Error encountered.

errorDetails

SDK Method

Templates::updateTemplateRecipientDocumentVisibility

Definitions

documentVisibility

This object configures a recipient's read/write access to a document.

documentIdstring

The documentId is set by the API client. It is an integer that falls between 1 and 2,147,483,647. The value is encoded as a string without commas. The values 1, 2, 3, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a documentId property that specifies the document on which to place the tab.

errorDetailserrorDetails

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

recipientIdstring

A local reference that senders use to map recipients to other objects, such as specific document tabs. Within an envelope, each recipientId must be unique, but there is no uniqueness requirement across envelopes. For example, many envelopes assign the first recipient a recipientId of 1.

rightsstring

Indicates whether the document is editable:

  • editable
  • read_only

visiblestring

When true, the document is visible to the recipient.

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.

templateDocumentVisibilityList

A list of documentVisibility objects that specify whether the documents associated with a template are visible to recipients.

documentVisibility[documentVisibility]

An array of documentVisibility objects that specifies which documents are visible to which recipients.

Examples

Generic JSON Request/Response

Request
{
  "password": "sample string 1",
  "documentVisibility": [
    {
      "recipientId": "sample string 1",
      "documentId": "sample string 2",
      "visible": "sample string 3",
      "rights": "sample string 4"
    }
  ]
}
Response
{
  "password": "sample string 1",
  "documentVisibility": [
    {
      "recipientId": "sample string 1",
      "documentId": "sample string 2",
      "visible": "sample string 3",
      "rights": "sample string 4",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      }
    }
  ]
}
Generic XML Request/Response

Request
<templateDocumentVisibilityList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API_REST.Models.v2">
  <documentVisibility xmlns="http://www.docusign.com/restapi">
    <documentVisibility>
      <documentId>sample string 2</documentId>
      <recipientId>sample string 1</recipientId>
      <rights>sample string 4</rights>
      <visible>sample string 3</visible>
    </documentVisibility>
  </documentVisibility>
  <password>sample string 1</password>
</templateDocumentVisibilityList> 
Response
<templateDocumentVisibilityList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API_REST.Models.v2">
  <documentVisibility xmlns="http://www.docusign.com/restapi">
    <documentVisibility>
      <documentId>sample string 2</documentId>
      <errorDetails>
        <errorCode>sample string 1</errorCode>
        <message>sample string 2</message>
      </errorDetails>
      <recipientId>sample string 1</recipientId>
      <rights>sample string 4</rights>
      <visible>sample string 3</visible>
    </documentVisibility>
  </documentVisibility>
  <password>sample string 1</password>
</templateDocumentVisibilityList> 
}} />