Update Many Triggers

PUT {{baseUrl}}/api/v2/triggers/update_many

Updates the position or the active status of multiple triggers. Any additional properties are ignored.

Allowed For

  • Agents

Request Parameters

The PUT request expects a triggers object that lists the triggers to update.

Each trigger may have the following properties:

NameMandatoryDescription
idyesThe ID of the trigger to update
positionnoThe new position of the trigger
activenoThe active status of the trigger (true or false)
category_idnoThe ID of the new category the trigger is to be moved to

Example Request

{
  "triggers": [
    {"id": 25, "position": 3},
    {"id": 23, "position": 5},
    {"id": 27, "position": 9},
    {"id": 22, "position": 7}
  ]
}

Request Body

{"triggers"=>[{"id"=>"<integer>", "active"=>"<boolean>", "category_id"=>"<string>", "position"=>"<integer>"}, {"id"=>"<integer>", "active"=>"<boolean>", "category_id"=>"<string>", "position"=>"<integer>"}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;count&quot;:2,&quot;next_page&quot;:null,&quot;previous_page&quot;:null,&quot;triggers&quot;:[{&quot;actions&quot;:[],&quot;active&quot;:true,&quot;conditions&quot;:{},&quot;created_at&quot;:&quot;2012-09-25T22:50:26Z&quot;,&quot;description&quot;:&quot;Close and save a ticket&quot;,&quot;id&quot;:25,&quot;position&quot;:8,&quot;raw_title&quot;:&quot;Close and Save&quot;,&quot;title&quot;:&quot;Close and Save&quot;,&quot;updated_at&quot;:&quot;2012-09-25T22:50:26Z&quot;,&quot;url&quot;:&quot;http://{subdomain}.zendesk.com/api/v2/triggers/25.json&quot;},{&quot;actions&quot;:[],&quot;active&quot;:false,&quot;conditions&quot;:{&quot;all&quot;:[{&quot;field&quot;:&quot;status&quot;,&quot;operator&quot;:&quot;less_than&quot;,&quot;value&quot;:&quot;solved&quot;},{&quot;field&quot;:&quot;assignee_id&quot;,&quot;operator&quot;:&quot;is&quot;,&quot;value&quot;:&quot;296220096&quot;}],&quot;any&quot;:[{&quot;field&quot;:&quot;status&quot;,&quot;operator&quot;:&quot;less_than&quot;,&quot;value&quot;:&quot;solved&quot;},{&quot;field&quot;:&quot;custom_status_id&quot;,&quot;operator&quot;:&quot;includes&quot;,&quot;value&quot;:[&quot;1&quot;,&quot;2&quot;]}]},&quot;created_at&quot;:&quot;2012-09-25T22:50:26Z&quot;,&quot;description&quot;:&quot;Assign a ticket with a priority tag&quot;,&quot;id&quot;:26,&quot;position&quot;:9,&quot;raw_title&quot;:&quot;{{dc.assign_priority_tag}}&quot;,&quot;title&quot;:&quot;Assign priority tag&quot;,&quot;updated_at&quot;:&quot;2012-09-25T22:50:26Z&quot;,&quot;url&quot;:&quot;http://{subdomain}.zendesk.com/api/v2/triggers/26.json&quot;}]}