Skip to main content

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. 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 and decline.
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 (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.

Usage Example

Parameters

None — the user is derived from the token.

Returns

{ data: WorkspaceInvitation[] } — each item a WorkspaceInvitation object. Never paginated.