---
title: "Invites a user to a workspace."
method: POST
path: "/invitations"
tags: ["invitations"]
---

# Invites a user to a workspace.

`POST /invitations`

<Check title="Required Permissions" icon="key">Allows unauthenticated access.</Check>

## Request body

- Invitation — The invitation of a user to a workspace.
  - `workspaceId` string, uuid, nullable — The id of the workspace to invite the user to. If not set, a new workspace will be created.
  - `invitationFlow` string, nullable — 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` string, uuid, nullable — The id of the role to which the new user should be added.
  - `connectInviteCode` string, nullable — The awork connect invite code.
  - `passcode` string, nullable — The bot prevention passcode.
  - `email` string, nullable — The email of the user to be invited.
  - `password` string, nullable — The Password of the user to be invited.
  - `firstName` string, nullable — The first name of the user to be invited.
  - `lastName` string, nullable — The last name of the user to be invited.
  - `title` string, nullable — The title of the user to be invited.
  - `position` string, nullable — The position of the user to be invited.
  - `gender` string, nullable — The gender of the user to be invited. Can be 'male', 'female' or 'other'.
  - `skipSendingEmail` boolean — If set to true, skips sending the welcome email. Important for batch invites.
  - `teamIds` string[], nullable — The list of team ids where the user should be assigned to.
  - `bookedSeats` integer, nullable — The amount of booked seats.

## Response `200`

OK

- InvitationResponse
  - `invitationCode` string, nullable — The invitation code that is used to confirm the invitation. The code is valid for 24 hours.
  - `passwordResetCode` string, nullable — A code that is used to reset the user's password.
  - `userId` string, uuid — The id of the user that has been invited.
  - `workspace` Workspace — The workspace GET model.
    - `name` string, nullable — The workspace name. Optional.
    - `description` string, nullable — The workspace description. Optional.
    - `language` string, nullable — The workspace language. Optional.
    - `type` string, nullable — The workspace type / industry set during onboarding. Optional.
    - `size` string, nullable — The workspace size. Optional.
    - `goals` string[], nullable — The workspace team goals. Optional.
    - `selfAttribution` string, nullable — The way the workspace creator learned awork, set during the onboarding. Optional.
    - `previousTool` string, nullable — The project management tool used before awork, set during the onboarding. Optional.
    - `aiUsage` string, nullable — How the team uses AI, set during the onboarding. Optional.
    - `department` string, nullable — The workspace creator's department, set during the onboarding. Optional.
    - `allowSocialLogin` boolean, required — Whether the social login via apple and google is allowed.
    - `allowCredentialsLogin` boolean, required — Whether the user can login with username and password.
    - `allowAutomaticScimUserBooking` boolean, nullable — Whether the SCIM integration should be able to book additional user seats when provisioning and activating new users, or should return BadRequest. Only admins are allowed to change this setting.
    - `sameDomainSignupEnabled` boolean, nullable — Whether same domain signup feature is enabled. Only admins are allowed to change this setting.
    - `sameDomainSignupRoleId` string, uuid, nullable — Default Role for users who sign up through same domain signup. Only admins are allowed to change this setting.
    - `sameDomainSignupDomains` string[], nullable — Domains enabled for same domain signup feature. Only admins are allowed to change this setting.
    - `requireMfa` boolean — Whether the workspace requires multi-factor authentication for all users.
    - `skipCreateDefaultWorkspaceData` boolean, nullable — Whether to skip the creation of default workspace data.
    - `id` string, uuid — The id of the workspace.
    - `subdomains` SubdomainBase[], nullable — The workspace's subdomains. Read-only.
      - `name` string, nullable — The subdomain hostname.
      - `isDefault` boolean — Whether this is the default subdomain of the workspace.
    - `memberCount` integer, nullable — The amount of workspace members. Only visible when the user is authenticated. Read-only.
    - `lastUsed` boolean — Whether this is the workspace the current user last logged in with.
    - `lastLogin` string, date-time, nullable — The date and time the user last logged in with this workspace, or the workspace was last accessed.
    - `accountIds` string[], nullable — The ids of identities assigned to this workspace. Read-only.
    - `hasImage` boolean — Whether the workspace has uploaded a workspace image.
    - `createdOn` string, date-time — The date this workspace was created.
    - `createdBy` string, uuid, nullable — The id of the user who created this workspace. Only set after the first invitation succeeded.
    - `updatedOn` string, date-time — The date this workspace was last modified.
    - `updatedBy` string, uuid, nullable — The id of the user who last updated this workspace. Only set after the first invitation succeeded.
    - `isTestWorkspace` boolean — Whether the workspace is a test workspace.
    - `isApproved` boolean — Whether the user accepted the invitation to the workspace.
    - `allowSSOLogin` boolean — Whether the user can login via an external SSO provider.
    - `isScimActivated` boolean — Whether the workspace has SCIM user provisioning enabled.
    - `virtualMRR` number, double, nullable — The virtual MRR calculated during onborading.
    - `isMobileSignup` boolean, nullable — The type of sign-up set during the onboarding. Can be: web, mobile, ...
    - `isFreeMail` boolean, nullable — Whether the domain of the account of the workspace creator is a freemail or a business domain.
    - `isJoinable` boolean — Whether this workspace has same domain sign up enabled and the account's email matches the permitted domains.
    - `isFull` boolean, nullable — Whether this workspace is full and no more users can join. Used in same domain sign up flow.

## Other responses

- `400` — Bad Request
- `404` — Not Found

## Changes

- **2026-09-20** `5332322ffca3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/awork-io/apis/api-v1-reference/changes/invitations/post.md)

---

[API](https://skmtc.dev/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.dev/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/awork-io/apis/api-v1-reference/revisions/eadefd26df12?raw)
