curl --request POST \
'https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/remove_user_access' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"staff_id":"STAFF-001"}'
// Run on your server. Keep WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/remove_user_access', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ staff_id: 'STAFF-001' })
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success !== true) {
throw new Error(result.message || 'User access removal failed');
}
# Run on your server. Keep 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/remove_user_access',
headers={'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}"},
json={'staff_id': 'STAFF-001'},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is not True:
raise RuntimeError(result.get('message', 'User access removal failed'))
{"status":"success","success":true,"role":"Remove Access"}
{"status":"error","success":false,"message":"Invalid authorization token"}
{"status":"error","success":false,"message":"staff_id must match exactly one user in this company"}
API reference
Remove user access
Archive a staff account by setting its existing role to Remove Access.
POST
/
version-test
/
api
/
1.1
/
wf
/
remove_user_access
curl --request POST \
'https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/remove_user_access' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"staff_id":"STAFF-001"}'
// Run on your server. Keep WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/remove_user_access', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ staff_id: 'STAFF-001' })
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success !== true) {
throw new Error(result.message || 'User access removal failed');
}
# Run on your server. Keep 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/remove_user_access',
headers={'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}"},
json={'staff_id': 'STAFF-001'},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is not True:
raise RuntimeError(result.get('message', 'User access removal failed'))
{"status":"success","success":true,"role":"Remove Access"}
{"status":"error","success":false,"message":"Invalid authorization token"}
{"status":"error","success":false,"message":"staff_id must match exactly one user in this company"}
POST /remove_user_access
This endpoint is available in the test environment. It has not been deployed live.
Authorization
string
required
Company Bearer token. Keep it on your server. The token determines which company’s users can be changed.
Body parameters
string
required
The external Staff ID used when inviting the user. It must match exactly one user within the authenticated company. This is separate from the returned Bubble user_id.
Response and retries
string
success after the role has been set.boolean
true on success; false on an application error.string
Remove Access on success.Error responses
Check the JSON body even when the HTTP status is 200.| Message | Meaning | Action |
|---|---|---|
Invalid authorization token | Missing or unmatched company authorization. | Check the company token, environment and Bearer header. |
staff_id must match exactly one user in this company | Missing Staff ID, no matching user in this company, or multiple matching users. | Use the invitation’s Staff ID and resolve duplicate IDs before retrying. No user’s role is changed. |
curl --request POST \
'https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/remove_user_access' \
--header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"staff_id":"STAFF-001"}'
// Run on your server. Keep WFA_COMPANY_TOKEN in its environment.
const response = await fetch('https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/remove_user_access', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ staff_id: 'STAFF-001' })
});
const result = await response.json();
if (!response.ok || result.status !== 'success' || result.success !== true) {
throw new Error(result.message || 'User access removal failed');
}
# Run on your server. Keep 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/remove_user_access',
headers={'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}"},
json={'staff_id': 'STAFF-001'},
timeout=45,
)
result = response.json()
if not response.ok or result.get('status') != 'success' or result.get('success') is not True:
raise RuntimeError(result.get('message', 'User access removal failed'))
{"status":"success","success":true,"role":"Remove Access"}
{"status":"error","success":false,"message":"Invalid authorization token"}
{"status":"error","success":false,"message":"staff_id must match exactly one user in this company"}
