Skip to navigation

SetSharedAccess

View as Markdown

SetSharedAccess is used to set or update the shared item status for one or more users and types of items. The users and item types listed in the SharedAccessFilter. This call can only be used by users with account administration privileges.

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

Schema

NameSchema TypeDescription
AccountIdStringAccount Id.
SharedItemsArray of SharedItems objectsAn array of shared item information to be updated. See the description below for more information.

Description of SharedItems objects

| Name | Schema Type | Description | | --- | --- | --- | | User | User object | The UserId of the user for which the shared item status is being changed. | | SharedItem | Array of SharedItem objects | Array of SharedItem objects. A SharedItem object is required for each shared item access status being changed. See the description below for more information. |

Description of SharedItem objects:

NameSchema TypeDescription
UsersUser objectThe UserId of the account user for whom the shared access status is being changed. The status change is relative to the user set by the UserId enclosed in the SharedItems object previously described.
SharedShared statusSpecifies the change to the sharing status between the user and other account users for the specified item type.

The accepted values are:

- NotShared: This removes all sharing between the user and the account user for this item type. - SharedTo: This only shares access from the item type for the account user to the user. There is no shared access from the user to the account user (only shared to the user). - SharedFrom: This only shares access to the item type from the user to the account user. There is no shared access to the user from the account user with this status (only shared from the user). - SharedToAndFrom: This shares access to and from the item type for both the user and the account user.
ItemTypeItemTypeThe type of the shared item. Currently the only ItemType supported is Envelopes.

Sample Request XML

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<env: Body>
<SetSharedAccess xmlns="http://www.docusign.net/API/3.0">
<SetSharedAccessRequest>
<AccountId>string</AccountId>
<SharedItems>
<User>
<UserId>be27e2d2-xxxx-xxxx-xxxx-24933f750e73</UserId>
</User>
<Shareditem>
<User>
<UserId>1f2289df-xxxx-xxxx-xxxx-bb70362ea662</UserId>
</User>
<Shared>SharedTo</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>1272b5d0-xxxx-xxxx-xxxx-ce8ccafdffd4</UserId>
</User>
<Shared>SharedToAndFrom</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>284ede51-xxxx-xxxx-xxxx-141f9bc22eda</UserId>
</User>
<Shared>NotShared</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>fefc71c2-xxxx-xxxx-xxxx-d6198df3909d</UserId>
</User>
<Shared>SharedFrom</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
</SharedItems>
<SharedItems>
<User>
<UserId>0af4e014-xxxx-xxxx-xxxx-00d6f4157223</UserId>
</User>
<SharedItem>
<User>
<UserId>1f2289df-xxxx-xxxx-xxxx-bb70362ea662</UserId>
</User>
<Shared>SharedTo</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>1272b5d0-xxxx-xxxx-xxxx-ce8ccafdffd4</UserId>
</User>
<Shared>SharedToAndFrom</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>284ede51-xxxx-xxxx-xxxx-141f9bc22eda</UserId>
</User>
<Shared>NotShared</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>fefc71c2-xxxx-xxxx-xxxx-d6198df3909d</UserId>
</User>
<Shared>SharedFrom</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
</SharedItems>
</SetSharedAccessRequest>
</SetSharedAccess>
</env:Body>
</env:Envelope>

The response returns the information from the changes and either a success or failure. If the call fails an error code is provided.

Sample Response XML

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap: Body>
<SetSharedAccessResponse xmlns="http://www.docusign.net/API/3.0">
<SetSharedAccessResult>
<AccountId>string</AccountId>
<SharedItems>
<User>
<UserId>be27e2d2-xxxx-xxxx-xxxx-24933f750e73</UserId>
</User>
<ErrorDetails>
<ErrorCode>error code</ErrorCode>
<Message>error message</Message>
</ErrorDetails>
</SharedItems>
<SharedItems>
<User>
<UserId>0af4e014-xxxx-xxxx-xxxx-00d6f4157223</UserId>
<Email>john.doe@docusign.com</Email>
<UserName>John Doe</UserName>
</User>
<SharedItem>
<User>
<UserId>1f2289df-xxxx-xxxx-xxxx-bb70362ea662</UserId>
<Email>jane.doe@docusign.com</Email>
<UserName>Jane Doe</UserName>
</User>
<Shared>SharedTo</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>1272b5d0-xxxx-xxxx-xxxx-ce8ccafdffd4</UserId>
<Email>juan.doe@docusign.com</Email>
<UserName>Juan Doe</UserName>
</User>
<Shared>SharedToAndFrom</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>284ede51-xxxx-xxxx-xxxx-141f9bc22eda</UserId>
<Email>ted.doe@docusign.com</Email>
<UserName>Ted Doe</UserName>
</User>
<Shared>NotShared</Shared>
<ItemType>Envelopes</ItemType>
</SharedItem>
<SharedItem>
<User>
<UserId>fefc71c2-xxxx-xxxx-xxxx-d6198df3909d</UserId>
</User>
<ErrorDetails>
<ErrorCode>error code</ErrorCode>
<Message>error message</Message>
</ErrorDetails>
</SharedItem>
</SharedItems>
</SetSharedAccessResult>
</SetSharedAccessResponse>
</soap:Body>
</soap:Envelope>