> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Update document visibility for template recipient

PUT https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/document_visibility
Content-Type: application/json

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.

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/templates/templatedocumentvisibility/update

## Authentication

- `Authorization` header (required) (prefixed with ` Bearer  `) — OAuth 2.0 access token (JWT or auth-code grant). Sent as `Authorization: Bearer <token>` on every request except `GET /v2.1` and `GET /service_information`, which are public discovery endpoints.

## Servers

- `https://demo.docusign.net/restapi` (Demo, default)
- `https://www.docusign.net/restapi` (Production)

## Request

### Path parameters

- `accountId` (string, required) — The external account number (int) or account ID Guid.
- `recipientId` (string, required) — A local reference used to map recipients to other objects, such as specific document tabs. A `recipientId` must be either an integer or a GUID, and the `recipientId` must be unique within an envelope. For example, many envelopes assign the first recipient a `recipientId` of `1`.
- `templateId` (string, required) — The ID of the template.

### Body (application/json)

This endpoint expects a templateDocumentVisibilityList.

- `documentVisibility` (list of documentVisibility, optional) — An array of `documentVisibility` objects that specifies which documents are visible to which recipients.

## Response

### 200

Successful response.

- `documentVisibility` (list of documentVisibility, optional) — An array of `documentVisibility` objects that specifies which documents are visible to which recipients.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Types

### documentVisibility

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

- `documentId` (string, optional) — Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
- `errorDetails` (errorDetails, optional) — This object describes errors that occur. It is only valid for responses, and ignored in requests.
- `recipientId` (string, optional) — The ID of the recipient to whom the document visibility setting is applied. This value should match the `recipientId` defined in the recipient object.
- `rights` (string, optional) — Indicates whether the document is editable: - `editable` - `read_only`
- `visible` (string, optional) — 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.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Examples

**Request**

```json
{
  "documentVisibility": [
    {
      "documentId": "sample string 1",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      },
      "recipientId": "sample string 2",
      "rights": "sample string 3",
      "visible": "sample string 4"
    }
  ]
}
```

**Response**

```json
{
  "documentVisibility": [
    {
      "documentId": "sample string 1",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      },
      "recipientId": "sample string 2",
      "rights": "sample string 3",
      "visible": "sample string 4"
    }
  ]
}
```