Back to Blog
Integration Guides

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

Add Twilio SMS and calling to Freshsales so your sales team can reach leads from inside the CRM and have every interaction logged automatically.

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

Freshsales and Twilio integrate through the Freshsales REST API and Twilio's messaging and voice APIs to give your sales team SMS outreach and call logging directly tied to leads, contacts, and accounts in the CRM. Freshsales includes a built-in phone feature powered by Freshcaller, but connecting Twilio gives you full programmability over call routing, SMS automation, and number management that is not available through the native telephony add-on. This integration is commonly used by teams that want automated SMS sequences at specific lifecycle stages with reliable carrier delivery and independent number reputation management.

What You Need Before You Start

Generate a Freshsales API key from Settings, then API Settings in your Freshsales account, which you will include as the Authorization header in the format Token token={apiKey} in every Freshsales API request. Your Freshsales API base URL is https://{domain}.myfreshworks.com/crm/sales/api/ where domain is your Freshsales subdomain visible in the browser address bar. From Twilio, collect your Account SID, Auth Token, and a phone number enabled for SMS, and create a Messaging Service in the Twilio Console under Messaging, then Services if you need number pooling for high-volume sending or automatic unsubscribe management. Your integration needs a server or Twilio Functions deployment with a public HTTPS endpoint for receiving Twilio StatusCallback delivery events and for any Freshsales automation webhooks that trigger outbound SMS.

Step-by-Step Integration Guide

Set up a Freshsales Automation Rule under Settings, then Workflows to send a POST webhook to your middleware when a contact lifecycle stage changes, including the contact ID and mobile number in the payload so your handler has the data it needs without making an extra API call. In your middleware, receive the Freshsales webhook payload, extract the contact ID and phone number, and call POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json with To set to the phone in E.164 format, From set to your Twilio number or Messaging Service SID, Body set to your message, and StatusCallback set to your delivery receipt endpoint. Retrieve full contact details when additional fields are needed by calling GET https://{domain}.myfreshworks.com/crm/sales/api/contacts/{contactId} to access mobile_number, first_name, owner_id, and any custom fields for personalizing the message and attributing it to the correct rep. Log the outbound SMS as a Freshsales Note on the contact by calling POST https://{domain}.myfreshworks.com/crm/sales/api/contacts/{contactId}/notes with a body containing description set to the full SMS text prefixed with SMS Sent: and the current ISO timestamp, creating a visible activity record in the contact timeline.

Common Issues and How to Fix Them

Freshsales API returns 401 Unauthorized when the Authorization header format is incorrect, specifically when the token is passed as Bearer {key} instead of the required Token token={key} format. Double-check your HTTP client configuration and verify the header value matches the Token token= format exactly, as this is the single most common error when first connecting to the Freshsales REST API. Freshsales stores phone numbers in both mobile_number and work_number fields and the correct field is empty when a rep only fills in one of them, causing your middleware to attempt sending to a null value. Add a guard in your middleware that checks both fields and selects the first non-empty value, then skips the SMS and logs a note explaining the skip when both fields are blank so reps know to add a phone number to the record. Twilio StatusCallback delivery reports may arrive before your database has finished writing the sent message log, causing the status update handler to fail because the associated record does not yet exist. Use an atomic write pattern that creates the log entry with a pending status in the same transaction as the Twilio API call, so the record is always present when the callback arrives a few seconds later.

How to Get More from This Integration

Build inbound SMS handling by pointing your Twilio number inbound webhook to an endpoint that searches Freshsales contacts by calling GET https://{domain}.myfreshworks.com/crm/sales/api/contacts/search?q={phoneNumber}&include=owner and logging the reply as a note, giving reps immediate visibility into prospect responses within the Freshsales contact record. Create a Freshsales custom field named last_sms_sent_at on the Contact module and update it via PUT https://{domain}.myfreshworks.com/crm/sales/api/contacts/{contactId} each time an SMS is dispatched, enabling sales managers to build contact list views filtered on recency of SMS outreach for follow-up prioritization. Extend the integration to include voice call logging by using Twilio Voice to let reps initiate calls from a custom Freshsales button, then writing the call duration, direction, and recording URL to a Freshsales Note when the call ends via the Twilio StatusCallback. Set up Twilio Lookup to validate phone numbers at lead creation by calling GET https://lookups.twilio.com/v2/PhoneNumbers/{number}?Fields=line_type_intelligence before sending the first SMS, and tag contacts with invalid or non-mobile numbers so reps know to verify the number before spending time on that record.

Conclusion

Freshsales with Twilio gives your sales team a direct SMS and voice channel that is fully logged in the CRM and tied to the right contact record on every interaction. Get in touch with Telphi Consulting to have this integration delivered and tested for your Freshsales account.

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.