Skip to main content
Decline Invite
Declines an invitation. Identity-matched (the caller must be the invite’s target) and verification-gated — a verified email is required, exactly as it is to accept. Without that gate, someone who signed up with another person’s address and never verified it could burn the real target’s invite by moving it to the terminal declined state. This is not a key-bypass gate: a service or master key acting as a named actingUserId still requires that user to be verified. Marks the invite declined and fires workspace.invite.declined.

Path Parameters

string
required
The invitation UUID.

Body Parameters

string
required
Service/master keys only — the declining user (must be the invite’s target). Required for a key: a decline is an act by the invitee, so there is no unbounded path — a key that names nobody is refused with 400 workspace/missing-user-id.A plain user token omits it — the actor is the token’s own user. The field is not ignored for such a token: sending your own user id is a harmless no-op, but sending anyone else’s is a 403 workspace/unauthorized. See Acting on behalf of a user.

Response

Error Responses

A caller who is not the invitation’s target receives the same 404 as a non-existent invitation.
The actingUserId a key named does not exist in this project. Naming is not authentication — the id is only looked up here.
A service/master key called this route without naming an actingUserId. A decline is an act by the invitee; there is nobody to attribute it to.
A plain user token sent an actingUserId naming a different user. Only a service/master key may act as someone else.
Every path id on the workspaces bundle is checked for UUID shape before the route runs, so a malformed one is a plain 400 rather than a 500 from the database.
See also: useDeclineWorkspaceInvite