> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# supportTicketsUpdate

> Change many tickets at once, as the help desk's bulk actions do, and return the run, which is QUEUED with every ticket PENDING. The tickets update in the background, each as a single update would: its timeline records the change as the API's, rules run, snoozes are scheduled, and a connected mailbox gets the change. Nothing is sent to the customer. One ticket that fails doesn't stop the rest; its result says why. Ids the store has no visible ticket for are skipped, and a repeated id counts once. Poll supportTicketsUpdateRun, or node(id:), for progress. supportTicket reflects a ticket once it's updated; list filters and search catch up shortly after. Takes 1 to 500 ids. Throws BAD_USER_INPUT for no ids or too many, no change or more than one, a tag or team member that isn't the store's, or ids none of which is a ticket of the store, and nothing starts. Throws IDEMPOTENCY_KEY_REUSED or CONFLICT as idempotencyKey describes. Throws TRY_AGAIN (503) when the run couldn't be started: retry it with the same idempotencyKey.

**Required scopes:** [`support_tickets_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_write)

## Arguments

**idempotencyKey** `String`

A key you choose, up to 100 characters, that makes a retry safe. For 24 hours, repeating the request with the same key returns the first result and writes nothing; that result is null if it has since been deleted or hidden. The same key with a different request throws IDEMPOTENCY\_KEY\_REUSED (422): repeat the first request exactly, or use a new key. While the first request is still running, a repeat throws CONFLICT (409): retry with the same key in a moment. A request that fails without writing frees its key, so a retry runs it again. Each mutation has its own keys.

**ids** `[ID!]!` *required*

The tickets to change, 1 to 500.

**input** `[SupportTicketsUpdateInput!](/docs/api-reference/v3/reference/support/support-tickets-update-input)` *required*

The change.

**fields**

**addTagIds** `[ID!]`

SupportTag ids of the store's to add, 1 to 50. Each ticket keeps its other tags.

**assignee** `[SupportTicketAssigneeInput](/docs/api-reference/v3/reference/support/support-ticket-assignee-input)`

A team member on the store's team, or UNASSIGNED. AI\_AGENT is rejected.

**fields**

**teamMemberId** `ID`

A TeamMember id. Required with TEAM\_MEMBER, rejected otherwise. They must be on the store's team.

**type** `[SupportTicketAssigneeTarget!](/docs/api-reference/v3/reference/support/support-ticket-assignee-target)` *required*

Who the ticket goes to.

**read** `Boolean`

True marks each ticket read, false unread. Read state belongs to the ticket, shared by the whole team. Without `readBy` no reader is recorded, so rules that run when a ticket is read don't run.

**readBy** `ID`

The TeamMember who read the tickets. With `read: true`, each read is recorded as theirs, as in supportTicketUpdate: the timeline shows it, rules that run when a ticket is read run, and open inboxes update. Only with `read: true`. Must be on the store's team: anyone else, or a malformed id, fails with BAD\_USER\_INPUT and nothing starts.

**removeTagIds** `[ID!]`

SupportTag ids of the store's to remove, 1 to 50.

**snooze** `[SupportTicketSnoozeDuration](/docs/api-reference/v3/reference/support/support-ticket-snooze-duration)`

Snooze each ticket for this long from when it's updated, as the help desk's snooze options do.

**status** `[SupportTicketStatus](/docs/api-reference/v3/reference/support/support-ticket-status)`

OPEN, IN\_PROGRESS, CLOSED or ARCHIVED. SNOOZED and DRAFT are rejected; use snooze to snooze.

## Returns

**supportTicketsUpdate** `[SupportTicketsUpdateRun!](/docs/api-reference/v3/reference/support/support-tickets-update-run)` *required*

A bulk ticket update running in the background, as the help desk's bulk actions run. A job: `status` is QUEUED until the first ticket starts, then RUNNING, then SUCCEEDED when at least one ticket was updated or FAILED when none was or the run stopped. A ticket that failed doesn't fail the run; see `results`.

**fields**

**action** `[SupportTicketsUpdateAction!](/docs/api-reference/v3/reference/support/support-tickets-update-action)` *required*

The change the run makes.

**counts** `[SupportTicketsUpdateCounts!](/docs/api-reference/v3/reference/support/support-tickets-update-counts)` *required*

How many tickets ended each way so far.

**fields**

**failed** `Int!` *required*

The tickets that couldn't be updated.

**ok** `Int!` *required*

The tickets updated so far.

**total** `Int!` *required*

The tickets the run updates: the store's tickets among the ids, each once.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the run started.

**error** `[JobError](/docs/api-reference/v3/reference/common/job-error)`

Why the run failed: `NO_TICKET_UPDATED` when every ticket failed, or `RUN_STOPPED` when the run stopped early. Null otherwise.

**fields**

**code** `String!` *required*

A stable code in SCREAMING\_SNAKE\_CASE. Branch on it, not on `message`.

**message** `String!` *required*

What went wrong, in words.

**finishedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the run finished. Null while it is going.

**id** `ID!` *required*

Read the run again with supportTicketsUpdateRun.

**results** `[\[SupportTicketsUpdateResult!\]!](/docs/api-reference/v3/reference/support/support-tickets-update-result)` *required*

One result per ticket, in the order of the ids. At most 500.

**fields**

**code** `String`

Why the ticket wasn't updated: `NOT_FOUND` when the API doesn't show it any more, or `UPDATE_FAILED`. Null otherwise.

**message** `String`

The same, in words.

**status** `[SupportTicketsUpdateResultStatus!](/docs/api-reference/v3/reference/support/support-tickets-update-result-status)` *required*

What the run did to this ticket.

**ticket** `[SupportTicket](/docs/api-reference/v3/reference/support/support-ticket)`

The ticket. Null when the store no longer has it, such as one deleted after the run started. Needs support\_tickets\_read.

**fields**

**aiDraftReplies** `[SupportAiDraftReplyConnection!](/docs/api-reference/v3/pagination)` *required*

The AI drafts waiting for review on the ticket, oldest first: the suggestions the help desk composer shows, at most one per message they answer. Decided drafts leave the list. Drafts of tickets merged into this one stay on those tickets, as their messages do.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns AI drafts after it.

**before** `String`

Backward pagination cursor — returns AI drafts before it.

**first** `Int`

Forward pagination: returns the first N AI drafts (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N AI drafts (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**assignee** `[TeamMember](/docs/api-reference/v3/reference/common/team-member)`

The team member the ticket is assigned to. Null unless `assigneeType` is TEAM\_MEMBER, and null when they've left the team.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**assigneeType** `[SupportTicketAssigneeType](/docs/api-reference/v3/reference/support/support-ticket-assignee-type)`

What kind of assignee the ticket has. Null when unassigned.

**channels** `[\[MessageChannel!\]!](/docs/api-reference/v3/reference/support/message-channel)` *required*

Every channel the ticket's threads are on, each once, in no set order. Detached threads are left out, as in `threads`.

**closureReason** `[SupportTicketClosureReason](/docs/api-reference/v3/reference/support/support-ticket-closure-reason)`

Why the ticket was closed. Null unless `status` is CLOSED.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the ticket was created.

**customer** `[Customer](/docs/api-reference/v3/reference/customers/customer)`

The customer the ticket is with: the primary contact on its most recently added thread that has one. Detached and deleted threads are left out, as in `threads`. Null when no thread has one.

**Requires:** [`customers_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-customers_read)

**customerSentiment** `[SupportTicketCustomerSentiment](/docs/api-reference/v3/reference/support/support-ticket-customer-sentiment)`

How the customer seems to feel, from the AI's read of the ticket. Null until it has one.

**draftPreview** `String`

The text of the team's most recently edited unsent reply, on any of the ticket's threads. Null when there's no draft.

**id** `ID!` *required*

The id of this ticket.

**lastCustomerMessageAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the customer last wrote. Null if they haven't written yet.

**lastMerchantMessageAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the team, the AI agent or an automation last wrote to the customer. Null if none has.

**lastMessage** `[Message](/docs/api-reference/v3/reference/support/message)`

The ticket's newest message with text, internal notes included. It skips the messages the ticket's `messages` list leaves out. Null when it has none.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**mergedInto** `[SupportTicket](/docs/api-reference/v3/reference/support/support-ticket)`

The ticket this one was merged into. Null unless it was merged, which also closes it as DUPLICATE.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**mergedTickets** `[SupportTicketConnection!](/docs/api-reference/v3/pagination)` *required*

The tickets merged directly into this one, oldest first.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns tickets after it.

**before** `String`

Backward pagination cursor — returns tickets before it.

**first** `Int`

Forward pagination: returns the first N tickets (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N tickets (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**messages** `[MessageConnection!](/docs/api-reference/v3/pagination)` *required*

The ticket's messages, oldest first, internal notes included. Messages of tickets merged into it stay on those tickets. A thread can hold messages from other tickets, which this leaves out; `thread.messages` has them all.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns messages after it.

**before** `String`

Backward pagination cursor — returns messages before it.

**first** `Int`

Forward pagination: returns the first N messages (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N messages (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**priority** `[SupportTicketPriority!](/docs/api-reference/v3/reference/support/support-ticket-priority)` *required*

How urgent the ticket is.

**readAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the team last read the ticket. Null if no one has opened it.

**senderBlocked** `Boolean`

Whether the ticket's sender is on the store's blocked-sender list (`SupportBlockedSendersSettings.blockedEmails`), as the help desk shows it, whether or not the rule that archives their email is on. The sender is the customer the help desk uses for the ticket: the primary contact on its most recently linked thread, detached and deleted threads included, so it can differ from `customer`, which leaves those out. Their email is matched ignoring case and surrounding spaces. False when no thread has a primary contact or the contact has no email. Null, with an error, when the customer can't be looked up. A request checks its tickets 100 at a time, for 10 points each time.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**snoozedUntil** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the ticket reopens on its own. Null unless `status` is SNOOZED.

**status** `[SupportTicketStatus!](/docs/api-reference/v3/reference/support/support-ticket-status)` *required*

Where the ticket is in its lifecycle.

**statusUpdatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When `status` last changed.

**summary** `String`

The AI's summary of the ticket. Null until one has been written.

**tags** `[SupportTagConnection!](/docs/api-reference/v3/pagination)` *required*

The tags on the ticket, ordered by name.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns tags after it.

**before** `String`

Backward pagination cursor — returns tags before it.

**first** `Int`

Forward pagination: returns the first N tags (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N tags (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**threads** `[MessageThreadConnection!](/docs/api-reference/v3/pagination)` *required*

The threads the ticket's conversation is on, oldest first.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns threads after it.

**before** `String`

Backward pagination cursor — returns threads before it.

**first** `Int`

Forward pagination: returns the first N threads (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N threads (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**ticketNumber** `Int`

The ticket number the help desk shows, unique within the store. Null for some older tickets.

**timeline** `[SupportTicketEventConnection!](/docs/api-reference/v3/pagination)` *required*

What happened on the ticket, oldest first.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns events after it.

**before** `String`

Backward pagination cursor — returns events before it.

**first** `Int`

Forward pagination: returns the first N events (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N events (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**topics** `[\[SupportTopic!\]!](/docs/api-reference/v3/reference/support/support-topic)` *required*

The store's topics the classifier matched to the ticket, ordered by name. The classifier matches at most 10. It lists the classifier's last result, which the help desk's topic rules also read, so it can lag the newest messages until the ticket is classified again. A topic deleted since is left out, and a ticket the classifier hasn't matched has none. Costs a flat 5 points per ticket plus the topic fields selected, however many topics it has.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**unread** `Boolean!` *required*

Whether the customer wrote after the team last read the ticket. False when the customer hasn't written.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the ticket last changed.

**status** `[JobStatus!](/docs/api-reference/v3/reference/common/job-status)` *required*

Where the run is.

## Errors

Besides the [errors any request can return](https://developers.redo.com/docs/api-reference/v3/errors.md), this operation fails with these codes in `extensions.code`.

| Code | HTTP status | Meaning | Retry |
| - | - | - | - |
| `API_TOKEN_REQUIRED` | `403` | The credential has no API token to attribute the change to, such as a first-party token. Nothing was sent. | Call with a store API token. |
| `BAD_USER_INPUT` | `400` | An argument is invalid, or names something the store doesn't have. The message says which. Nothing was written. | Fix the input the message names, then send it again. |
| `CONFLICT` | `409` | The change clashes with another record, such as a name already in use, and nothing was written. Or a request with the same idempotencyKey is still in progress or its outcome isn't known yet, and its write, such as an email to the customer, may already exist. | Change the clashing value, then send it again. When the message says a request with the same idempotencyKey is still in progress, wait a few seconds and send it again with the same key, which returns that request's result once it settles. Don't resend it with a new key or without one: it may write twice. |
| `IDEMPOTENCY_KEY_REUSED` | `422` | The idempotencyKey was already used for a different request. Nothing was written. | Send the new request with a new idempotencyKey, or resend the first request unchanged to get its result. |
| `TRY_AGAIN` | `503` | The change couldn't start for a passing reason, and nothing was written or sent. | Send the same request again after a short wait, with the same idempotencyKey if it has one. |
| `INTERNAL_SERVER_ERROR` | `500` | Something failed on Redo's side. The change may or may not have been made. | Read the record to see whether the change was made before sending it again. A send with an idempotencyKey is safe to retry with the same key. |

## Example

```graphql theme={null}
mutation {
  supportTicketsUpdate(idempotencyKey: "...", ids: "...", input: { ... }) {
    action
    createdAt
    finishedAt
    id
    status
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.