Skip to content

Complete Invite

POST
/api/v1/users/invite/complete
curl --request POST \
--url https://api.spartanauth.com/api/v1/users/invite/complete \
--header 'Content-Type: application/json' \
--data '{ "sub": "example", "otp": "example", "password": "example", "sectorID": "example" }'

Validates the invite OTP for a pending invited user, sets their password, marks the invite as active, and returns a JWT when token issuance succeeds. Public endpoint intended for invite links; if token issuance fails, the invite still completes and the client can fall back to a normal login.

Media type application/json
object
sub
string
otp
string
password
string
sectorID
string
Example generated
{
"sub": "example",
"otp": "example",
"password": "example",
"sectorID": "example"
}

A successful response.

Media type application/json
object
success
boolean
message
string
token
string
Example generated
{
"success": true,
"message": "example",
"token": "example"
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}