POST

Ticket.AutomationAdd

Alias of Ticket.AutomationSave create mode (omit id). Same parameters as Ticket.AutomationSave. Requires manager permission.

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.AutomationAdd 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

  • Prefer Ticket.AutomationSave docs for the full parameter list.
  • Omit id to create a new ticket_automation rule.
  • Send email: email_to_team / email_user_ids = staff notify; email_to_customer + email_template_id = customer mail template (0 = default). See Ticket.AutomationSave.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
title
post
stringFollow up unassignedRule title.
after_minutes
post
int15Delay minutes (min 1, default 15).
condition_type
post
stringnot_assignednot_assigned or in_status.
condition_statuses
post
array|string1,3Status ids when condition_type=in_status.
action_send_email
post
int1Enable email action (0/1).
email_to_team
post
int1Email team / staff notify (0/1).
email_to_customer
post
int0Email customer (0/1).
email_user_ids
post
array|string47Specific email user ids (staff).
email_template_id
post
int0Customer email template id (email_template.id). 0 = default. Alias: customer_email_template_id.
action_create_mission
post
int0Enable mission action (0/1).
mission_text
post
stringFollow upMission text (or use mission_config).
action_row_color
post
int0Enable row color (0/1).
row_color
post
string#ffe8ccRow color hex.
is_active
post
int1Active flag (0/1).

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Ticket.AutomationAdd",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "title": "Follow up unassigned",
        "after_minutes": "15",
        "condition_type": "not_assigned",
        "action_send_email": "1",
        "email_to_customer": "1",
        "email_template_id": "42"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Ticket.AutomationAdd",
    "url_domain": "https:\/\/{domain}\/app\/Ticket.AutomationAdd"
}

Endpoint

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

Sample Output

{
    "success": 1,
    "message": "Success",
    "id": 3
}

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ title: 'Follow up unassigned', after_minutes: '15', condition_type: 'not_assigned', action_send_email: '1', email_to_customer: '1', email_template_id: '42' });
const res = await fetch('/app/Ticket.AutomationAdd', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());

Error Example

{
    "success": 0,
    "message": "Permission denied to manage ticket automation"
}