انتقل إلى المحتوى الرئيسي

Change the status of many tickets

POST 

/v1/agents/:agentId/tickets/change-status

x-scope: "tickets:write"
x-rate-limit-per-minute: 10

Changes every ticket that matches the filters to new_status. There is no undo. The filters are listTickets' own and combine the same way, so listTickets with the same query lists the tickets this takes (those already in new_status are left alone and not counted). status is required, so a call always names the statuses it takes tickets from (422 invalid_request_body without it); limit and cursor aren't taken (422 invalid_request_body). Each ticket that changes gets a status-change note on its contact's timeline, as updateTicket writes, and a new last_activity_at; a closing status (an option with final: true in listTicketFields, such as resolved) sets its resolved_at. Nobody is assigned. dry_run is required: send dry_run: true first, which returns how many tickets would change and changes nothing. A changed of 0 means there is nothing to change: don't send the real call. Otherwise send the same query with dry_run: false and that number as max_changes: if more would change by then, nothing changes (409 too_many_tickets); send a dry run again and confirm the new number. Tickets change in batches of 1,000, so if a call fails part way, the tickets already changed stay changed: send a dry run again to see how many are left, then the call with that number. Admin rank on the agent, as in the dashboard.

Request​

Responses​

How many tickets changed, or would change on a dry run.

Response Headers
    X-Correlation-ID

    Correlation id for this request — paste into support tickets.