Accept an invitation and join its workspace
POST
/api/v1/invitations/accept
const url = 'https://api.crossmart.io/api/v1/invitations/accept';const options = { method: 'POST', headers: { cookie: 'better-auth.session_token=<better-auth.session_token>', 'Content-Type': 'application/json' }, body: '{"token":"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://api.crossmart.io/api/v1/invitations/accept \ --header 'Content-Type: application/json' \ --cookie better-auth.session_token=<better-auth.session_token> \ --data '{ "token": "example" }'Needs a signed-in user whose email is the invited address (403 otherwise).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
token
required
string
Example generated
{ "token": "example"}Responses
Section titled “Responses”Media typeapplication/json
object
workspaceId
required
string format: uuid
role
required
string
Example
{ "role": "OWNER"}