createInvitationLink
InvitationLinkWrapper createInvitationLink(InvitationLinkCreateRequestDto)
POST /api/2.0/portal/users/invitationlink
Create an invitation link
Creates the portal's invitation link for one role and returns it together with the URL to share. A portal keeps at most one link per role, so a call for a role that already has one is refused - read the existing link with GET api/2.0/portal/users/invitationlink/{employeeType} and change it with PUT api/2.0/portal/users/invitationlink instead. Inviting members has to be enabled for the portal (GET api/2.0/settings/invitationsettings), employeeType has to be DocSpaceAdmin, RoomAdmin or User, and expiration, when given, has to lie in the future and is read in the portal time zone. The caller needs the right to add users of that role, only the portal owner may create the DocSpace administrator link, and a link for a paying role is refused while the portal payment is overdue or the portal quota has no free paid seat left. The call is mutating and not idempotent. The answer carries the id needed to update or delete the link, the shortened url, maxUseCount and currentUseCount, expiration in the portal time zone - empty for a link that never expires - and isExpired.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| InvitationLinkCreateRequestDto | body | InvitationLinkCreateRequestDto | [optional] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The invitation link as it was created, with the id to address it later and the url to share | InvitationLinkWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | The request body cannot be read, the role is not DocSpaceAdmin, RoomAdmin or User, the use limit is outside 1-1000, the deadline is in the past, or the role already has a link | - | - |
| 402 | The link is for a paying role, and the portal payment is overdue or the portal quota has no free paid seat left | - | - |
| 403 | Inviting members is disabled for the portal, the caller has no right to add users of that role, or a non-owner asks for the DocSpace administrator link | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: application/json
- Accept: application/json