POST

Fields.Add

Add a customer field setting. For custom fields, this creates a new custom customer field definition in User.Basic field_settings.customer.extra_fields. For fixed/regular fields, this adds an existing fixed field to folderadd-form settings; fixed database fields themselves are not created.

Permissions

  • Only the organization owner or a manager can add customer fields or field settings.

Action

  • Creates a Fields record or sends the requested data after validation.

Push Service

Pushes event fields.add.created 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
label
post
stringBudgetDisplay label for a custom field. You may send label_en/en and label_he/he separately. For fixed fields send field_key instead.

Optional Parameters

NameTypeSampleWhat it gives
field_kind
post
stringcustomcustom creates a custom customer field. fixed, regular, or common changes settings for an existing fixed customer field. Defaults to custom.
field_key
post
stringphoneFixed/regular customer field key such as name, phone, mobile, email, company, source, notes, address, city, folder_id, status_id, tag, or extra_fields.
field_name
post
stringa-1710000000Custom field storage key. If omitted for custom fields the server creates one.
type
post
stringnumberCustom input type: text, textarea, number, date, datetime, time, select, radio, checkbox, file, image, button, title, group, email, phone, url, or formula.
position
post
int3Order of the field in the custom/folder field list.
required
post
int1Set 1 when the UI should require this field. Alias: require.
show_hide
post
int1Set 1 visible, 0 hidden. Alias: visible.
encrypted_data
post
int0Set 1 when values for this custom field should be treated as encrypted/sensitive.
options
post
json/list["Small","Medium","Large"]Options for select/radio/checkbox fields. options_en and options_he are also accepted.
folder_id
post
int1For fixed/regular fields, add the field to this folder field list.
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.
pinned_field_on_dashboard
post
json["phone"]For folder-specific pinned dashboard fields, send folder_id and the full pinned list.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Fields.Add",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "field_kind": "custom",
        "label": "Budget",
        "type": "number",
        "required": "0",
        "show_hide": "1"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Fields.Add",
    "url_domain": "https:\/\/{domain}\/app\/Fields.Add"
}

Endpoint

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

Sample Output

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

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ field_kind: 'custom', label: 'Budget', type: 'number', required: '0', show_hide: '1' });
const res = await fetch('/app/Fields.Add', { 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: label"
}