SMS Support (Twilio)
Provide support via text message with Twilio
Enable SMS support using Twilio. Customers text your support number, and Keva creates tickets and responds via SMS.
Prerequisites
- A Twilio account with an SMS-enabled phone number
- Twilio Account SID and Auth Token
Setup
1. Get a Twilio Phone Number
- In Twilio Console, go to Phone Numbers > Buy a number
- Choose a number with SMS capability
- Note the phone number (E.164 format: +1XXXXXXXXXX)
2. Get Twilio Credentials
From Twilio Console > Account > API Keys & Tokens:
- Account SID: Starts with
AC - Auth Token: Your account auth token
3. Connect to Keva
Go to Settings > Integrations > Twilio and enter your credentials.
4. Configure Webhook
In Twilio Console, configure your phone number:
- A MESSAGE COMES IN: Webhook
- URL:
https://app.keva.support/api/webhooks/twilio - HTTP Method: POST
5. Subscribe to Phone Number
Go to Settings > Channels, click Add SMS Number, and select your Twilio number.
Configuration Options
Create Ticket On
| Setting | Behavior |
|---|---|
| New thread | New ticket for first message from a phone number |
| Any message | Every SMS creates or updates a ticket |
Routing
- Workspace: Route SMS tickets to a workspace
- Default Priority: Often set to "high" for SMS
- Auto-assign: Assign to AI or specific agent
How It Works
- Customer texts your Twilio number
- Twilio sends form-urlencoded webhook
- HMAC-SHA1 signature verified
- Keva matches phone number to subscription
- Ticket created with SMS content
- AI processes and replies via Twilio API
- Customer receives response as SMS
Conversation Threading
Conversations are threaded by customer phone number:
- First message creates a new ticket
- Follow-up messages added to existing open ticket
- After ticket is closed, new messages create new tickets
Phone Number Formatting
All numbers normalized to E.164 format:
(555) 123-4567becomes+15551234567555-123-4567becomes+15551234567
Customer Identification
Since SMS only provides phone numbers:
- Email: Generated as
{phone}@sms.keva.local - Name: Uses location data if available ("SMS from Seattle, WA")
- Location: Twilio provides FromCity, FromState, FromCountry
Troubleshooting
Webhook not receiving messages: Verify URL in Twilio, check URL is publicly accessible, ensure phone has SMS capability.
Signature validation failing: Verify Auth Token, check webhook URL matches exactly (including https://), ensure raw body not modified.
Replies not sending: Check Twilio account has credits, verify phone is SMS-capable, check recipient number is valid.
Duplicate tickets: Check "Create Ticket On" setting, verify thread matching works, ensure tickets are closed when resolved.
Security
- HMAC-SHA1 signature verification using Auth Token
- URL + sorted params used as signature base
- Credentials encrypted at rest
- All messages logged in audit trail
Response Format
Keva responds to Twilio with empty TwiML:
<?xml version="1.0" encoding="UTF-8"?>
<Response></Response>All replies go through the ticket reply flow, not auto-responses.