Preview an invite by its bearer token
GET/api/invites/{token}
previewInvite
Anyone with the token can read it (the SPA renders the accept page from this). `target` says what accepting grants: membership of an org (`kind: org`) or a role on one repository (`kind: repo`). Returns 404 if the token doesn't match an invite, or 409 `already_exists` if the token is real but no longer usable (accepted, revoked, or expired) — the same status `acceptInvite` returns for that condition.
Authentication is not described for this operation in the spec — that does not mean it is public. Check tokens and scopes.
curl
curl -X GET 'https://neosource.dev/api/invites/TOKEN'fetch
fetch("https://neosource.dev/api/invites/TOKEN", {
method: "GET",
});Path parameters
tokenrequired
Responses
200Invite
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 404Not Found — one of: not_found
- 409Conflict — one of: already_exists
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget
Schemas
Referenced above. Listed here rather than expanded inline, so the same definition is not repeated at every level.
WorkspaceRole
Workspace membership role. Ordered low → high (`Member < Admin < Owner`) so that `if actor_role >= WorkspaceRole::Admin` reads naturally.
"member""admin""owner"
RepoRole
Repo-level role (read/write/maintain/admin). Ordered low → high so `if role >= RepoRole::Write` reads naturally.
"read""write""maintain""admin"