Invite user
Auth
Invite user
/auth/invite
POST
Invite user
This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
/auth/invite Description:Creates or updates an invitation for a workspace member. The endpoint guarantees that a
TenantInvite record exists so workspace admins can audit, resend, or cancel the invite through /user/invites. When an invite is cancelled later, the associated activation link is invalidated automatically.
Method:POST
Security:
- Basic Authentication required
| Parameter | Type | Description | Required |
|---|---|---|---|
| userId (Optional) | string | Existing tenant user record to attach to the invite | No |
| Parameter | Type | Description |
|---|---|---|
| string | Email address to invite. | |
| sendEmail (Optional) | boolean | Whether to send the invite email (defaults to true). |
| message (Optional) | string | Custom text to include with the invite email. |
| redirectUrl (Optional) | string | Override activation redirect URL in the invite email. |
Invitations are only available to workspace owners or admins. A tenant user can only have one active invitation at a time.
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Query Parameters
The tenant user record to associate with the invite
Body
application/json
The email address of the user to be invited
Whether to email the invitation (defaults to true)
Custom message that will be included in the invite email
Example:
"Welcome to the workspace!"
URL override for the activation link in the invite email
Example:
"https://app.royalti.io/email/activate"
Response
Success - Existing User Invite