Skip to main content
PUT
/
tenant
/
{tenantId}
/
admin
/
user
/
invitation
/
cancel
CancelInvitation
curl --request PUT \
  --url https://api.example.com/tenant/{tenantId}/admin/user/invitation/cancel
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Description

This endpoint cancels a pending invitation, preventing the recipient from accepting it.

Input

  • tenantId (path, required): Identifier of the tenant that owns the invitation
  • id (query, required): Identifier of the invitation to cancel
  • cancellationToken (optional): Token to cancel the asynchronous operation

Output

Returns a Result<ICollection<UserInvitationModel>> containing the remaining invitations.

Examples

Request:
PUT /api/tenant/1024/invitations/cancel?id=9001
Response (200 OK):
{
  "data": [],
  "isSuccess": true
}

Errors

  • 400 Bad Request: Invalid invitation identifier
  • 401 Unauthorized: Authentication credentials are missing or invalid
  • 403 Forbidden: User lacks permission to manage invitations
  • 404 Not Found: Invitation does not exist
  • 500 Internal Server Error: Unexpected server error occurred

Notes

  • Only pending invitations can be cancelled
  • Cancelled invitations cannot be reactivated

Path Parameters

tenantId
integer<int64>
required

Identifier of the tenant that owns the invitation.

Query Parameters

id
integer<int64>

Identifier of the invitation to cancel.

Response

Invitation cancelled successfully.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object[] | null

The result value returned when the operation is successful.