POST

Fields.Edit

Edit customer field settings. Same storage as dashboard Settings → Custom fields (user_detail.extra_fields). For custom fields, send field_name (a-...) and only the properties to change. Nested fields inside type=group are supported. For fixed/regular fields, send field_kind=fixed and field_key.

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 edit customer fields or field settings.

Action

  • Updates the requested Fields record after validating permissions and input fields.

Push Service

Pushes event fields.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

NameTypeSampleExplanation
field_name
post
stringa-1710000000Custom field storage key to edit. For fixed/regular fields, send field_key instead. Aliases: name, key.

Optional Parameters

NameTypeSampleWhat it gives
field_kind
post
stringcustomcustom edits a custom field. fixed, regular, or common edits settings for an existing fixed customer field. Defaults to custom.
field_key
post
stringphoneFixed/regular customer field key when field_kind=fixed.
label
post
stringBudgetNew display label. You may send label_en/en and label_he/he separately.
type
post
stringselectNew custom input type.
options
post
json/list["A","B"]Replace options for select/radio/checkbox fields.
options_en
post
stringUSA,CanadaComma-separated English options for select/radio/checkbox.
options_he
post
stringUSA,CanadaComma-separated Hebrew options for select/radio/checkbox.
coloroption
post
string#2f80ed,#27ae60Comma-separated option colors matching options_en/options_he.
multiple
post
int0Set 1 to allow multi-select on select fields.
dependency
post
int1Set 1 when this field should show only when another field has a value.
dependency_field
post
stringa-1710000000Parent custom field name this field depends on. Alias: dependency_field_name.
dependency_field_value
post
stringUSAParent option value that must be selected for this field to show.
position
post
int4Move the field to this position.
required
post
int1Set 1 required, 0 optional. Alias: require.
show_hide
post
int1Set 1 visible, 0 hidden. Alias: visible.
folder_id
post
int1For fixed/regular fields, update this folder field list.
folder_fields
post
json["name","address","mobile","email","company_id","credit"]Replace the full ordered field list for folder_id (common_folder_fields). Can include fixed keys and custom field names. Also hides other regular fields for this folder in fields_list_show.
dashboard_slot
post
int2Place the field in organization dashboard slot field_1, field_2, etc.
dashboard_fields
post
json["name","phone"]For folder-specific dashboard fields, send folder_id and the full ordered list.

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\/Fields.Edit",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "field_name": "a-1710000000",
        "label": "Budget",
        "type": "number",
        "required": "1"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Fields.Edit",
    "url_domain": "https:\/\/{domain}\/app\/Fields.Edit"
}

Endpoint

POST /app/Fields.Edit
POST https://{user}.bull36.com/app/Fields.Edit
POST https://{domain}/app/Fields.Edit

Sample Output

{
    "success": 1,
    "message": "Field updated",
    "field_kind": "custom",
    "field_name": "a-1710000000",
    "socket_event": "fields.edit.updated",
    "automation_event": null
}

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ field_name: 'a-1710000000', label: 'Budget', type: 'number', required: '1' });
const res = await fetch('/app/Fields.Edit', { method: 'POST', headers: { Authorization: `Bearer ${token}` }, body });
const data = await res.json();
console.log(data);

Error Example

{
    "success": "0",
    "error": "missing_required_parameter",
    "message": "Missing required parameter: field_name"
}