> ## 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.

# Fetch my workspace invites

> The current user's inbox — live pending workspace invitations addressed to them

## Overview

`useFetchMyWorkspaceInvites` returns a callable for the signed-in user's **live** pending invites (`status='pending' AND expiresAt > now`), matched by `userId` from the token, across **every** workspace. This is the read that powers a "You've been invited" screen — and unlike every other workspace-invite read, each item embeds `workspace: { id, name }` and a populated `invitedBy` (instead of a bare id), since the invitee otherwise has no reach on either (a direct workspace read 404s for a non-member).

**Authorization:** self-service. No capability and no workspace scope — the caller is derived from the token. **Surfacing is not verification-gated**: a user sees invites right after signup; the verified check applies when they act on one — [accept](/v8/hooks/workspaces/use-accept-workspace-invite) *and* [decline](/v8/hooks/workspaces/use-decline-workspace-invite).

<Warning>
  **Inbox, not outbox.** `useFetchMyWorkspaceInvites` (`GET /me/workspace-invites`) lists the invites **addressed to the signed-in user**, spanning every workspace, with no capability required.

  [`useFetchWorkspaceInvites`](/v8/hooks/workspaces/use-fetch-workspace-invites) (`GET /workspaces/:id/invites`) lists the invites **one workspace has issued**, and requires the `invite` capability there.

  These are the two most confusable hooks in the bundle. A members/admin panel wants the **other** hook; a personal notifications screen wants this one.
</Warning>

## Usage Example

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

function PendingInvites() {
  const fetchMyWorkspaceInvites = useFetchMyWorkspaceInvites();

  const load = async () => {
    const { data } = await fetchMyWorkspaceInvites();
    return data; // MyWorkspaceInvitation[] — invites addressed to me
  };
}
```

## Parameters

None — the user is derived from the token.

## Returns

`{ data: MyWorkspaceInvitation[] }` — each item a `MyWorkspaceInvitation`: a [WorkspaceInvitation](/v8/data-models/workspace-invitation) with `workspace` and `invitedBy` embedded (see the note on that page). Never paginated.

## Related

* [`useFetchWorkspaceInvites`](/v8/hooks/workspaces/use-fetch-workspace-invites) — the **outbox** counterpart
* [`useAcceptWorkspaceInvite`](/v8/hooks/workspaces/use-accept-workspace-invite) · [`useDeclineWorkspaceInvite`](/v8/hooks/workspaces/use-decline-workspace-invite)
* [List My Invites API](/v8/api-reference/workspaces/invitations/list-my-invites)


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