Skip to main content
These patterns target developers building AI agent tools (OpenAI function calling, Claude tools, LangChain, etc.) on top of the Public API. Each workflow uses at most two list calls before drilling into detail. Prerequisites: API key with tickets:read. See Authentication.

Core tool set

Most agent integrations expose four tools: Link to Scalar for full request/response schemas.

Use case 1 — “Show open tickets from the last 7 days”

Saved views encode filters. The agent discovers views, picks one that matches “open + recent”, then lists tickets. Steps:
  1. GET /public/v1/views — scan name and filters for a view like “Open — last 7 days”.
  2. GET /public/v1/tickets?view_id=<uuid>&limit=40 — return ticket summaries to the user or downstream LLM.
If no suitable view exists, tell the user to create one in Inbox views — v1 cannot apply ad-hoc date/status filters.

Use case 2 — “Summarize ticket #1234”

Steps:
  1. GET /public/v1/tickets/1234/messages?order=asc&limit=100 — chronological thread.
  2. Concatenate messages[].text (respect the 10,000 character per-message cap) and pass to your LLM summarizer.
Optional: GET /public/v1/tickets/1234 first for subject, status, contact, and tags. Internal notes, drafts, and system events are excluded from message responses.

Use case 3 — “How many open tickets in my Returns view?”

Do not paginate all tickets to count them. Use the view’s count field: Steps:
  1. GET /public/v1/views — find the view where name matches “Returns” (or similar).
  2. Read count from that view object.
count reflects the current filter snapshot and may lag the inbox by a few seconds (read replica).

OpenAI tool definitions (example)

Handler mapping:

Claude tool definitions (example)

Use the same HTTP handlers as above. Claude tool use blocks return tool_result JSON — pass the API response body through unchanged so the model sees success, data, and pagination.

Agent design tips

  • Resolve view names in tool 1 — let the model pick view_id from list_inbox_views output instead of hard-coding UUIDs.
  • Use ticket numbers in user-facing paths — URLs use #1234 / ticket_number, not UUIDs.
  • Paginate messages for long threads — follow pagination.next_cursor when has_more is true.
  • Handle 404 gracefullyVIEW_NOT_FOUND often means the linked agent cannot see that view; suggest a service key or different view.
  • Respect rate limits — cache view lists; avoid re-fetching on every turn.