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

# Haze Ticket Transcripts: Saving and Accessing Closed Tickets

> Understand how haze saves closed ticket history as JSON and plain text, where transcripts are delivered, and how to access them via the web or API.

Every time a ticket closes, haze automatically captures the full conversation and archives it in multiple formats. You always have a record of what was discussed, regardless of whether the channel still exists.

## What Gets Saved

When a ticket closes, haze:

1. Scrapes the channel history from oldest message to newest.
2. Stores a **JSON record** containing every message with its metadata (author, timestamp, attachments, embeds).
3. Generates a formatted **plain-text `.txt` dump** of the conversation.
4. Posts a summary card and the transcript file to your configured destinations.
5. Publishes a **private web page** for the transcript at `haze.rest`.

## Destinations

Transcripts can be delivered to a channel, to DMs, or both. Configure your destination with:

```bash theme={null}
,ticket transcripts #transcripts   # post to a specific channel
,ticket transcripts dm             # send to the ticket opener's DMs
,ticket transcripts view           # show your current destination settings
```

<Note>
  Running `,ticket setup` automatically creates a **#transcripts** channel and wires it as the default destination. You only need to run `,ticket transcripts` if you want to change or add destinations.
</Note>

## Web Transcripts

Every closed ticket gets a private web page you can share with the relevant member or reference later:

```
https://haze.rest/tickets/{transcript_id}
```

You can also look up the latest closed transcript for any ticket using the ticket's own ID in place of the transcript ID.

## Transcript API

Haze exposes a simple read API for integrating transcript data with external tools or dashboards:

| Endpoint                | Returns                                            |
| ----------------------- | -------------------------------------------------- |
| `GET /tickets/{id}`     | Full JSON record with messages and ticket metadata |
| `GET /tickets/{id}/raw` | Plain-text transcript dump                         |

## How Tickets Close

A transcript is generated whenever a ticket closes, regardless of how it was closed. There are three close paths:

* **Close button** — A staff member (or the ticket opener) clicks the **Close** button on the open card inside the ticket channel.
* **`,ticket close [reason]`** — Anyone with permission runs the close command directly, optionally attaching a reason that is included in the transcript.
* **Inactivity auto-close** — If you have configured `,ticket inactivity`, haze automatically closes tickets that have been idle for longer than the threshold.
