POST
Fields.Edit
Edit customer field settings. For custom fields, send field_name and only the definition properties you want to change. For fixed/regular fields, send field_kind=fixed and field_key to change visibility, required flag, folder placement, dashboard slot, or folder dashboard settings.
Permissions
- 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.
- 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 |
|---|---|---|---|
field_namepost | string | a-1710000000 | Custom field storage key to edit. For fixed/regular fields, send field_key instead. Aliases: name, key. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
field_kindpost | string | custom | custom edits a custom field. fixed, regular, or common edits settings for an existing fixed customer field. Defaults to custom. |
field_keypost | string | phone | Fixed/regular customer field key when field_kind=fixed. |
labelpost | string | Budget | New display label. You may send label_en/en and label_he/he separately. |
typepost | string | select | New custom input type. |
optionspost | json/list | ["A","B"] | Replace options for select/radio/checkbox fields. |
positionpost | int | 4 | Move the field to this position. |
requiredpost | int | 1 | Set 1 required, 0 optional. Alias: require. |
show_hidepost | int | 1 | Set 1 visible, 0 hidden. Alias: visible. |
folder_idpost | int | 1 | For fixed/regular fields, update this folder field list. |
folder_fieldspost | 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_slotpost | int | 2 | Place the field in organization dashboard slot field_1, field_2, etc. |
dashboard_fieldspost | 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.
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.EditSample 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"
}