Invitations

Create New Invites

Changed on

Unified endpoint to create invitations for users OR admins based on role.

Authorization:

  • Only admin users can create invitations (for both admins and regular users)
  • Non-admin users will receive 403 Forbidden

For Admin Invitations (role="admin"):

  • Creates Firebase user with SSO authentication
  • Sends activation email with 24-hour expiry token
  • One membership per organization. Inviting an email that belongs to another organization is rejected unless ALLOW_MULTI_ORG_ADMINS is on
  • An email that is already an active admin here is reported per email as already_a_member; its membership is left untouched
  • Uses business_admins collection

For User Invitations (role != "admin"):

  • Validates emails exist in Firestore
  • Checks users are not already in any business
  • Creates invitation and sends email
  • Uses invitations collection

Request Body:

  • user_emails: List of email addresses
  • role: "admin" | "user"
  • invitation_expiry: Days until expiry (default: 7 for users, 24 hours for admins)
post/api/v1/invitations/create

Request

  • Base URL
    https://api.neosapien.xyz (the document declares no server; this is the origin it was published from)
  • URL
    https://api.neosapien.xyz/api/v1/invitations/create
  • Auth
    HTTP bearer

Request body

user_emailsstring[] required
invitation_expiryinteger nullable
role'admin' | 'manager' | 'viewer' | 'user' nullable
send_email_notificationboolean
country_codestring
mobile_numberstring nullable

Response

Successful Response

success_countinteger required
failed_countinteger required

Changes

    • warning

      added the new already_a_member enum value to the // response property for the response status