Invitations
GET /api/invitations/{token}
Section titled “GET /api/invitations/{token}”Get Invitation
Resolve the invitation behind an email link’s token.
Public — see the module docstring for why, and for what it is safe to
return. status is reported as-is (pending / accepted /
revoked) rather than 404-ing on a spent invitation, so the page can say
“you’ve already joined, sign in” instead of “this link is broken”. A token
that has been rotated away from — or that never matched anything — gets a
plain 404, which is also what a mid-rollout row created by the previous
release gets: it has a token, but one that was never mailed to anybody.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| token | path | string | yes | The opaque secret from the invitation email’s link |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | PublicInvitationResponse |
| 404 | No invitation matches this token | |
| 422 | Validation Error | HTTPValidationError |