Accept invitation
POST
/api/v1/invitations/accept
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.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
token
required
Invitation token from the invitation email
string
Example
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...name
Display name for the new user (required if user does not exist)
string
Example
John Doepassword
Password for the new user (required if user does not exist)
string
Example
SecureP@ssw0rd!Responses
Section titled “Responses”Invitation accepted successfully
Invalid token, expired invitation, or missing required fields
Invitation not found
Invitation already accepted