Accounts: updateSharedAccess

This sets the shared access status for one or more users or templates.

When setting user shared access, only users with account administration privileges can set shared access status for envelopes.

When setting template shared access, only users who own a template and have sharing permission or with account administration privileges can set shared access for templates.

Changes to the shared items status are not additive. The change always replaces the current status.

To change template shared access the query parameter item_type = templates must be added to the request. When this is set, the user and envelopes properties are not required.

Request

HTTP request

PUT /v2/accounts/{accountId}/shared_access

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

Optional Query Parameters
item_typestring

Specifies the type of shared item being requested. The possible values are:

  • envelopes: Get information about envelope sharing between users.
  • templates: Get information about template sharing among users and groups.
  • folders: Get information about folder sharing among users and groups.

user_idsstring

A comma-separated list of user IDs whose shared item information is being set.

Responses

CodeDescriptionReference
200

Successful response.

accountSharedAccess
400

Error encountered.

errorDetails

SDK Method

Accounts::updateSharedAccess

Definitions

accountSharedAccess

Contains shared access information.

accountIdstring

The account ID associated with the envelope.

endPositionstring

The last position in the result set.

errorDetailserrorDetails

A complex type containing an errorCode and message identifying the error that occurred.

nextUristring

The URI for the next chunk of records based on the search request. It is null if this is the last set of results for the search.

previousUristring

The URI for the prior chunk of records based on the search request. It is null if this is the first set of results for the search.

resultSetSizestring

The number of results returned in this response.

sharedAccess[memberSharedItems]

A list of shared access information of envelope and templates for the users specified in the request.

startPositionstring

Starting position of the current result set.

totalSetSizestring

The total number of items in the search's result set. It will always be greater than or equal to the value of the resultSetSize field.

errorDetails

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

errorCodestring

An error code associated with the error.

messagestring

A short error message.

group

Information about groups.

errorDetailserrorDetails

groupIdstring

The DocuSign group ID for the group.

groupNamestring

The name of the group.

groupTypestring

The group type.

permissionProfileIdstring

The ID of the permission profile associated with the group.

users[userInfo]

List of users in the group.

memberGroupSharedItem

Information about items shared among groups.

errorDetailserrorDetails

groupgroup

The group sharing the item.

sharedstring

How the item is shared. One of:

  • not_shared: The item is not shared.

  • shared_to: The item is shared.

memberSharedItems

Information about shared items.

envelopes[sharedItem]

List of information about shared envelopes.

errorDetailserrorDetails

templates[templateSharedItem]

List of information about shared templates.

useruserInfo

Information about the user requesting sharing information.

sharedItem

Information about the shared item.

errorDetailserrorDetails

sharedstring

How the item is shared. One of:

  • not_shared
  • shared_to
  • shared_from
  • shared_to_and_from

useruserInfo

Information about the user associated with the shared item.

templateSharedItem

Information about shared templates.

errorDetailserrorDetails

owneruserInfo

The user who owns the template.

sharedstring

How the template is shared. One of:

  • not_shared
  • shared_to
  • shared_from
  • shared_to_and_from

sharedGroups[memberGroupSharedItem]

List of groups that share the template.

sharedUsers[userSharedItem]

List of users that share the template.

templateIdstring

The unique identifier of the template. If this is not provided, DocuSign will generate a value.

templateNamestring

The name of the shared template.

userInfo

activationAccessCodestring

emailstring

errorDetailserrorDetails

loginStatusstring

sendActivationEmailstring

uristring

userIdstring

The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. Note: For GET /v2/accounts/{accountId}/envelopes user_id query parameter is not implemented and should not be used.

userNamestring

userStatusstring

Status of the user's account. One of:

  • ActivationRequired
  • ActivationSent
  • Active
  • Closed
  • Disabled

userTypestring

userSharedItem

Information about a shared item.

errorDetailserrorDetails

sharedstring

How the item is shared. One of:

  • not_shared
  • shared_to
  • shared_from
  • shared_to_and_from

useruserInfo

The user whose sharing information is being requested.

Examples

Generic JSON Request/Response

Request
{
  "resultSetSize": "sample string 1",
  "totalSetSize": "sample string 2",
  "startPosition": "sample string 3",
  "endPosition": "sample string 4",
  "nextUri": "sample string 5",
  "previousUri": "sample string 6",
  "accountId": "sample string 7",
  "sharedAccess": [
    {
      "user": {
        "userName": "sample string 1",
        "userId": "sample string 2",
        "email": "sample string 3",
        "userType": "sample string 4",
        "userStatus": "sample string 5",
        "uri": "sample string 6",
        "loginStatus": "sample string 7",
        "sendActivationEmail": "sample string 8",
        "activationAccessCode": "sample string 9"
      },
      "envelopes": [
        {
          "user": {},
          "shared": "sample string 1"
        }
      ],
      "templates": [
        {
          "templateId": "sample string 1",
          "templateName": "sample string 2",
          "owner": {},
          "sharedUsers": [
            {
              "user": {}
            }
          ],
          "sharedGroups": [
            {
              "group": {
                "groupId": "sample string 1",
                "groupName": "sample string 2",
                "permissionProfileId": "sample string 3",
                "groupType": "sample string 4",
                "users": [
                  {}
                ]
              }
            }
          ],
          "shared": "sample string 3"
        }
      ]
    }
  ]
}
Response
{
  "resultSetSize": "sample string 1",
  "totalSetSize": "sample string 2",
  "startPosition": "sample string 3",
  "endPosition": "sample string 4",
  "nextUri": "sample string 5",
  "previousUri": "sample string 6",
  "accountId": "sample string 7",
  "sharedAccess": [
    {
      "user": {
        "userName": "sample string 1",
        "userId": "sample string 2",
        "email": "sample string 3",
        "userType": "sample string 4",
        "userStatus": "sample string 5",
        "uri": "sample string 6",
        "loginStatus": "sample string 7",
        "sendActivationEmail": "sample string 8",
        "activationAccessCode": "sample string 9",
        "errorDetails": {
          "errorCode": "sample string 1",
          "message": "sample string 2"
        }
      },
      "envelopes": [
        {
          "user": {},
          "shared": "sample string 1",
          "errorDetails": {
            "errorCode": "SUCCESS",
            "message": ""
          }
        }
      ],
      "templates": [
        {
          "templateId": "sample string 1",
          "templateName": "sample string 2",
          "owner": {},
          "sharedUsers": [
            {
              "user": {},
              "errorDetails": {
                "errorCode": "SUCCESS",
                "message": ""
              },
              "shared": "sample string 1"
            }
          ],
          "sharedGroups": [
            {
              "group": {
                "groupId": "sample string 1",
                "groupName": "sample string 2",
                "permissionProfileId": "sample string 3",
                "groupType": "sample string 4",
                "users": [
                  {}
                ],
                "errorDetails": {
                  "errorCode": "SUCCESS",
                  "message": ""
                }
              },
              "errorDetails": {
                "errorCode": "SUCCESS",
                "message": ""
              },
              "shared": "sample string 1"
            }
          ],
          "errorDetails": {
            "errorCode": "SUCCESS",
            "message": ""
          }
        }
      ],
      "errorDetails": {
        "errorCode": "SUCCESS",
        "message": ""
      }
    }
  ],
  "errorDetails": {
    "errorCode": "SUCCESS",
    "message": ""
  }
}
Generic XML Request/Response

Request
<accountSharedAccess xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <accountId>sample string 7</accountId>
  <endPosition>sample string 4</endPosition>
  <nextUri>sample string 5</nextUri>
  <previousUri>sample string 6</previousUri>
  <resultSetSize>sample string 1</resultSetSize>
  <sharedAccess>
    <memberSharedItems>
      <envelopes>
        <sharedItem>
          <shared>sample string 1</shared>
          <user />
        </sharedItem>
      </envelopes>
      <templates>
        <templateSharedItem>
          <owner />
          <shared>sample string 3</shared>
          <sharedGroups>
            <memberGroupSharedItem>
              <group>
                <groupId>sample string 1</groupId>
                <groupName>sample string 2</groupName>
                <groupType>sample string 4</groupType>
                <permissionProfileId>sample string 3</permissionProfileId>
                <users>
                  <userInfo />
                </users>
              </group>
            </memberGroupSharedItem>
          </sharedGroups>
          <sharedUsers>
            <userSharedItem>
              <user />
            </userSharedItem>
          </sharedUsers>
          <templateId>sample string 1</templateId>
          <templateName>sample string 2</templateName>
        </templateSharedItem>
      </templates>
      <user>
        <activationAccessCode>sample string 9</activationAccessCode>
        <email>sample string 3</email>
        <loginStatus>sample string 7</loginStatus>
        <sendActivationEmail>sample string 8</sendActivationEmail>
        <uri>sample string 6</uri>
        <userId>sample string 2</userId>
        <userName>sample string 1</userName>
        <userStatus>sample string 5</userStatus>
        <userType>sample string 4</userType>
      </user>
    </memberSharedItems>
  </sharedAccess>
  <startPosition>sample string 3</startPosition>
  <totalSetSize>sample string 2</totalSetSize>
</accountSharedAccess> 
Response
<accountSharedAccess xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <accountId>sample string 7</accountId>
  <endPosition>sample string 4</endPosition>
  <errorDetails>
    <errorCode>SUCCESS</errorCode>
    <message></message>
  </errorDetails>
  <nextUri>sample string 5</nextUri>
  <previousUri>sample string 6</previousUri>
  <resultSetSize>sample string 1</resultSetSize>
  <sharedAccess>
    <memberSharedItems>
      <envelopes>
        <sharedItem>
          <errorDetails>
            <errorCode>SUCCESS</errorCode>
            <message></message>
          </errorDetails>
          <shared>sample string 1</shared>
          <user />
        </sharedItem>
      </envelopes>
      <errorDetails>
        <errorCode>SUCCESS</errorCode>
        <message></message>
      </errorDetails>
      <templates>
        <templateSharedItem>
          <errorDetails>
            <errorCode>SUCCESS</errorCode>
            <message></message>
          </errorDetails>
          <owner />
          <sharedGroups>
            <memberGroupSharedItem>
              <errorDetails>
                <errorCode>SUCCESS</errorCode>
                <message></message>
              </errorDetails>
              <group>
                <errorDetails>
                  <errorCode>SUCCESS</errorCode>
                  <message></message>
                </errorDetails>
                <groupId>sample string 1</groupId>
                <groupName>sample string 2</groupName>
                <groupType>sample string 4</groupType>
                <permissionProfileId>sample string 3</permissionProfileId>
                <users>
                  <userInfo />
                </users>
              </group>
              <shared>sample string 1</shared>
            </memberGroupSharedItem>
          </sharedGroups>
          <sharedUsers>
            <userSharedItem>
              <errorDetails>
                <errorCode>SUCCESS</errorCode>
                <message></message>
              </errorDetails>
              <shared>sample string 1</shared>
              <user />
            </userSharedItem>
          </sharedUsers>
          <templateId>sample string 1</templateId>
          <templateName>sample string 2</templateName>
        </templateSharedItem>
      </templates>
      <user>
        <activationAccessCode>sample string 9</activationAccessCode>
        <email>sample string 3</email>
        <errorDetails>
          <errorCode>sample string 1</errorCode>
          <message>sample string 2</message>
        </errorDetails>
        <loginStatus>sample string 7</loginStatus>
        <sendActivationEmail>sample string 8</sendActivationEmail>
        <uri>sample string 6</uri>
        <userId>sample string 2</userId>
        <userName>sample string 1</userName>
        <userStatus>sample string 5</userStatus>
        <userType>sample string 4</userType>
      </user>
    </memberSharedItems>
  </sharedAccess>
  <startPosition>sample string 3</startPosition>
  <totalSetSize>sample string 2</totalSetSize>
</accountSharedAccess> 
}} />