Invites a user to the workspace.
Invites the user with the email address to the workspace with the specified id.
Sends an invitation email to the user with a link to accept the invitation.
For automated invitation flows, sending the email can be skipped by setting the
'skipSendingEmail' flag to 'true'.
Additionally, the invitation code, which is valid for 24 hours,
is returned so that the caller can accept the invitation right away.
Headers
Authorization
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
workspaceId
The id of the workspace to invite the user to.
If not set, a new workspace will be created.
invitationFlow
The current invitation flow. Use ‘invite’ for an invitation from a system admin, ‘new_user_new_workspace’ for an invitation when creating a workspace for a new user or ‘existing_user_new_workspace’ when creating a workspace for an existing user.
roleId
The id of the role to which the new user should be added.
connectInviteCode
The awork connect invite code.
passcode
The bot prevention passcode.
email
The email of the user to be invited.
password
The Password of the user to be invited.
firstName
The first name of the user to be invited.
lastName
The last name of the user to be invited.
title
The title of the user to be invited.
position
The position of the user to be invited.
gender
The gender of the user to be invited. Can be 'male', 'female' or 'other'.
skipSendingEmail
If set to true, skips sending the welcome email. Important for batch invites.
teamIds
The list of team ids where the user should be assigned to.
bookedSeats
The amount of booked seats.
Response
OK
invitationCode
The invitation code that is used to confirm the invitation.
The code is valid for 24 hours.
passwordResetCode
A code that is used to reset the user's password.
userId
The id of the user that has been invited.
workspace
The workspace GET model.