Skip to content

Invite User

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

Invites a user to join a sector by sending them an invite email with a magic link. The invite email contains a one-time password (OTP) that the user must provide to complete the invite and set their password. Requires the caller to be an admin of the sector or the default sector when a sector does not allow user creation by non-admins.

Media type application/json
object
sectorID
string
email
string
name
string
Example generated
{
"sectorID": "example",
"email": "example",
"name": "example"
}

A successful response.

Media type application/json
object
sub
string
email
string
Example generated
{
"sub": "example",
"email": "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"
}
]
}