POST

Ticket.DepartmentAdd

Create a ticket department (name + optional team members), same as dashboard add_ticket_department_form when ticket_department_id is empty.

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

  • Runs the Ticket.DepartmentAdd function and returns JSON.

Push Service

No push is sent because this function only reads data or returns helper information.

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.

Required Parameters

NameTypeSampleExplanation
name
post
stringtest new department 12Department name. Aliases: department_name, title.

Optional Parameters

NameTypeSampleWhat it gives
team_member_id
post
array|string14,47Team member ids assigned to this department. Aliases: team_members_id, team_member_ids. Send JSON array or comma-separated ids.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Ticket.DepartmentAdd",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "name": "test new department 12",
        "team_member_id": "14,47"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Ticket.DepartmentAdd",
    "url_domain": "https:\/\/{domain}\/app\/Ticket.DepartmentAdd"
}

Endpoint

POST /app/Ticket.DepartmentAdd
POST https://{user}.bull36.com/app/Ticket.DepartmentAdd
POST https://{domain}/app/Ticket.DepartmentAdd

Sample Output

{
    "success": 1,
    "message": "Success",
    "department_id": 12,
    "data": {
        "id": 12,
        "name": "test new department 12"
    }
}

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('name', 'test new department 12');
body.set('team_member_id', '14,47');
const res = await fetch('/app/Ticket.DepartmentAdd', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());

Error Example

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