Skip to content

Invite a user to an organization by email. Caller must be owner or admin.

POST
/_torii/organizations/{organizationId}/invitations
curl --request POST \
--url https://your-app.toriiauth.eu/_torii/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/invitations \
--header 'Content-Type: application/json' \
--data '{ "email": "[email protected]", "role": "example" }'
organizationId
required
string format: uuid
Media typeapplication/json
object
email
required
string format: email
>= 1 characters
role
required
string
>= 1 characters
Examplegenerated
{
"email": "[email protected]",
"role": "example"
}

OK

Media typeapplication/json
object
id
required
string format: uuid
organizationId
required
string format: uuid
email
required
string
role
required
string
token
required
string
expiresAt
required
string format: date-time
emailDelivery
required

Whether an invitation email was dispatched. dispatched = handed to the best-effort mailer (the env has an invitation accept URL configured); not_configured = no accept URL, so no email was sent and the returned token/share-link is the only way in.

string
Allowed values: DISPATCHED NOT_CONFIGURED
Example
{
"emailDelivery": "DISPATCHED"
}