How to Integrate Claude API with Zendesk
Integrating the Claude API with Zendesk means connecting your Zendesk instance to Claude so it can read incoming tickets and generate draft replies, summaries, or tags — either through a Zendesk app/webhook that calls Claude directly, or through a middleware layer that handles auth, rate limits, and logging. There's no native "Claude connector" inside Zendesk, so you build the bridge yourself with a small server or serverless function that sits between the two.
This guide covers two practical integration paths: a direct Zendesk-to-Claude webhook setup, and a more production-ready setup using an API gateway like SubToAPI to simplify authentication and usage tracking. Both use the same core idea — Zendesk triggers fire on ticket events, call an endpoint, and that endpoint talks to Claude's Messages API.
Why integrate Claude with Zendesk
Support teams typically want Claude to do one or more of the following inside Zendesk:
- Draft first-response replies based on the ticket content and macros
- Summarize long threads so agents don't have to scroll through 40 messages
- Classify and tag tickets (urgency, topic, sentiment) automatically
- Suggest knowledge base articles based on the customer's question
- Translate incoming tickets before an agent responds
None of this requires replacing your helpdesk — Claude acts as an assistant layer that writes into internal notes or ticket fields, and agents stay in control of what actually gets sent to the customer.
Architecture overview
The integration has three moving parts:
- Zendesk trigger or webhook — fires when a ticket is created or updated
- Your backend endpoint — receives the webhook payload, extracts ticket text, calls Claude
- Zendesk API call back — writes Claude's output into a ticket field, internal note, or macro suggestion
Zendesk triggers can call an external target (a webhook) whenever a condition is met, such as "ticket status is New." That webhook hits your server, which then calls Claude and, using the Zendesk REST API, posts the result back as a private comment.
Step 1: Create a Zendesk webhook target
In Zendesk Admin Center, go to Objects and rules > Webhooks and create a new webhook pointing to your backend, e.g. https://yourapp.com/webhooks/zendesk-ticket. Set the request method to POST and the format to JSON.
Then create a trigger under Business Rules that fires this webhook when a ticket is created, passing the ticket ID and subject/body as JSON in the request body.
Step 2: Build the backend endpoint
Your endpoint needs to:
- Verify the webhook (Zendesk signs requests — validate the signature)
- Fetch the full ticket content via the Zendesk API if it wasn't included in the payload
- Call Claude with the ticket text
- Post the response back to Zendesk as a private note
A minimal Node.js handler using the Claude Messages API directly looks like this:
app.post('/webhooks/zendesk-ticket', async (req, res) => {
const { ticket_id, subject, description } = req.body;
const claudeResponse = await fetch('https://api.anthropic.com/v1/messages', {
method: 'POST',
headers: {
'x-api-key': process.env.ANTHROPIC_API_KEY,
'anthropic-version': '2023-06-01',
'content-type': 'application/json'
},
body: JSON.stringify({
model: 'claude-sonnet-4-5',
max_tokens: 500,
messages: [{
role: 'user',
content: `Draft a polite, concise support reply for this ticket.\n\nSubject: ${subject}\n\n${description}`
}]
})
});
const data = await claudeResponse.json();
const draft = data.content[0].text;
await postInternalNote(ticket_id, draft); // your Zendesk API call
res.sendStatus(200);
});
This works fine for a prototype, but once you put it in production you'll hit the usual issues: rotating API keys safely, tracking which agent or ticket consumed how many tokens, handling retries on failures, and giving non-engineers visibility into usage without sharing raw API keys.
Step 3: Use a gateway layer for production
Instead of managing the Anthropic key directly inside your Zendesk integration code, you can route calls through SubToAPI, which turns your existing Claude access into a standard HTTPS API with its own sub_live_... application keys. This keeps your integration code identical to a normal REST call, but gives you per-key usage metadata and team seats so you can see exactly how much the Zendesk integration is costing without digging through Anthropic's console.
Swap the request target and auth header:
const response = 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 and suggest a priority level.\n\n${description}`
}]
})
});
Everything else in your Zendesk webhook handler stays the same. See the quickstart and messages docs for request/response details. If you want the reply drafted incrementally so it appears to stream into a note (useful for longer summaries), check streaming.
Step 4: Decide what Claude writes back
Three common patterns:
- Internal note only — safest default; agents review before sending
- Suggested macro — Claude's output populates a custom field an agent can insert with one click
- Auto-tag — Claude returns a JSON label (
{"priority": "high", "topic": "billing"}) that your backend maps to Zendesk tags via the API
For tagging and classification, keep max_tokens low and ask Claude to respond with structured JSON only — this reduces cost and makes parsing reliable. If your workflow needs Claude to call external systems (e.g., look up order status before replying), see tool use for how function calling fits into the same request.
Handling scale and multiple agents
If several people on your support team are building or maintaining Zendesk automations, give each integration its own API key rather than sharing one. SubToAPI's Team and Scale plans support per-seat keys so you can isolate usage by project — one key for ticket summarization, another for the auto-reply drafter — and spot runaway usage immediately. Start with a free trial at signup to test the Zendesk webhook flow before committing to a plan.
Questions
Does Zendesk have a built-in Claude integration? No. Zendesk doesn't offer a native Claude connector; you build the connection using Zendesk's webhook/trigger system and a backend that calls the Claude API directly or through a gateway.
Should Claude reply to customers automatically? For most teams, no — route Claude's output into an internal note or suggested reply so an agent reviews it before it reaches the customer, especially early in rollout.
What's the fastest way to test this before building the full webhook flow? Call the Claude API manually with a few sample ticket bodies using curl, confirm the output quality and latency, then wire up the Zendesk trigger once you're happy with the prompt.