The
/auth/invite
endpoint allows administrators to invite new users to the system by providing their email address and specifying their permissions. Optionally, a redirect URL can be provided to redirect users after they accept the invitation.
Method:POST
Security:
- Basic Authentication required
Parameter | Type | Description | Required |
---|---|---|---|
workspaceId | string | The workspaceId/userId of the invitee | No |
userId | string | The ID of the user to invite | No |
Parameter | Type | Description |
---|---|---|
string | The email address of the user to be invited. | |
sendEmail | boolean | This sends an invite email to the user, by default it is true. |
message (Optional) | string | This adds a message to invite email to the user |
firstName (Optional) | string | The first name of the user to be invited. |
lastName (Optional) | string | The last name of the user to be invited. |
redirect_url (Optional) | string | The URL to redirect the user to after they accept the invitation. |
role (Optional) | string | The role of the invited user. |
To prevent duplicate email addresses, a user can only be associated with one tenant user record within a workspace
Authentication
This endpoint requires authentication. Include your bearer token in the Authorization header.Query Parameters
Parameter | Type | In | Required | Description |
---|---|---|---|---|
userId | string | query | ❌ | The workspaceId/userId of the invitee |
Request Body
Request Schema
Field | Type | Required | Description |
---|---|---|---|
email | string | ✅ | The email address of the user to be invited |
sendEmail | boolean | ❌ | This sends an invite email to the user, by default it is true |
message | string | ❌ | This adds a message to invite email to the user |
firstName | string | ❌ | The first name of the user to be invited |
lastName | string | ❌ | The last name of the user to be invited |
redirect_url | string | ❌ | The URL to redirect the user to after they accept the invitation |
role | string | ❌ | The role of the invited user |
Responses
✅ 201 - Success - Existing User Invite
⚠️ 400 - Error - Missing Fields
⚠️ 401 - Unauthorized
⚠️ 404 - Not Found
❌ 500 - Internal Server Error
Tags
Auth
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Query Parameters
The workspaceId/userId of the invitee
Body
application/json
The email address of the user to be invited
This sends an invite email to the user, by default it is true
This adds a message to invite email to the user
The first name of the user to be invited
The last name of the user to be invited
The URL to redirect the user to after they accept the invitation
The role of the invited user
Response
Success - Existing User Invite