Accept an invitation with its token; requires an open session (code or passkey) with the invited email
POST
/v1/invitations/accept
const url = 'https://api.replifier.com/v1/invitations/accept';const options = { method: 'POST', headers: {'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.replifier.com/v1/invitations/accept \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Without a session, 401; with a session for another email, 403 invitation_wrong_account. If the user has no account yet, POST /v1/auth/code/verify with invitation creates it.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
token
required
string
Example generated
{ "token": "example"}Responses
Section titled “Responses”Invitation accepted
Media typeapplication/json
object
organizationId
required
string
userId
required
string
accountCreated
required
boolean
Example generated
{ "organizationId": "example", "userId": "example", "accountCreated": true}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Conflict
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}