POST
TeamMembers.Remove
Remove a team member from the organization by soft-deleting and disabling the user. Only the owner or a manager can call this method. The owner user cannot be removed by this route.
Permissions
- Only the organization owner or a manager can call this route.
Action
- Removes the requested TeamMembers record when the user has permission.
Push Service
Pushes event teammembers.remove.deleted to users who should see this change.
Automation
No automation is run for this function.
Special Instructions
- Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
- Send parameters as POST body fields exactly as documented.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
team_member_idpost | int | 321 | Team member id to remove. Aliases: member_id, user_id, id. |
Optional Parameters
No optional body parameters are defined for this function.
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/TeamMembers.Remove",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"team_member_id": "321"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/TeamMembers.Remove",
"url_domain": "https:\/\/{domain}\/app\/TeamMembers.Remove"
}Endpoint
POST /app/TeamMembers.Remove
POST https://{user}.bull36.com/app/TeamMembers.Remove
POST https://{domain}/app/TeamMembers.RemoveSample Output
{
"success": 1,
"message": "Team member removed",
"team_member_id": "321",
"socket_event": "teammembers.remove.deleted",
"automation_event": null
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ team_member_id: '321' });
const res = await fetch('/app/TeamMembers.Remove', { method: 'POST', headers: { Authorization: `Bearer ${token}` }, body });
const data = await res.json();
console.log(data);Error Example
{
"success": "0",
"error": "permission_denied",
"message": "Permission denied to manage this resource"
}