Skip to content
Get started

Revoke an invitation

viewer.users.invitations.revoke(InvitationRevokeParams**kwargs) -> InvitationRevokeResponse
post/v1/viewer/users/invitations/revoke

Revokes a pending invitation, preventing it from being accepted. Can revoke by invitation ID, user ID, or both. Useful for cancelling invitations sent in error.

ParametersExpand Collapse
invitation_id: Optional[str]

Invitation ID to revoke. Format: inv_{32-hex-chars}

user_id: Optional[str]

User ID whose pending invitation to revoke. Format: usr_{32-hex-chars}

ReturnsExpand Collapse
class InvitationRevokeResponse:

Response for revoking an invitation in Viewer

success: bool
message: Optional[str]
Revoke an invitation
import os
from avara import Avara

client = Avara(
    api_key=os.environ.get("AVARA_API_KEY"),  # This is the default and can be omitted
)
response = client.viewer.users.invitations.revoke()
print(response.success)
{
  "success": true,
  "message": "message"
}
Returns Examples
{
  "success": true,
  "message": "message"
}