Back to Blog
Integration Guides

How to Integrate Twilio with Zendesk: Step-by-Step Guide

Connect Twilio SMS and voice to Zendesk to create tickets from inbound texts, send proactive updates to customers, and close loops faster.

DA
Danial A
Senior Twilio Consultant, Telphi Consulting
June 22, 2026
7 min read
Twilio
Integration
Customer Support
How to Integrate Twilio with Zendesk: Step-by-Step Guide

Twilio and Zendesk integrate to bring SMS into your support workflow so inbound customer texts automatically create Zendesk tickets, agents can reply via SMS from within Zendesk, and proactive update notifications are dispatched to customers when their ticket status changes. This integration suits customer support teams that handle significant SMS inbound volume and need every text conversation tied to a Zendesk ticket for tracking, SLA measurement, and reporting without any manual copy-paste between tools. You can build this connection using Zendesk's native Twilio SMS channel integration available in Zendesk Suite, or using the Zendesk Tickets API combined with Twilio webhooks for a fully custom implementation.

What You Need Before You Start

You need a Zendesk Suite account at the Growth plan or higher to access the Messaging and third-party channel integration features, and administrator access to configure channels and triggers in Zendesk. Generate a Zendesk API token from the Zendesk admin panel under Apps and Integrations, then Zendesk API, by clicking Add API Token, and note the token value alongside your Zendesk agent email for Basic authentication in the format {email}/token:{apiToken}. From Twilio, collect your Account SID, Auth Token, and at least one SMS-capable phone number, and configure its Messaging webhook URL in the Twilio Console to point to your middleware inbound handler or to Zendesk's native Twilio channel endpoint if using the native integration. Build a requester phone lookup table or rely on Zendesk's built-in phone user matching, which searches existing Zendesk users by phone number when a new inbound SMS arrives, to avoid creating duplicate user records for the same customer.

Step-by-Step Integration Guide

For a custom integration, configure your Twilio number's Messaging webhook to POST to your middleware endpoint, parse the From, To, Body, and MessageSid from the Twilio payload, and search for an existing Zendesk user with that phone number by calling GET https://{subdomain}.zendesk.com/api/v2/users/search.json?query=phone:{E164number} with your Basic auth credentials. If no matching user exists, create one by calling POST https://{subdomain}.zendesk.com/api/v2/users.json with a body containing user.name set to the phone number as a placeholder and user.phone set to the From number in E.164 format, then use the returned user id in the next step. Create a Zendesk ticket for the inbound SMS by calling POST https://{subdomain}.zendesk.com/api/v2/tickets.json with a body containing ticket.subject set to SMS from {From number}, ticket.comment.body set to the message text, ticket.requester_id set to the user ID, and ticket.via.channel set to api to tag the ticket's origin. To send proactive SMS when a ticket status changes, create a Zendesk Trigger under Business Rules, then Triggers, set the conditions to Status changed to Solved, add a Notify by active webhook action pointing to your middleware endpoint, and in your middleware call POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json with To set to the requester phone stored in the ticket's custom field and Body set to a closure notification message.

Common Issues and How to Fix Them

Zendesk creates duplicate tickets when the same customer sends multiple SMS messages in quick succession before an agent responds, because each inbound message triggers a new ticket creation without checking for an existing open ticket from the same requester. Add a check in your middleware before creating a new ticket by calling GET https://{subdomain}.zendesk.com/api/v2/tickets.json?status=open,pending&requester_id={userId} and if an open ticket from that user exists, add the new message as a comment on that ticket via POST https://{subdomain}.zendesk.com/api/v2/tickets/{ticketId}/comments.json rather than creating a new ticket. Zendesk API returns 422 Unprocessable Entity when the ticket creation payload contains a phone number in the requester field that does not exactly match an existing Zendesk user's phone format. Always create or update the Zendesk user record with the normalized E.164 phone before creating the ticket, and use the numeric user ID in the ticket's requester_id field rather than passing the phone directly. Twilio StatusCallback delivery for outbound SMS proactive notifications can fail when the Zendesk trigger fires before the ticket has fully propagated through Zendesk's indexing, causing the requester phone lookup in your middleware to return stale data. Add a 2-second delay before fetching ticket details in your trigger webhook handler, or pass the requester phone directly in the Zendesk trigger webhook payload body by including it as a placeholder field in the webhook JSON template.

How to Get More from This Integration

Enable agent SMS replies directly from Zendesk by building a Zendesk App using the Zendesk Apps Framework that adds a Reply via SMS button to the ticket sidebar, which calls your middleware with the ticket ID and reply text, retrieves the requester phone from the ticket, and dispatches the Twilio SMS, writing the sent status back to the ticket as an internal note. Build a CSAT survey flow by triggering an outbound Twilio SMS survey when a Zendesk ticket is moved to Solved, sending a message asking the customer to reply with a number from 1 to 5 for their satisfaction rating, and routing the inbound reply to your middleware which parses the rating and updates a custom Zendesk ticket field named SMS CSAT Score via PUT https://{subdomain}.zendesk.com/api/v2/tickets/{ticketId}.json. Implement an appointment reminder system by storing scheduled callback times in a Zendesk custom ticket field, running a scheduled job that queries tickets with a callback_scheduled field set to within the next 30 minutes via GET https://{subdomain}.zendesk.com/api/v2/search.json with a query on the custom field, and sending a Twilio SMS reminder to each requester 30 minutes before their scheduled callback. Log all outbound Twilio SMS as Zendesk ticket comments by calling POST https://{subdomain}.zendesk.com/api/v2/tickets/{ticketId}/comments.json from the Twilio StatusCallback handler, writing the message body, delivery status, and MessageSid as a private comment, creating a complete SMS audit trail inside each ticket.

Conclusion

Twilio and Zendesk together create a complete SMS support channel where inbound customer texts become tickets, agents reply from within Zendesk, and customers receive automated updates at every stage. Contact Telphi Consulting to build and configure this integration for your Zendesk support environment.

Share this article:
0 views

Ready to Transform Your Business Communications?

Get a free consultation with our VoIP experts and discover how we can help you save costs, improve efficiency, and scale your business.

Comments (0)

Join the discussion and share your thoughts (AI-moderated for quality)

Protected by AI moderation

Be the first to comment

No comments yet. Share your thoughts below.