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
| Name | Type | Sample | What it gives |
|---|---|---|---|
titlepost | string | Follow up unassigned | Rule title. |
after_minutespost | int | 15 | Delay minutes (min 1, default 15). |
condition_typepost | string | not_assigned | not_assigned or in_status. |
condition_statusespost | array|string | 1,3 | Status ids when condition_type=in_status. |
action_send_emailpost | int | 1 | Enable email action (0/1). |
email_to_teampost | int | 1 | Email team / staff notify (0/1). |
email_to_customerpost | int | 0 | Email customer (0/1). |
email_user_idspost | array|string | 47 | Specific email user ids (staff). |
email_template_idpost | int | 0 | Customer email template id (email_template.id). 0 = default. Alias: customer_email_template_id. |
action_create_missionpost | int | 0 | Enable mission action (0/1). |
mission_textpost | string | Follow up | Mission text (or use mission_config). |
action_row_colorpost | int | 0 | Enable row color (0/1). |
row_colorpost | string | #ffe8cc | Row color hex. |
is_activepost | int | 1 | Active 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.AutomationAddSample 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"
}