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

  • 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.
  • 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

NameTypeSampleExplanation
team_member_id
post
int321Team member id to update. Aliases: member_id, user_id, id.

Optional Parameters

NameTypeSampleWhat it gives
name
post
stringDana LeviUpdate display name.
email
post
email[email protected]Update email.
password
post
stringNewStrongPassword123Replace login password.
phone
post
string0500000000Update phone.
mobile
post
string0500000001Update mobile.
title
post
stringSales managerUpdate title.
status
post
int11 active, 0 inactive.
member_admin
post
int1Set 1 manager, 0 normal team member.
roles_modules
post
json{"customer_add":"1"}Replace/assign permission flags.
shared_with_folder
post
json["1","2"]Replace visible folder list. Always stored as unique strings, e.g. ["1","2","3"].
folder_permissions
post
json{"1":{"edit":"1"}}Replace per-folder permission object.

Authentication

Send the bearer token returned by Login in the request header.

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.Edit

Sample 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"
}