neosourceDocs
Search docs

Preview an invite by its bearer token

GET/api/invites/{token}

previewOrgInvite

Anyone with the token can read it (the SPA renders the accept page from this). 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 `acceptOrgInvite` 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

string

Responses

200Invite

application/json

OrgInvitePreviewResponse

object

emailrequired

string

expires_atrequired

integerint64

org_display_namerequired

string

org_slugrequired

string

Slug + `display_name` suffice for the SPA to render an "X invited you to join Y" page without leaking the `invite_id`.

rolerequired

WorkspaceRole

string

Workspace membership role. Ordered low → high (`Member < Admin < Owner`) so that `if actor_role >= WorkspaceRole::Admin` reads naturally.

"member""admin""owner"

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