> ## 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.

# supportTicketHandOffFromAi

> Take a ticket from the AI agent and give it to the team, as the help desk's hand-off does: the AI agent stops working the ticket, which reopens, gets the store's AI_NEEDS_HELP tag, is unassigned, and gets the handoff note and the AI-to-team handoff event on its timeline. A chat widget ticket is handed off as the AI agent's own hand-off does it: the shopper's chat converts to live chat or email by the store's widget settings, and when those ask for the shopper's email first and the ticket has none, the shopper is asked for it and the AI agent keeps the ticket until they give it. As in the help desk, only a ticket the AI agent is assigned, and that isn't merged into another, can be handed off; any other fails with ACTION_REJECTED and changes nothing. Returns null if the store has no such ticket. Throws IDEMPOTENCY_KEY_REUSED or CONFLICT as idempotencyKey describes.

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

## Arguments

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

The id of the ticket to take from the AI agent.

**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.

## Returns

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

A customer conversation the team handles in the help desk, which can span several channels.

**fields**

**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)

**fields**

**email** `String`

Email address. Null when the user has none.

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

m\_us\_… id, the same id the app and MCP tools use.

**name** `String`

Display name. Null when the user hasn't set one.

**supportShiftStatus** `[SupportShiftStatus!](/docs/api-reference/v3/reference/support/support-shift-status)` *required*

The agent's live shift status, worked out when the request runs.

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

**fields**

**manualOverride** `[SupportShiftOverride](/docs/api-reference/v3/reference/support/support-shift-override)`

The agent's manual on/off toggle. Null when they follow their schedule.

**nextChange** `[SupportShiftChange!](/docs/api-reference/v3/reference/support/support-shift-change)` *required*

The next time the schedule alone flips onShift. Ignores any manual override. Always in the future, or the next local midnight when nothing changes within 14 days.

**onShift** `Boolean!` *required*

True when auto-assignment can give the agent tickets now.

**reason** `[SupportShiftStatusReason!](/docs/api-reference/v3/reference/support/support-shift-status-reason)` *required*

Which layer decided onShift.

**supportWorkSchedule** `[SupportWorkSchedule!](/docs/api-reference/v3/reference/support/support-work-schedule)` *required*

The agent's support working hours. An agent with no saved schedule returns enabled false.

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

**fields**

**assignableChannels** `[\[SupportChannel!\]](/docs/api-reference/v3/reference/support/support-channel)`

Channels the agent takes auto-assigned tickets on. Null means every channel.

**dateOverrides** `[\[SupportWorkScheduleDateOverride!\]!](/docs/api-reference/v3/reference/support/support-work-schedule-date-override)` *required*

Dates whose hours replace that day's weekly hours, earliest first.

**enabled** `Boolean!` *required*

Whether the schedule is on. When false, the agent counts as on shift at all times.

**timeZone** `String!` *required*

IANA time zone the hours are in, such as America/New\_York. The store's time zone when the agent has never saved a schedule.

**weeklyHours** `[\[SupportWorkScheduleDay!\]!](/docs/api-reference/v3/reference/support/support-work-schedule-day)` *required*

Recurring hours. Always seven entries, Monday through Sunday.

**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)

**fields**

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

When the customer record was created.

**customFields** `[JSON](/docs/api-reference/v3/reference/common/json)`

Merchant-defined custom field values, keyed by each field's name. Null when the customer has no custom fields set.

**email** `String`

The customer's primary email address.

**firstName** `String`

The customer's first name.

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

The id of this customer.

**lastName** `String`

The customer's last name.

**legacyId** `String!` *required*

The customer's legacy identifier (the source Mongo ObjectId), accepted anywhere an `id` is.

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

The customer's current location, if known.

**fields**

**city** `String`

The city, town, or village.

**country** `String`

The country name.

**countryCode** `String`

The country code.

**ianaTimeZoneName** `String`

The IANA time zone name for the location (e.g. America/New\_York).

**latitude** `Float`

The latitude of the location, if geocoded.

**longitude** `Float`

The longitude of the location, if geocoded.

**postalCode** `String`

The postal or ZIP code.

**state** `String`

The state, province, or region name.

**stateCode** `String`

The state, province, or region code.

**street1** `String`

The first line of the street address.

**street2** `String`

The second line of the street address.

**phoneNumber** `String`

The customer's primary phone number.

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

The help desk tickets this customer is the primary contact on any thread of, newest first. Every ticket whose `customer` is this customer is here.

**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`.

**Fields**

**edges** `[\[SupportTicketEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[SupportTicket!\]!](/docs/api-reference/v3/reference/support/support-ticket)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

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

The tags on this customer, from the store's customer tag catalog, A–Z by name.

**Requires:** [`customers_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-customers_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`.

**Fields**

**edges** `[\[CustomerTagEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[CustomerTag!\]!](/docs/api-reference/v3/reference/marketing/customer-tag)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

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

When the customer record was last updated.

**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)

**fields**

**authorType** `[MessageAuthorType!](/docs/api-reference/v3/reference/support/message-author-type)` *required*

Who wrote the message.

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

The channel the message is on.

**content** `String`

The message as plain text. Null for a message with no text, such as an image.

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

The customer who wrote it. Null unless `authorType` is CUSTOMER, and null when their record was deleted.

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

**fields**

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

When the customer record was created.

**customFields** `[JSON](/docs/api-reference/v3/reference/common/json)`

Merchant-defined custom field values, keyed by each field's name. Null when the customer has no custom fields set.

**email** `String`

The customer's primary email address.

**firstName** `String`

The customer's first name.

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

The id of this customer.

**lastName** `String`

The customer's last name.

**legacyId** `String!` *required*

The customer's legacy identifier (the source Mongo ObjectId), accepted anywhere an `id` is.

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

The customer's current location, if known.

**phoneNumber** `String`

The customer's primary phone number.

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

The help desk tickets this customer is the primary contact on any thread of, newest first. Every ticket whose `customer` is this customer is here.

**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`.

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

The tags on this customer, from the store's customer tag catalog, A–Z by name.

**Requires:** [`customers_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-customers_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`.

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

When the customer record was last updated.

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

The id of this message.

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

The message this one replies to. Null when it isn't a reply, or that message is hidden.

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

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

When the message was sent or received.

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

The team member who wrote it. Null unless `authorType` 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)

**fields**

**email** `String`

Email address. Null when the user has none.

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

m\_us\_… id, the same id the app and MCP tools use.

**name** `String`

Display name. Null when the user hasn't set one.

**supportShiftStatus** `[SupportShiftStatus!](/docs/api-reference/v3/reference/support/support-shift-status)` *required*

The agent's live shift status, worked out when the request runs.

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

**supportWorkSchedule** `[SupportWorkSchedule!](/docs/api-reference/v3/reference/support/support-work-schedule)` *required*

The agent's support working hours. An agent with no saved schedule returns enabled false.

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

**thread** `[MessageThread](/docs/api-reference/v3/reference/support/message-thread)`

The thread the message is on. Null when the thread is on a channel the API doesn't expose.

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

**fields**

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

The channel the thread is on.

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

When the thread started.

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

The id of this thread.

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

Every message on the thread, oldest first, including internal notes. A thread can span several tickets, so this can hold messages no one ticket has.

**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`.

**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`.

**Fields**

**edges** `[\[SupportTicketEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

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

The item at this edge.

**nodes** `[\[SupportTicket!\]!](/docs/api-reference/v3/reference/support/support-ticket)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**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`.

**Fields**

**edges** `[\[MessageEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[Message!](/docs/api-reference/v3/reference/support/message)` *required*

The item at this edge.

**nodes** `[\[Message!\]!](/docs/api-reference/v3/reference/support/message)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**authorType** `[MessageAuthorType!](/docs/api-reference/v3/reference/support/message-author-type)` *required*

Who wrote the message.

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

The channel the message is on.

**content** `String`

The message as plain text. Null for a message with no text, such as an image.

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

The customer who wrote it. Null unless `authorType` is CUSTOMER, and null when their record was deleted.

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

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

The id of this message.

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

The message this one replies to. Null when it isn't a reply, or that message is hidden.

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

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

When the message was sent or received.

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

The team member who wrote it. Null unless `authorType` 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)

**thread** `[MessageThread](/docs/api-reference/v3/reference/support/message-thread)`

The thread the message is on. Null when the thread is on a channel the API doesn't expose.

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

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**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`.

**Fields**

**edges** `[\[SupportTagEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[SupportTag!](/docs/api-reference/v3/reference/support/support-tag)` *required*

The item at this edge.

**nodes** `[\[SupportTag!\]!](/docs/api-reference/v3/reference/support/support-tag)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**group** `[SupportTagGroup!](/docs/api-reference/v3/reference/support/support-tag-group)` *required*

The group this tag belongs to.

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

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

The id of this tag (ctag\_…), the same id the app and the MCP tools use.

**name** `String!` *required*

Tag name, unique within its group.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**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`.

**Fields**

**edges** `[\[MessageThreadEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[MessageThread!](/docs/api-reference/v3/reference/support/message-thread)` *required*

The item at this edge.

**nodes** `[\[MessageThread!\]!](/docs/api-reference/v3/reference/support/message-thread)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

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

The channel the thread is on.

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

When the thread started.

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

The id of this thread.

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

Every message on the thread, oldest first, including internal notes. A thread can span several tickets, so this can hold messages no one ticket has.

**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`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**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`.

**Fields**

**edges** `[\[SupportTicketEventEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[SupportTicketEvent!](/docs/api-reference/v3/reference/support/support-ticket-event)` *required*

The item at this edge.

**nodes** `[\[SupportTicketEvent!\]!](/docs/api-reference/v3/reference/support/support-ticket-event)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**actorType** `[SupportTicketEventActorType!](/docs/api-reference/v3/reference/support/support-ticket-event-actor-type)` *required*

Who or what made it happen.

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

Null unless actorType is CUSTOMER, or when the record was deleted. Requires customers\_read.

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

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

The id of this event. Opaque and stable; events can't be fetched by id.

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

When it happened.

**rule** `[SupportTicketTriggeredRule](/docs/api-reference/v3/reference/support/support-ticket-triggered-rule)`

The rule that made this happen, as its run recorded it. Null unless actorType is RULE, or when the rule no longer exists and its run wasn't recorded.

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

Null unless actorType is TEAM\_MEMBER, or when they've left the team.

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

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**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)

**fields**

**description** `String!` *required*

What the topic covers. The classifier matches tickets against the name and this text.

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

The id of this topic.

**name** `String!` *required*

Topic name, unique within the store.

**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.

## 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. |
| `ACTION_REJECTED` | `422` | The record can't take the action now, or the platform it belongs to refused it. The message says why, in words a merchant can act on. | Act on the message, such as reconnecting the store's account, then send it again. A platform rate limit clears on its own after a few minutes. |
| `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 {
  supportTicketHandOffFromAi(id: "...", idempotencyKey: "...") {
    assigneeType
    channels
    closureReason
    createdAt
    customerSentiment
    draftPreview
    id
    lastCustomerMessageAt
    # ...
  }
}
```


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