> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# useRemoveInvite

> Revoke a user's invite to an event (host-only)

## Overview

`useRemoveInvite` returns a callable that removes a user's invite. **Host-only.** Removing the invite revokes access to an `invite`-only event and also deletes that user's RSVP (decrementing the count). Removing a non-invited user is an idempotent no-op.

## Usage Example

```tsx theme={null}
import { useRemoveInvite } from "@sublay/react-js";

function UninviteButton({ eventId }: { eventId: string }) {
  const removeInvite = useRemoveInvite();
  return (
    <button onClick={() => removeInvite({ eventId, userId: "usr_guest" })}>
      Remove invite
    </button>
  );
}
```

## Parameters

**eventId** `string` *required*

The event ID.

**userId** `string` *required*

The invitee to remove.

## Returns

Returns a `Promise<Event>` — the updated [Event](https://docs.sublay.io/v7/data-models/event.md) with refreshed `rsvpCounts`.

## See Also

* [Remove Invite API](https://docs.sublay.io/v7/api-reference/events/remove-invite.md)
* [useAddInvite](https://docs.sublay.io/v7/hooks/events/use-add-invite.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.