Skip to main content
DELETE
/
api
/
adm
/
invitations
/
{id}
Delete User Invitation
curl --request DELETE \
  --url https://localhost:44371/api/adm/invitations/{id} \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Description

Marks an invitation as deleted (soft delete) which prevents the invitation link from being used for registration. The invitation record is retained for audit purposes but becomes inactive. Use this when an invitation was sent in error or the user should no longer be granted access.

Input

  • Path Parameter: id (guid, required) — Unique identifier of the invitation to delete.

Output

Returns a UserInvitationDeleteCommandResponse indicating whether the deletion was successful.

Example Request

DELETE /api/admin/userInvitations/9ef15c43-a955-6f4h-c7g3-1h6d4f0e3g9c
Authorization: Bearer {token}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Errors

  • 400 Bad Request — Accepted invitations cannot be deleted.
  • 404 Not Found — Invitation does not exist.

Notes

  • Invitation is soft-deleted (marked inactive) rather than permanently removed.
  • Invitation link immediately becomes invalid after deletion.
  • Accepted invitations cannot be deleted.
  • Deleted invitations can be queried for audit purposes but cannot be restored.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string<guid>
required

The unique identifier of the invitation to cancel/delete.

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard command response indicating the result of a data modification. Represents the response returned after deleting user invitations.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null