Accept a team invite
Accept a team invite. Requires the team:write scope.
Authorizations
OAuth 2.1 authorization code + PKCE (S256). Tokens are tenant-bound (company_id) and scoped. Discover endpoints via /.well-known/oauth-authorization-server.
Path Parameters
The code.
Body
Accept-invite request body. The endpoint takes no body fields — the invite is identified by the {code} path param and the caller by the bearer token (the MCP accept_invite tool sends {}). Source: app/api/oauth/v1/team/invites/[code]/route.ts POST (acceptTeamInvite(payload, code, ...)).
Response
Result of accepting the invite: joined status, method, and (on the unauthenticated path) a Firebase custom token.
Accept-invite result. Source: acceptTeamInvite use-case (lib/api/team/team-invite.usecase.ts). customToken is present only on the unauthenticated custom-token path; alreadyAccepted only when re-accepting an already-accepted invite under the matching session.