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
| Name | Type | Sample | Explanation |
|---|---|---|---|
typepost | string | text | Field type from the dashboard dropdown. |
name_enpost | string | ORDER_ID | English label. Alias: en. |
name_hepost | string | ORDER_ID | Hebrew label. Alias: he. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
show_hidepost | int | 1 | 1 show, 0 hide. Default 1. Alias: visible. |
requirepost | int | 0 | 1 required. Alias: required. |
positionpost | int | 4 | Sort position. Default max+1. |
option_enpost | array|string | waterSoftener,other | Select English option labels. |
option_hepost | array|string | waterSoftener,other | Select Hebrew option labels. |
option_valuepost | array|string | waterSoftener,other | Select stored values. |
multiplepost | int | 0 | Select: 1 allows multi-select. |
grp_name_enpost | string | Billing | Optional group English name (Create group). |
grp_name_hepost | string | Billing | Optional group Hebrew name. |
dependency_ticketpost | int | 0 | 1 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.AddSample 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"
}