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

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
workspaceIdUUID or nullOptional

The id of the workspace to invite the user to. If not set, a new workspace will be created.

invitationFlowstring or nullOptional

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.

roleIdUUID or nullOptional

The id of the role to which the new user should be added.

connectInviteCodestring or nullOptional

The awork connect invite code.

emailstring or nullOptional

The email of the user to be invited.

passwordstring or nullOptional

The Password of the user to be invited.

firstNamestring or nullOptional

The first name of the user to be invited.

lastNamestring or nullOptional

The last name of the user to be invited.

titlestring or nullOptional

The title of the user to be invited.

positionstring or nullOptional

The position of the user to be invited.

genderstring or nullOptional

The gender of the user to be invited. Can be ‘male’, ‘female’ or ‘other’.

skipSendingEmailbooleanOptional

If set to true, skips sending the welcome email. Important for batch invites.

teamIdslist of UUIDsOptional

The list of team ids where the user should be assigned to.

bookedSeatsinteger or nullOptional

The amount of booked seats.

Response

OK

invitationCodestring or nullOptional

The invitation code that is used to confirm the invitation. The code is valid for 24 hours.

passwordResetCodestring or nullOptional

A code that is used to reset the user’s password.

userIdUUIDOptional

The id of the user that has been invited.

workspaceobjectOptional

The workspace GET model.