Documents: CreateDocumentUser

Grants a user access to a document. You specify the user's userId in the request body. The response is an object that specifies the access the user has.

Request

HTTP request

POST /restapi/v2/accounts/{accountId}/documents/{documentId}/users

Parameters

Parameter NameValueDescription
Path Parameters
documentIdinteger

The ID of the document.

accountIdstring

The globally unique identifier (GUID) for the account.

Responses

CodeDescriptionReference
201

User successfully granted access to document.

DocumentUser
400

Bad request. See ErrorCode and Message for details

ApiError
401

Not authorized to make this request.

ApiError

SDK Method

Documents::CreateDocumentUser

Definitions

ApiError

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

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

DocumentUser

userIdinteger

The id of the user.

documentIdinteger

The ID of the document.

namestring

The file name associated with the document.

hasAccessboolean

True if the user userId has access to this document.

canApproveTaskboolean

True if the user userId has can approve a task for this document.

canAssignToTaskListboolean

True if the user userId can assign this document to a task list.

canCopyboolean

True if the user userId can make a copy of this document.

canDeleteboolean

True if the user userId can delete this document.

canRemoveFromTaskListboolean

True if the user userId can remove this document from a task list.

canRemoveApprovalboolean

True if the user userId can remove approval for this document.

canRenameboolean

True if the user userId can rename this document.

canShareboolean

True if the user userId can share this document.

canViewActivityboolean

True if the user userId can view activity on this document.

DocumentUserForCreate

userIdinteger

The id of the user.

}} />