Claude API Integration with Zendesk Tickets
Connecting the Claude API to Zendesk tickets lets you automatically summarize incoming requests, draft reply suggestions, tag tickets by category or urgency, and pull context from past conversations — all without a human touching the ticket first. This guide walks through the actual integration pattern: how Zendesk triggers a webhook, how that webhook calls Claude, and how you write the result back to the ticket.
The short answer to "how do I integrate Claude with Zendesk tickets": you set up a Zendesk trigger (or webhook target) that fires on ticket creation or update, have it call a small server endpoint you control, that endpoint sends the ticket content to Claude's Messages API, and the response gets posted back to Zendesk as an internal note, tag, or draft reply via the Zendesk API. There's no native Zendesk-to-Claude connector, so this always involves a middle layer — either code you host, or a managed API layer like SubToAPI that handles the Claude side.
The integration architecture
A typical Claude + Zendesk pipeline has four pieces:
- Zendesk trigger — fires on ticket events (new ticket, new comment, status change).
- Webhook target — a URL Zendesk POSTs the ticket payload to.
- Your handler — extracts subject, description, and comment history, then calls Claude.
- Zendesk write-back — uses the Zendesk Tickets API to add a tag, internal note, or macro-filled draft.
Claude never talks to Zendesk directly — it only sees whatever text your handler sends it and returns whatever text your handler asks for.
Step 1: Create a Zendesk webhook
In Zendesk Admin Center, go to Objects and rules > Webhooks and create a webhook pointing at your handler endpoint. Then build a trigger under Business rules > Triggers that fires on ticket creation and sends the webhook with a JSON payload:
{
"ticket_id": "{{ticket.id}}",
"subject": "{{ticket.title}}",
"description": "{{ticket.description}}",
"requester_email": "{{ticket.requester.email}}",
"priority": "{{ticket.priority}}"
}
Step 2: Call Claude from your handler
Your handler receives the webhook, builds a prompt, and sends it to Claude's Messages API. If you're using SubToAPI, this is a single HTTP call with your sub_live_... key — no need to manage Anthropic SDK versions or token accounting yourself:
const res = await fetch("https://api.subtoapi.app/v1/messages", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SUBTOAPI_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "claude-sonnet-4-5",
max_tokens: 500,
messages: [
{
role: "user",
content: `Summarize this support ticket in 2 sentences, suggest a tag from [billing, bug, feature_request, account], and draft a brief reply.
Subject: ${ticket.subject}
Description: ${ticket.description}`
}
]
})
});
const data = await res.json();
This endpoint behaves like the standard Messages API, so if you've already read the Claude docs on request/response shape, you can apply that knowledge directly — see /docs/messages for the full request format.
Step 3: Parse the response and write back to Zendesk
Ask Claude to return structured sections (summary, tag, draft reply) so parsing is predictable. A reliable pattern is requesting JSON directly in the prompt:
content: `Return only JSON with keys "summary", "tag", "draft_reply" for this ticket:
Subject: ${ticket.subject}
Description: ${ticket.description}`
Then parse data.content[0].text as JSON and call the Zendesk API to update the ticket:
await fetch(`https://yourcompany.zendesk.com/api/v2/tickets/${ticketId}.json`, {
method: "PUT",
headers: {
"Authorization": `Basic ${zendeskAuth}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
ticket: {
tags: [parsed.tag],
comment: { body: parsed.summary, public: false }
}
})
});
Keep the AI-generated note internal (public: false) until a human reviews it — this avoids accidentally sending a hallucinated reply to a customer.
Streaming vs. batch for ticket workflows
Ticket automation rarely needs streaming — the output is written to a field, not displayed character-by-character to a human. A standard non-streaming call keeps your handler simpler and avoids managing server-sent events in a backend job. If you later build an agent-facing dashboard where support staff watch the draft reply generate live, streaming is worth adding — see /docs/streaming for how response chunks are formatted.
Using tool use for ticket context lookups
Claude's tool use feature is useful when the draft reply needs account data Claude doesn't have in the ticket text — order status, subscription tier, past tickets. You define a tool like lookup_customer_account, Claude requests it when needed, your handler executes the actual API call, and you feed the result back in a second message. This two-step pattern is documented at /docs/tools and works the same way through SubToAPI's Messages endpoint as it does with the raw Anthropic API.
Rate limits, retries, and usage visibility
Zendesk ticket volume is spiky — a product outage can generate hundreds of tickets in minutes, all triggering webhooks at once. Build retry logic with exponential backoff for 429s, and batch low-priority summarization jobs through a queue rather than calling Claude synchronously on every webhook. If multiple team members or services share one Claude integration, SubToAPI's per-key usage metadata makes it easier to see which workflow (ticket summarization vs. reply drafting vs. internal tooling) is consuming tokens, which matters once you're running several automations against the same account. Start with the free trial at /signup, check /pricing for the Solo, Team, and Scale tiers, or jump straight to /docs/quickstart to get a key working in a test endpoint before wiring up Zendesk.
Common pitfalls
- Sending full conversation history every time. Only include the last few comments plus the original description — full thread history inflates token usage fast on long-running tickets.
- Letting Claude auto-send replies. Always route AI-generated replies to an internal note or draft field first.
- Ignoring HTML in ticket bodies. Zendesk ticket descriptions often contain HTML or quoted email signatures — strip them before sending to Claude to reduce noise and token count.
- One webhook for everything. Split triggers by ticket type (new vs. reopened vs. escalated) so each calls Claude with a purpose-specific prompt instead of one generic catch-all.
Questions
Does Zendesk have a built-in Claude integration? No. Zendesk doesn't natively support Claude — you need a webhook and a server-side handler (custom code or a managed API layer) to bridge ticket events to the Claude API and write results back.
Should I use streaming for ticket summarization? Usually not. Summaries and tags are written to fields, not displayed live, so a standard synchronous call is simpler and sufficient for most ticket automation.
How do I stop Claude from auto-sending replies to customers? Write Claude's output as an internal/private note or a draft field rather than a public comment, and require a human to approve before it goes out.