> ## 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 app users

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

Invites people to the app by email. Each address gets an invitation email with a link to the app.

Set `role` to the role they get in the app, `user` unless you say otherwise. Set `collaborator_role` to `editor` to also let them edit the app in Base44. An editor invitation only goes to members of the app's workspace unless you also set `add_as_guest`, which adds anyone else to the workspace as a guest. Only workspace editors and admins can add guests.

An invitation that fails doesn't fail the call. You get a 200 with one entry per address in `results`, so check `success` on each. Invited people appear in [List app users](/api-reference/list-app-users) once they sign in to the app.

Every address counts toward the app's daily invitation allowance, which depends on your plan, including addresses whose invitation then fails. A call that would go over it is refused with a 429 and sends nothing.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted.</Note>



## OpenAPI

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


        Invites people to the app by email. Each address gets an invitation
        email with a link to the app.


        Set `role` to the role they get in the app, `user` unless you say
        otherwise. Set `collaborator_role` to `editor` to also let them edit the
        app in Base44. An editor invitation only goes to members of the app's
        workspace unless you also set `add_as_guest`, which adds anyone else to
        the workspace as a guest. Only workspace editors and admins can add
        guests.


        An invitation that fails doesn't fail the call. You get a 200 with one
        entry per address in `results`, so check `success` on each. Invited
        people appear in [List app users](/api-reference/list-app-users) once
        they sign in to the app.


        Every address counts toward the app's daily invitation allowance, which
        depends on your plan, including addresses whose invitation then fails. A
        call that would go over it is refused with a 429 and sends nothing.


        <Note>This endpoint accepts a personal API key belonging to a user with
        editor access to the app. A read-only key is refused, and workspace API
        keys are not accepted.</Note>
      operationId: invite_users_api_apps__app_id__users_invite_users_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app to invite the users to.
            title: App Id
          description: ID of the app to invite the users to.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: InviteAppUsers
              required:
                - user_emails
              properties:
                user_emails:
                  type: array
                  items:
                    type: string
                  maxItems: 50
                  description: Email addresses to invite, up to 50 per call.
                  example:
                    - jane@acme.com
                    - sam@acme.com
                role:
                  type: string
                  default: user
                  description: >-
                    Role the invited people get in the app, such as `user` or
                    `admin`. It isn't checked against the roles the app defines.
                  example: user
                collaborator_role:
                  type: string
                  enum:
                    - editor
                  description: Set to `editor` to also let them edit the app in Base44.
                  example: editor
                add_as_guest:
                  type: boolean
                  default: false
                  description: >-
                    With `collaborator_role` set to `editor`, adds anyone
                    outside the app's workspace to it as a guest instead of
                    failing their invitation.
                  example: false
            example:
              user_emails:
                - jane@acme.com
                - sam@acme.com
              role: user
      responses:
        '200':
          description: The outcome of each invitation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteUsersResponse'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have editor access to this app, the app is blocked, your
            API key is read-only, or you're a workspace viewer inviting an admin
            or an editor.
        '404':
          description: App not found.
        '422':
          description: >-
            `user_emails` is missing or has more than 50 addresses, or
            `collaborator_role` isn't `editor`.
        '429':
          description: >-
            Too many invitations. The base limit is 6 requests per minute,
            shared with the app's other invitation calls, and the app's daily
            invitation allowance also applies. See [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
components:
  schemas:
    InviteUsersResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/InviteUserResult'
          type: array
          title: Results
          description: One entry per address you sent.
          example:
            - email: jane@acme.com
              success: true
            - email: sam@acme.com
              error: Builder already exists.
              success: false
      type: object
      required:
        - results
      title: InviteUsersResponse
      description: The outcome of each invitation, in the order you sent them.
    InviteUserResult:
      properties:
        email:
          type: string
          title: Email
          description: The address, as you sent it.
          example: jane@acme.com
        success:
          type: boolean
          title: Success
          description: Whether the invitation was sent.
          example: true
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: >-
            Why the invitation wasn't sent. Only present when `success` is
            `false`.
          example: User is not a member of this workspace.
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: >-
            `not_workspace_member` when an editor invitation went to someone
            outside the app's workspace. Send it again with `add_as_guest` set
            to add them. Absent for every other failure.
          example: not_workspace_member
        has_pending_invitation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Pending Invitation
          description: >-
            Whether that person already has an invitation to the workspace
            waiting. Only present with `not_workspace_member`.
          example: false
      type: object
      required:
        - email
        - success
      title: InviteUserResult
      description: What happened to one invitation.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````