Accept Invitation New Account
const url = 'https://example.com/api/auth/invitations/accept';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"full_name":"example","password":"example","token":"example","username":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/auth/invitations/accept \ --header 'Content-Type: application/json' \ --data '{ "full_name": "example", "password": "example", "token": "example", "username": "example" }'Create an account by accepting an organization invitation.
REGISTRATION CARVE-OUT — deliberately NOT gated by ALLOW_REGISTRATION (compare register() above): an owner’s invitation, delivered to the invitee’s mailbox, IS the authorization. It stays scoped to exactly that one address: the request carries no email, the account is created for the invitation’s stored address, and the token is burned in the same transaction. /register itself is unchanged and stays closed.
The account is created verified (receiving the token proves mailbox ownership, exactly what /verify-email proves) and with NO default organization — the invitee joins the inviter’s org instead of minting a stray trial org + billing owner. Terms acceptance is captured by the console’s post-login gate (terms_accepted_at stays NULL here, same as a Google sign-up). LOGIN_ALLOWED_EMAILS is enforced before anything is written, so a locked-down server never gets an account that cannot sign in.
Request Bodyrequired
Section titled “ Request Bodyrequired ”BUG-377: create an account by accepting an invitation.
Deliberately carries NO email: the account is always created for the invitation’s own stored address, so a token can never mint an account for any other address (the ALLOW_REGISTRATION=false carve-out stays scoped to exactly the invited email). Field rules match RegisterRequest.
object
Example generated
{ "full_name": "example", "password": "example", "token": "example", "username": "example"}Responses
Section titled “ Responses ”Successful Response
Example generated
exampleValidation Error
object
object
object
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}