Accepting or Declining a Share

You can use the shareStatus call to accept or decline a share invitation.

Sample URL

https://hostname:port/context/rest/v2/documents/shareStatus/{id}

Method

POST

Parameters

Parameter Description
id Require.

The ID of the document.

It should be on the URL.

user Required.

The user who accepts or declines the share.

It must be the logged-in user.

status Required.

The valid values are A (accept) and D (decline).

Example:

user='UserId1
status=A

Response

Explanation of special response codes:
HTTP Status Code Description
406 Not Acceptable. The document cannot be shared because it is not a folder.
409 Conflict. The document cannot be shared because failed to verify that is not already shared, user does not exist, and other conflicts.