Learn TicketsX faster
Setup guides, the full command reference, Premium features, and the REST API in one place.
Search Transcripts
/<guild_id>/api/transcripts/searchSearch every closed ticket in the server, not just its metadata: what was said inside it, who said it, who took part, when it opened or closed, its panel, rating, or Discord channel ID. This is the same engine as Deep Search in the dashboard. Requires the `search_transcripts` permission (off by default).
/<guild_id>/api/transcripts/searchIdentical, with the filters sent as a JSON body instead of query parameters. Easier for long queries and participant lists. If you send both, the body wins.
Every result carries the ticket’s metadata, up to 8 participants, and — when you searched by content — up to 3 matching message snippets so you can see *why* it matched. Take the TicketId from any result straight to Get a Transcript for the full message list, or Get Transcript HTML for the rendered archive.
Filters (all optional; combine as many as you like)
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | optional | Free-text search of message content, max 200 characters. Words shorter than 3 characters are ignored by the index. |
| said_by | string | optional | Only match content written by this Discord user ID. Combine with q. |
| participants | string[] | optional | Up to 5 users who messaged in the ticket, each a Discord user ID or a partial username. Comma-separated on GET, an array on POST. |
| participants_mode | string | optional | all (default) requires every listed participant to have messaged in the same ticket; any matches tickets where at least one did. |
| include_bots | boolean | optional | Include bot messages and bot participants in matching. Defaults to false. |
| opened_by | string | optional | Ticket creator, as a Discord user ID or a partial username. |
| closed_by | string | optional | Discord user ID of whoever closed the ticket. |
| channel_id | string | optional | The Discord channel or thread ID the ticket used. |
| panel_id | number | optional | Only tickets opened from this panel. |
| opened_from | number | optional | Unix timestamp: only tickets opened at or after this time. |
| opened_to | number | optional | Unix timestamp: only tickets opened at or before this time. |
| closed_from | number | optional | Unix timestamp: only tickets closed at or after this time. |
| closed_to | number | optional | Unix timestamp: only tickets closed at or before this time. |
| rating_min | number | optional | Minimum feedback rating, 1–5. |
| rating_max | number | optional | Maximum feedback rating, 1–5. |
| limit | number | optional | Results per page, 1–50 (default 25). |
| offset | number | optional | Results to skip for pagination, max 10000 (default 0). |
Search is rate limited to 10 requests per minute per token, separately from other reads, and runs under a strict time budget. A search that cannot finish in time returns 504 — narrow the filters (add a date range or a panel) and retry rather than repeating the same query. Values that do not validate are dropped rather than rejected, so check the filters object echoed back in the response to see exactly what was applied.
Search reads the transcript index, which is built while the server has Premium and backfilled across your existing archive when you first upgrade. The coverage object in every response tells you how many of your transcripts are indexed (indexed) out of the total stored (total) — if a backfill is still running, they will not match yet.
curl -X GET \
-H "Authorization: Bearer <API_TOKEN>" \
"https://api.ticketsx.xyz/<guild_id>/api/transcripts/search?q=refund&participants=123456789,987654321&participants_mode=all&closed_from=1730000000&limit=25"curl -X POST \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"q":"refund","participants":["123456789","987654321"],"participants_mode":"all","closed_from":1730000000,"limit":25}' \
https://api.ticketsx.xyz/<guild_id>/api/transcripts/search{
"transcripts": [
{
"TicketId": 42,
"AuthorId": "123456789",
"AuthorUsername": "jane",
"PanelId": 1,
"PanelName": "Support",
"Rating": 5,
"CloseReason": "Resolved",
"CreatedAt": 1732200000,
"ClosedAt": 1732210000,
"ChannelId": "1122334455",
"ClosedBy": "987654321",
"Participants": [
{ "UserId": "123456789", "Username": "jane", "MessageCount": 12, "IsBot": false }
],
"Snippets": [
{ "AuthorId": "123456789", "AuthorUsername": "jane", "Content": "my refund never arrived", "CreatedAt": 1732200050 }
]
}
],
"pagination": { "total": 1, "limit": 25, "offset": 0, "returned": 1 },
"coverage": { "indexed": 480, "total": 480 },
"filters": { "q": "refund", "participants_mode": "all", "limit": 25 }
}