POST

Fields.Remove

Remove a customer field setting. Same storage as dashboard Settings → Custom fields. For custom fields, removes the definition (including nested under type=group) and extra_fields_order entry; keeps historical customer values by default. To also delete stored values, send remove_customer_values=1 and confirm_remove_values=1. For fixed/regular fields, hides/removes from folder/dashboard settings only.

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

Action

  • Removes the requested Fields record when the user has permission.

Push Service

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

Required Parameters

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

Optional Parameters

NameTypeSampleWhat it gives
field_kind
post
stringcustomcustom removes a custom field definition. fixed, regular, or common removes settings for an existing fixed field. Defaults to custom.
field_key
post
stringphoneFixed/regular customer field key when field_kind=fixed.
folder_id
post
int1For fixed/regular fields, remove from this folder field list.
remove_customer_values
post
int0Custom fields only. Set 1 to also remove this key from contact extra_fields. Requires confirm_remove_values=1.
confirm_remove_values
post
int0Safety confirmation before deleting stored customer custom-field values.

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

Endpoint

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

Sample Output

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

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ field_name: 'a-1710000000' });
const res = await fetch('/app/Fields.Remove', { 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"
}