> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Invite workspace member

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Invites someone to a workspace by email. The invitee gets an email with a link to join, and a notification in Base44 if they already have an account. The link works for 60 days.

`role` is the role they get when they accept. Set `group_id` to add them to a custom group when they accept.

You can't invite an existing member, or someone whose invitation is still pending. Send a pending invitation again with [Resend workspace invitation](/api-reference/resend-workspace-invitation). Inviting someone whose invitation expired sends a new one.

A `200` means the invitation was saved. It doesn't confirm the email was sent: if sending fails, the invitation still stands and you can send it again with Resend workspace invitation. The response body is `null`.

Inviting is limited to 6 requests per minute, shared by [Invite workspace member](/api-reference/invite-workspace-member), [Invite workspace members in bulk](/api-reference/invite-workspace-members-in-bulk), [Resend workspace invitation](/api-reference/resend-workspace-invitation), and [Resend workspace invitations in bulk](/api-reference/resend-workspace-invitations-in-bulk). A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.

<Note>Call this as an owner or admin of the workspace, with a personal access token for that workspace sent as a Bearer token, or from a signed-in session. A read-only token is refused, and workspace API keys aren't accepted.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/workspace/invitations/invite
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/workspace/invitations/invite:
    post:
      summary: Invite workspace member
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Invites someone to a workspace by email. The invitee gets an email with
        a link to join, and a notification in Base44 if they already have an
        account. The link works for 60 days.


        `role` is the role they get when they accept. Set `group_id` to add them
        to a custom group when they accept.


        You can't invite an existing member, or someone whose invitation is
        still pending. Send a pending invitation again with [Resend workspace
        invitation](/api-reference/resend-workspace-invitation). Inviting
        someone whose invitation expired sends a new one.


        A `200` means the invitation was saved. It doesn't confirm the email was
        sent: if sending fails, the invitation still stands and you can send it
        again with Resend workspace invitation. The response body is `null`.


        Inviting is limited to 6 requests per minute, shared by [Invite
        workspace member](/api-reference/invite-workspace-member), [Invite
        workspace members in
        bulk](/api-reference/invite-workspace-members-in-bulk), [Resend
        workspace invitation](/api-reference/resend-workspace-invitation), and
        [Resend workspace invitations in
        bulk](/api-reference/resend-workspace-invitations-in-bulk). A signed-in
        session has its own limit, and every personal access token for the
        workspace shares one. Some workspaces have a different limit.


        <Note>Call this as an owner or admin of the workspace, with a personal
        access token for that workspace sent as a Bearer token, or from a
        signed-in session. A read-only token is refused, and workspace API keys
        aren't accepted.</Note>
      operationId: invite_workspace_member_api_workspace_invitations_invite_post
      parameters:
        - name: workspaceId
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: >-
              ID of the workspace. With a personal access token, use the token's
              workspace. Get it from `organization_id` in [Get
              app](/api-reference/get-app).
            title: Workspaceid
          description: >-
            ID of the workspace. With a personal access token, use the token's
            workspace. Get it from `organization_id` in [Get
            app](/api-reference/get-app).
          example: 67e0b12c4d8a3f005b21c9e4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteMemberRequest'
      responses:
        '200':
          description: The invitation was saved. The body is `null`.
          content:
            application/json:
              schema: {}
        '400':
          description: >-
            The person is already a member or already has a pending invitation,
            or `group_id` is an identity-provider group.
        '401':
          description: Missing or invalid credentials.
        '402':
          description: '`group_id` is set and the workspace''s plan doesn''t include groups.'
        '403':
          description: >-
            You aren't an owner or admin of the workspace, your token is for a
            different workspace or is read-only, your credential can't be used
            on this endpoint, or `role` is `admin` and the workspace's plan
            doesn't allow admins.
        '404':
          description: '`group_id` isn''t a group in this workspace.'
        '409':
          description: Your workspace requires an unlocked SSO session.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded.
components:
  schemas:
    InviteMemberRequest:
      properties:
        email:
          type: string
          maxLength: 254
          minLength: 5
          title: Email
          description: Email of the person to invite.
          example: dana@acme.com
        role:
          type: string
          enum:
            - admin
            - editor
            - viewer
          description: >-
            Role the invitee gets when they accept. Defaults to `viewer`.
            `admin` needs the Business plan or higher.
          default: viewer
          example: editor
        group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Group Id
          description: >-
            ID of a custom group to add the invitee to when they accept. Get it
            from [List workspace groups](/api-reference/list-workspace-groups).
            Needs a plan that includes groups.
          example: 68b4e1d2c9a7f3001e2d4b61
      type: object
      required:
        - email
      title: InviteMemberRequest
      description: An invitation to join a workspace.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.