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 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>

post/api/apps/{app_id}/users/invite-users

Path parameters

app_idstring required

ID of the app to invite the users to.

ID of the app to invite the users to.

Request body

user_emailsstring[] required

Email addresses to invite, up to 50 per call.

rolestring

Role the invited people get in the app, such as user or admin. It isn't checked against the roles the app defines.

collaborator_role'editor'

Set to editor to also let them edit the app in Base44.

add_as_guestboolean

With collaborator_role set to editor, adds anyone outside the app's workspace to it as a guest instead of failing their invitation.

Example request

{
  "user_emails": [
    "jane@acme.com",
    "sam@acme.com"
  ],
  "role": "user",
  "collaborator_role": "editor"
}

Response

The outcome of each invitation.

Example response

{
  "results": [
    {
      "email": "jane@acme.com",
      "success": true
    },
    {
      "email": "sam@acme.com",
      "error": "Builder already exists.",
      "success": false
    }
  ]
}

Changes

Changed in 1 of the 14 revisions of this API.1