POST

Statuses.Add

Create an all_status row (ticket, internal_status, customer_status per folder, etc.). For the settings Customer Statuses modal use CustomerStatuses.Add.

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 Statuses record or sends the requested data after validation.

Push Service

Pushes event statuses.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
name_en
post
stringPendingEnglish status label.
name_he
post
stringממתיןHebrew status label.
type
post
stringticketall_status bucket: ticket, internal_status, customer_status, sources, internal_sub_status.

Optional Parameters

NameTypeSampleWhat it gives
color
post
string#2490efOptional status color.
status_order
post
int1Optional sort order.
folder_id
post
int1Folder id for folder-linked status types.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Statuses.Add",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "name_he": "ממתין",
        "name_en": "Pending",
        "type": "ticket"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Statuses.Add",
    "url_domain": "https:\/\/{domain}\/app\/Statuses.Add"
}

Endpoint

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

Sample Output

{
    "success": 1,
    "message": "Statuses.Add created",
    "id": "123",
    "socket_event": "statuses.add.created"
}

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ name_he: 'ממתין', name_en: 'Pending', type: 'ticket' });
const res = await fetch('/app/Statuses.Add', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());

Error Example

{
    "success": 0,
    "message": "Missing required parameter: type"
}