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

Description

This endpoint declines an invitation, marking it as rejected and preventing future acceptance.

Input

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

Output

Returns a Result<TenantViewModel> containing the tenant details involved in the invitation.

Examples

Request:
POST /api/tenant/1024/invitations/9001/decline
Response (200 OK):
{
  "data": {
    "id": 1024,
    "name": "Acme Corp"
  },
  "isSuccess": true
}

Errors

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

Notes

  • Only pending invitations can be declined
  • Declined invitations cannot be reactivated
  • User will not gain tenant access

Path Parameters

tenantId
integer<int64>
required

Identifier of the tenant that issued the invitation.

id
integer<int64>
required

Identifier of the invitation to decline.

Response

Invitation declined 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

The result value returned when the operation is successful.