Integrations

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

  1. In Twilio Console, go to Phone Numbers > Buy a number
  2. Choose a number with SMS capability
  3. 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

SettingBehavior
New threadNew ticket for first message from a phone number
Any messageEvery 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

  1. Customer texts your Twilio number
  2. Twilio sends form-urlencoded webhook
  3. HMAC-SHA1 signature verified
  4. Keva matches phone number to subscription
  5. Ticket created with SMS content
  6. AI processes and replies via Twilio API
  7. 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-4567 becomes +15551234567
  • 555-123-4567 becomes +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.