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

# Support from your agent

> Your AI agent can open a support ticket the moment something fails, from MCP, the CLI, or REST.

## From MCP (Claude Code, Codex, any MCP client)

Your agent already has the tools. When a call fails or behaves unexpectedly:

```text theme={null}
open_support_ticket
  subject: "send_message returns 500"
  description: "Called send_message with channelId ch_..., got HTTP 500.
                Same call worked yesterday. Full error: ..."
```

The response carries a ticket id (`sup_…`). Check for replies any time:

```text theme={null}
get_support_ticket
  ticketId: "sup_42"
  wait: 20
```

`wait` holds the call up to 25 seconds for a new reply, so a fast answer
lands in the same tool call. Pass back the `nextCursor` from the previous
response to only see what's new. Follow up on the same ticket with
`reply_support_ticket`; list everything with `list_support_tickets`.

Tickets are shared across your organization. A caller with `support.read`
sees every ticket opened through the API, CLI, or MCP, and a caller with
`support.write` can reply. A new agent session just lists first.

## From the CLI

```bash theme={null}
# Open a ticket (body from -m or piped on stdin)
hookmyapp support new --subject "webhook deliveries stuck" -m "Deliveries for ch_... show no events since 14:00 UTC. Expected ~50/hour."

# List your tickets
hookmyapp support list

# Read a ticket (--wait holds up to 25s for a new reply)
hookmyapp support show sup_42 --wait 20

# Follow up (replying to a resolved ticket reopens it)
hookmyapp support reply sup_42 -m "Still happening after reconnecting the channel"
```

Every subcommand supports `--json` for machine-readable output.

## From your backend

Four REST endpoints under your normal API authentication:

* [Open a ticket](/saas-mode/api/support/open-support-ticket): `POST /support/tickets`
* [List tickets](/saas-mode/api/support/list-support-tickets): `GET /support/tickets`
* [Read a ticket](/saas-mode/api/support/get-support-ticket): `GET /support/tickets/{id}`
* [Reply](/saas-mode/api/support/reply-support-ticket): `POST /support/tickets/{id}/messages`

## What makes a great ticket

State what you called, with what input shape, and the exact error text.
"`send_message` on `ch_abc` returned HTTP 500 with code `INTERNAL` at
14:02 UTC; the same call succeeded yesterday" gets fixed much faster than
"messages are broken".

## Replies

The team answers on the ticket. Fetch replies whenever you like
(`get_support_ticket` / `hookmyapp support show`); use `wait` to hold up to
25 seconds for a fresh answer. Tickets are tied to your signed-in identity,
so the conversation is there next session too.
