Skip to main content
Documentation

Set up with an AI agent

Our whole API is described by a public OpenAPI spec, so an AI coding agent can read it and build your support setup from a plain-English description. You say what you want. It writes the API calls.

Works with Claude Code, Codex, Cursor, or anything else that can fetch a URL and make HTTP requests.

Try it without a token

Reading the spec needs no authentication, so paste this into any assistant and let Ticket Tool describe itself:

Discovery prompt
Read these two files:

- https://ticket-tool.app/llms-full.txt (the product and its plans)
- https://api.ticket-tool.app/v1/openapi.json (its REST API)

Ticket Tool runs support ticketing inside Discord. Using only those
files, tell me what it does and what you, as an agent with API access,
could set up for me: ticket categories and their pre-ticket questions,
panels, support flows and staff-only buttons, canned replies, the
knowledge base, automation rules, feedback ratings and webhooks.

Note which plan each feature needs, then ask what my server is for.

Both files are served live, so the answer stays accurate as plans and endpoints change rather than going stale like a copied feature list. llms-full.txt is the detailed product summary, covering the features above and what each plan includes. There is a shorter llms.txt if you only want the overview, though it leaves out canned replies and feedback ratings.

Before you build

Create a token

Server dashboard, Integrations page, API tab. Organization owners use Organization Settings instead. API access starts on the Pro plan.

Grant only the scopes you need

A setup job usually wants categories:write, panels:write, flows:write and knowledgebase:write, plus the matching read scopes. It does not need tickets:write.

Keep the token out of the prompt

export TICKET_TOOL_TOKEN="tt_..."

Then tell the agent the variable name, not the value.

Example prompts

Each of these is a complete request. Add Show me your plan before creating anything to any of them.

Build a support setup from scratch
Read https://api.ticket-tool.app/v1/openapi.json. Using $TICKET_TOOL_TOKEN
against https://api.ticket-tool.app/v1, create three ticket categories
(Billing, Technical, General), each asking two relevant questions before
the ticket opens, and one panel with a dropdown to pick between them.
Sample reply

Created 3 categories and 1 panel.

  • Billing asks for an order number and what went wrong
  • Technical asks what you already tried and any error message
  • General asks a single "how can we help" question

The panel Support lists all three in a dropdown. It is saved but not live yet, so tell me a channel and I will deploy it.

Seed a knowledge base
Create knowledge base articles for our ten most common questions,
listed below. Each one needs markdownContent for the web portal and a
pages array so the bot can send it inside Discord.

<paste your FAQ here>
Sample reply

Created and published 10 articles, including "Why was I charged twice?", "How do I cancel my subscription?" and "Reset your password".

Each one has web content for your public portal and a Discord embed, so staff can send them straight into a ticket. Tagged billing (4), account (3) and technical (3) so search and auto-suggest can find them.

Add a staff lookup button
Create a support flow called "Customer Lookup" that calls
https://internal.example.com/lookup?discord={{user.id}} and posts the
plan and renewal date into the ticket. Attach it to the Billing category
as a staff-only workflow button labeled "Look up customer".
Sample reply

Created the flow Customer Lookup and attached it to Billing.

Staff now see a Look up customer button on new Billing tickets. Pressing it calls your endpoint and posts a line like Plan: Pro, renews 12 March 2026. Members cannot see or press it.

Open a Billing ticket yourself to try it.

Audit what already exists
List my categories, panels and flows, then tell me which categories
have no panel pointing at them and which flows are inactive.
Sample reply

You have 4 categories, 2 panels and 6 flows.

No panel points at these, so members cannot open them:

  • Billing
  • Feedback

Inactive flows:

  • Refund Request (draft, no nodes yet)
  • Old Onboarding (switched off on 3 March)

Want me to add Billing and Feedback to your Support panel?

Copy a setup to another server
Read the categories and flows from server A, then recreate them on
server B with the same names and settings, remapping any channel and
role ids I give you.
Sample reply

Copied 4 categories and 3 flows from Main to Staging, remapping 6 channel ids and 4 role ids from your list.

Two references had no mapping, so I left them empty:

  • Category "Escalations", its support role
  • Flow "Refund", the alert channel

Set those on Staging before you activate the flows, or the flows will fail at that step.

Three rules to pass on

Knowledge base articles need pages

markdownContent is the public web page. The pages array is the embed the bot sends in Discord. An article created without pages cannot be sent in a ticket.

Flow nodes are replaced, not merged

Sending nodes replaces the whole graph, because nodes reference each other through nextNodeId. Read the flow, change what you need, send the complete list back.

Your plan limits still apply

The API enforces the same tier limits and permission checks as the dashboard, so an agent cannot exceed your plan or reach another server's data. A 403 usually means the plan, not the token.

Two habits worth keeping: try it on a spare server first, since these calls create real channels and panels, and export your configuration from the dashboard once you are happy with it so you have a restore point.

Pro

Want to try this on the Pro plan?

API access starts on Pro. There are two ways to get there without committing.

Free developer license

Unlocks the API, integrations, advanced flow nodes and the public knowledge base on a small server, at no cost.

  • Your server needs 5 or fewer members
  • You must be the server owner
  • One license per Discord account
  • Does not include an AI token allowance
Activate it on your billing page

50% off your first month

For a real server that is too large for a developer license, the code WELCOME takes half off your first month.

  • Works on Community or Pro
  • New subscriptions only
  • One redemption per customer
  • Cancel any time
Claim 50% off, then pick your server

Keep going