Skip to main content
POST
POST /create_pending_user
Creating and restoring staff is available live. Creation, removal and restoration were verified against the live API on 18 October 2026.

Create or restore by email

The workflow matches the email case-insensitively within the company authenticated by your Bearer token.
  • If no matching account exists, it creates a new Approver and sends the normal invitation and team notification emails.
  • If the account exists with Remove Access, it restores the role to Approver and returns the existing user_id.
  • If the account is already active, it returns the existing user_id and preserves its current role.
For existing accounts, only the archived role changes. Names, email, Staff ID, company, login details and history are retained. Supplied names and staff_id are used for new accounts; they do not overwrite an existing profile. An account belonging to another company is never reassigned or restored by this request.
Existing-account requests send no invitation, password reset or team notification emails. New-account requests send the normal emails. Use a controlled test address.

Authorization

string
required
Company Bearer token. Keep it on your server.

Body parameters

string
required
Required in every request. Used only for a new account; ignored for an existing account.
string
required
Required in every request. Used only for a new account; ignored for an existing account.
string
required
Staff member’s invitation email address.
string
required
Required in every request. Saved only for a new account; an existing account keeps its original Staff ID. Use that saved ID for assessment decisions and removal.

Error responses

An email already owned by another company returns HTTP 400 with Bubble’s reason: "USED_EMAIL". The message includes the supplied email. Check both HTTP status and the JSON body; do not treat this as a successful restore.

Response

The same success envelope is returned for creation, restoration and an already-active account. It does not indicate which branch ran or return the saved Staff ID. Do not infer that the submitted Staff ID replaced an existing one. Restoration does not activate a never-activated account; invitation setup is still required before it can act as a compliance approver.
string
Account identifier; separate from your external staff_id. Existing and restored accounts return their preserved Bubble user ID.
Check the JSON response as well as HTTP status. HTTP 200 can contain an API error. Repeat requests for an existing email in the same company return the same account without resending invitations. A retry after removal restores access again, so retry only while adding/restoring that staff member remains intended. Concurrent new-account creation is not deduplicated.