POST

TicketCustomFields.Add

Create a ticket custom field definition (same as Save on Ticket Custom Filed). Stored in user_detail.ticket_extra_fields. New fields get name a-{unix timestamp}. Requires owner or member-admin. Does not change existing Ticket.Add/Edit value storage.

Permissions

  • User must be logged in with a valid bearer token.
  • Returned or changed records are limited by the user permissions, team access, folder access, and account settings.

Action

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

Push Service

Pushes event ticketcustomfields.created to users who should see this change.

Automation

No automation is run for this function.

Special Instructions

  • Required like the dashboard form: type, name_en, name_he.
  • Types: text, tel, email, number, radio (yes/no), radio_custom, checkbox, select, textarea. Optional date is accepted if already used in saved JSON.
  • select: send option_en / option_he / option_value (arrays or comma lists) and optional coloroption, multiple=1.
  • radio: yes_name_en, yes_name_he, no_name_en, no_name_he, yes_val, no_val, default_yes_no (yes|no|without_value).
  • radio_custom: radio_en[], radio_he[], radio_value[]. checkbox: checkbox_en[], checkbox_he[], checkbox_value[].
  • show_hide 1=show 0=hide. require 1=required. dependency_ticket=1 plus dependency_field_ticket and dependency_field_value_ticket.
  • To put the field in a group, send grp_name_he and grp_name_en (creates or appends to that group). Group storage name is ga-{unix}.
  • Use the returned name (a-...) as the key on Ticket.Add / Ticket.Edit.

Required Parameters

NameTypeSampleExplanation
type
post
stringtextField type from the dashboard dropdown.
name_en
post
stringORDER_IDEnglish label. Alias: en.
name_he
post
stringORDER_IDHebrew label. Alias: he.

Optional Parameters

NameTypeSampleWhat it gives
show_hide
post
int11 show, 0 hide. Default 1. Alias: visible.
require
post
int01 required. Alias: required.
position
post
int4Sort position. Default max+1.
option_en
post
array|stringwaterSoftener,otherSelect English option labels.
option_he
post
array|stringwaterSoftener,otherSelect Hebrew option labels.
option_value
post
array|stringwaterSoftener,otherSelect stored values.
multiple
post
int0Select: 1 allows multi-select.
grp_name_en
post
stringBillingOptional group English name (Create group).
grp_name_he
post
stringBillingOptional group Hebrew name.
dependency_ticket
post
int01 to enable dependency. Then send dependency_field_ticket + dependency_field_value_ticket.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/TicketCustomFields.Add",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "type": "text",
        "name_en": "ORDER_ID",
        "name_he": "ORDER_ID",
        "show_hide": "1",
        "require": "0"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/TicketCustomFields.Add",
    "url_domain": "https:\/\/{domain}\/app\/TicketCustomFields.Add"
}

Endpoint

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

Sample Output

{
    "success": 1,
    "message": "Your Custom field",
    "name": "a-1731562297",
    "socket_event": "ticketcustomfields.created",
    "data": {
        "name": "a-1731562297",
        "type": "text",
        "en": "ORDER_ID",
        "he": "ORDER_ID"
    }
}

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ type: 'text', name_en: 'ORDER_ID', name_he: 'ORDER_ID', show_hide: '1' });
const res = await fetch('/app/TicketCustomFields.Add', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());

Error Example

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