curl --request POST \
'https://www.app.wfa.team/api/1.1/wf/create_pending_user' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
}'
// Run on your server. Set WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://www.app.wfa.team/api/1.1/wf/create_pending_user', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
})
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success === false) {
throw new Error(result.message || JSON.stringify(result.errors || result));
}
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://www.app.wfa.team/api/1.1/wf/create_pending_user',
headers={
'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}",
'Content-Type': 'application/json',
},
json={
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is False:
raise RuntimeError(result.get('message') or result.get('errors') or result)
print(result)
{
"status": "success",
"response": {
"user_id": "YOUR_USER_ID"
}
}
{
"status": "error",
"success": false,
"message": "Invalid authorization token"
}
{
"status": "error",
"success": false,
"message": "Could not create pending user"
}
API reference
Add or restore staff
Create new staff or restore an archived staff member by email.
POST
/
api
/
1.1
/
wf
/
create_pending_user
curl --request POST \
'https://www.app.wfa.team/api/1.1/wf/create_pending_user' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
}'
// Run on your server. Set WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://www.app.wfa.team/api/1.1/wf/create_pending_user', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
})
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success === false) {
throw new Error(result.message || JSON.stringify(result.errors || result));
}
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://www.app.wfa.team/api/1.1/wf/create_pending_user',
headers={
'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}",
'Content-Type': 'application/json',
},
json={
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is False:
raise RuntimeError(result.get('message') or result.get('errors') or result)
print(result)
{
"status": "success",
"response": {
"user_id": "YOUR_USER_ID"
}
}
{
"status": "error",
"success": false,
"message": "Invalid authorization token"
}
{
"status": "error",
"success": false,
"message": "Could not create pending user"
}
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_idand preserves its current role.
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
Body parameters
Required in every request. Used only for a new account; ignored for an existing account.
Required in every request. Used only for a new account; ignored for an existing account.
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
| Message | Meaning | Action |
|---|---|---|
Invalid authorization token | Missing or unmatched company authorization. | Check the company token and Bearer header. |
Could not create pending user | The account-creation step returned no user. | Check staff details and company membership. An email owned by another company cannot be restored. |
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.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.
curl --request POST \
'https://www.app.wfa.team/api/1.1/wf/create_pending_user' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
}'
// Run on your server. Set WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://www.app.wfa.team/api/1.1/wf/create_pending_user', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
})
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success === false) {
throw new Error(result.message || JSON.stringify(result.errors || result));
}
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://www.app.wfa.team/api/1.1/wf/create_pending_user',
headers={
'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}",
'Content-Type': 'application/json',
},
json={
"first_name": "Alex",
"last_name": "Taylor",
"email": "alex.taylor@example.com",
"staff_id": "STAFF-001"
},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is False:
raise RuntimeError(result.get('message') or result.get('errors') or result)
print(result)
{
"status": "success",
"response": {
"user_id": "YOUR_USER_ID"
}
}
{
"status": "error",
"success": false,
"message": "Invalid authorization token"
}
{
"status": "error",
"success": false,
"message": "Could not create pending user"
}
