Skip to content

Accept an invitation with its token; requires an open session (code or passkey) with the invited email

POST
/v1/invitations/accept
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.

Media typeapplication/json
object
token
required
string
<= 2048 characters

Example generated

{
"token": "example"
}

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"
}
}