curl --request POST \
'https://wfa-team-tool-v1.bubbleapps.io/version-test/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://wfa-team-tool-v1.bubbleapps.io/version-test/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();
// Check the JSON body as well as the HTTP status.
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://wfa-team-tool-v1.bubbleapps.io/version-test/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,
)
# Check the JSON body as well as the HTTP status.
print(response.json())
{
"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
Invite a staff member
Create a pending compliance team member with the Approver role.
POST
/
version-test
/
api
/
1.1
/
wf
/
create_pending_user
curl --request POST \
'https://wfa-team-tool-v1.bubbleapps.io/version-test/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://wfa-team-tool-v1.bubbleapps.io/version-test/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();
// Check the JSON body as well as the HTTP status.
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://wfa-team-tool-v1.bubbleapps.io/version-test/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,
)
# Check the JSON body as well as the HTTP status.
print(response.json())
{
"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
This request sends invitation emails. Use a controlled test address.
Authorization
string
required
Company Bearer token. Keep it on your server.
Body parameters
string
required
Staff member’s first name.
string
required
Staff member’s last name.
string
required
Staff member’s invitation email address.
string
required
Your external Staff ID; use it when referring to the person in assessments.
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 the staff details and whether the user already exists before retrying. |
Response
string
Account identifier; separate from your external staff_id.
Check the JSON response as well as HTTP status. HTTP 200 can contain an API error. If a request times out, check the assessment before retrying. Retry deduplication is not verified.
curl --request POST \
'https://wfa-team-tool-v1.bubbleapps.io/version-test/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://wfa-team-tool-v1.bubbleapps.io/version-test/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();
// Check the JSON body as well as the HTTP status.
console.log(result);
# Run on your server. Set WFA_COMPANY_TOKEN in its environment.
import os
import requests
response = requests.post(
'https://wfa-team-tool-v1.bubbleapps.io/version-test/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,
)
# Check the JSON body as well as the HTTP status.
print(response.json())
{
"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"
}
.avif?fit=max&auto=format&n=D14pPx7nwaebT2G5&q=85&s=4c6d67fe3600ae0af1af440b290c4e21)