Skip to main content

updateInvitationLink

InvitationLinkWrapper updateInvitationLink(InvitationLinkUpdateRequestDto)

PUT /api/2.0/portal/users/invitationlink

Update an invitation link

Changes the deadline and the use limit of an existing invitation link, addressed by its id. The role of a link cannot be changed - delete it and create a link for the other role instead. Inviting members has to be enabled for the portal (GET api/2.0/settings/invitationsettings), the link has to exist, and maxUseCount may not be lower than the number of uses the link already has, which GET api/2.0/portal/users/invitationlink/{employeeType} reports as currentUseCount. An expiration in the past is refused; the body is applied as a whole, so omitting expiration clears the deadline and omitting maxUseCount removes the use limit. The caller needs the right to add users of the link's role and only the portal owner may change the DocSpace administrator link. The call is mutating, and repeating it with the same body leaves the link as it is. The whole link comes back as it now stands, with url signed for the calling account - the URL therefore differs between administrators while the link behind it is the same.

Parameters​

NameInTypeDescriptionNotes
InvitationLinkUpdateRequestDtobodyInvitationLinkUpdateRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The invitation link as it now stands, with the deadline and the use limit that were appliedInvitationLinkWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no id, the use limit is outside 1-1000 or lower than the number of uses the link already has, or the deadline is in the past--
403Inviting members is disabled for the portal, the caller has no right to add users of the link's role, or a non-owner tries to change the DocSpace administrator link--
404No invitation link with this ID exists on the portal--
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​

InvitationLinkWrapper

Authorization​

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

HTTP request headers​

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