Check HTTP status and the JSON body
Check forstatus: "error" or success: false, even when HTTP status indicates success. Application error messages are endpoint-specific. Do not translate them into assumed HTTP 400, 401 or 404 codes.
Message errors
Staff email belongs to another company
create_pending_user restores existing staff only in the authenticated company. If the email belongs to another company, Bubble returns HTTP 400 with reason: "USED_EMAIL" and a message containing the email. No existing foreign-company profile is changed. Contact your administrator to resolve membership; do not retry with another company’s token.
Field-validation errors
These responses include anerrors array, with the field name and a message describing the failed check.
Before retrying
Only poll retrieve when the response isPending, with a short delay and a bounded timeout. Do not repeatedly resend create or invitation requests after a timeout: the first request may have completed. New staff requests can send emails. Existing staff requests return the same account and restore Remove Access to Approver without sending emails. A retry after removal restores access again; retry only while restoration remains intended. For decision retries, reuse the same externalEventId and identical decision data. Completed duplicates are acknowledged without another history entry; different data using that ID is rejected. A simultaneous copy can return a processing error: retrieve, wait briefly, then retry the same request. Serialize different decisions for an assessment. See decision retry responses.
