POST
TeamMembers.Edit
Edit a team member profile or permissions. Only the owner or a manager can call this method. Send only fields that need to change.
Permissions
- On a company subdomain (e.g. https://{user_domain}.bull36.com) the user must match that Host — Login and protected APIs reject another company with success=0, error user_not_in_company. On a main brand host (bull36.com, biz1.co.il, mastrocrm.com, …) the company domain gate is skipped.
- Only the organization owner or a manager can call this route.
Action
- Updates the requested TeamMembers record after validating permissions and input fields.
Push Service
Pushes event teammembers.edit.updated 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.
- On a company subdomain (e.g. https://{user_domain}.bull36.com) the user must match that Host — Login and protected APIs reject another company with success=0, error user_not_in_company. On a main brand host (bull36.com, biz1.co.il, mastrocrm.com, …) the company domain gate is skipped.
- Send parameters as POST body fields exactly as documented.
- Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
team_member_idpost | int | 321 | Team member id to update. Aliases: member_id, user_id, id. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
namepost | string | Dana Levi | Update display name. |
emailpost | dana@example.com | Update email. | |
passwordpost | string | NewStrongPassword123 | Replace login password. |
phonepost | string | 0500000000 | Update phone. |
mobilepost | string | 0500000001 | Update mobile. |
titlepost | string | Sales manager | Update title. |
statuspost | int | 1 | 1 active, 0 inactive. |
member_adminpost | int | 1 | Set 1 manager, 0 normal team member. |
roles_modulespost | json | {"customer_add":"1"} | Replace/assign permission flags. |
shared_with_folderpost | json | ["1","2"] | Replace visible folder list. Always stored as unique strings, e.g. ["1","2","3"]. |
folder_permissionspost | json | {"1":{"edit":"1"}} | Replace per-folder permission object. |
Authentication
Send the bearer token returned by Login in the request header. The user must be from the same company domain as this Host — a token from another company is rejected (user_not_in_company).
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/TeamMembers.Edit",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"team_member_id": "321",
"name": "Dana Levi",
"member_admin": "1"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/TeamMembers.Edit",
"url_domain": "https:\/\/{domain}\/app\/TeamMembers.Edit"
}Endpoint
POST /app/TeamMembers.Edit
POST https://{user}.bull36.com/app/TeamMembers.Edit
POST https://{domain}/app/TeamMembers.EditSample Output
{
"success": 1,
"message": "Team member updated",
"team_member_id": "321",
"socket_event": "teammembers.edit.updated",
"automation_event": null
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ team_member_id: '321', name: 'Dana Levi', member_admin: '1' });
const res = await fetch('/app/TeamMembers.Edit', { 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"
}