Accept invitation
const url = 'http://localhost:3000/api/v1/invitations/accept';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","name":"John Doe","password":"SecureP@ssw0rd!"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/invitations/accept \ --header 'Content-Type: application/json' \ --data '{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "name": "John Doe", "password": "SecureP@ssw0rd!" }'Accepts an invitation and adds the user to the organization. If the user does not exist, name and password are required.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Invitation token from the invitation email
Example
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Display name for the new user (required if user does not exist)
Example
John DoePassword for the new user (required if user does not exist)
Example
SecureP@ssw0rd!Responses
Section titled “Responses”Invitation accepted successfully
Invalid token, expired invitation, or missing required fields
Invitation not found
Invitation already accepted