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:
Name | Mandatory | Description |
---|---|---|
id | yes | The ID of the trigger to update |
position | no | The new position of the trigger |
active | no | The active status of the trigger (true or false) |
category_id | no | The 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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"count":2,"next_page":null,"previous_page":null,"triggers":[{"actions":[],"active":true,"conditions":{},"created_at":"2012-09-25T22:50:26Z","description":"Close and save a ticket","id":25,"position":8,"raw_title":"Close and Save","title":"Close and Save","updated_at":"2012-09-25T22:50:26Z","url":"http://{subdomain}.zendesk.com/api/v2/triggers/25.json"},{"actions":[],"active":false,"conditions":{"all":[{"field":"status","operator":"less_than","value":"solved"},{"field":"assignee_id","operator":"is","value":"296220096"}],"any":[{"field":"status","operator":"less_than","value":"solved"},{"field":"custom_status_id","operator":"includes","value":["1","2"]}]},"created_at":"2012-09-25T22:50:26Z","description":"Assign a ticket with a priority tag","id":26,"position":9,"raw_title":"{{dc.assign_priority_tag}}","title":"Assign priority tag","updated_at":"2012-09-25T22:50:26Z","url":"http://{subdomain}.zendesk.com/api/v2/triggers/26.json"}]}