Skip to content
Get started

Revoke an invitation

client.viewer.users.invitations.revoke(InvitationRevokeParams { invitationId, userId } body?, RequestOptionsoptions?): InvitationRevokeResponse { success, message }
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
body: InvitationRevokeParams { invitationId, userId }
invitationId?: string

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

userId?: string

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

ReturnsExpand Collapse
InvitationRevokeResponse { success, message }

Response for revoking an invitation in Viewer

success: boolean
message?: string

Revoke an invitation

import Avara from 'avara';

const client = new Avara({
  apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted
});

const response = await client.viewer.users.invitations.revoke();

console.log(response.success);
{
  "success": true,
  "message": "message"
}
Returns Examples
{
  "success": true,
  "message": "message"
}