Skip to main content

Overview

useFetchWorkspaceInvites returns a callable that lists the live pending invitations one workspace has issued (status = 'pending' AND expiresAt > now — effectively-expired rows are excluded). This is the read that powers the “Pending invitations” section of a members panel: who this team has invited and not yet heard back from. Authorization: capability-gated. Requires the invite capability on the workspace (owners hold it implicitly). The list is always returned in full — it is deliberately unpaginated, so there is no page/limit and no *Wrapper hook.
Outbox, not inbox. useFetchWorkspaceInvites (GET /workspaces/:id/invites) lists the invites this workspace sent out — it is scoped to one workspace and needs the invite capability there.useFetchMyWorkspaceInvites (GET /me/workspace-invites) lists the invites addressed to the signed-in user — it is scoped to the caller, spans every workspace, and needs no capability.These are the two most confusable hooks in the bundle. If you are building an admin/members screen you want this hook; if you are building a “You’ve been invited” screen you want the other one.

Usage Example

Paired with useRevokeWorkspaceInvite and useResendWorkspaceInvite, this completes a members panel entirely on the client — no server-side code and no hand-rolled fetch.

Parameters

string
required
The workspace UUID whose issued invitations to list.

Returns

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

Error codes