Skip to main content

setProductAdministrator

ProductAdministratorWrapper setProductAdministrator(SecurityRequestDto)

PUT /api/2.0/settings/security/administrator

Set product administrator

Promotes a portal member to administrator of one module, or takes that role away, according to the administrator flag; the all-zero product GUID targets the DocSpace administrator role, which covers the whole portal. The caller needs the portal-settings right of a DocSpace administrator, and granting the portal-wide role additionally requires being the portal owner - anyone else is refused with 403. A free cloud plan does not offer the option at all and answers 402, as does a promotion for which no paid seat is left, since promoting a guest or a plain member turns them into a paid one. Taking the portal-wide role away also removes the member from every product group. The change is immediate, portal-wide, recorded in the audit trail, and sending the same body twice changes nothing further; it never creates a user, so invite the member first. The answer echoes the identifiers and the flag as stored - re-read membership with GET api/2.0/settings/security/administrator.

Parameters​

NameInTypeDescriptionNotes
SecurityRequestDtobodySecurityRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The module, the user and the administrator flag as they were storedProductAdministratorWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no productId or userId--
402The portal plan does not offer product administrators, or no paid seat is left for the member being promoted--
403The caller has no portal-settings right, or is not the portal owner and grants the portal-wide administrator role or takes a role away from a DocSpace administrator--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

ProductAdministratorWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json