Overview

Update voice webhook URLs and optionally disable SMS webhooks for a phone number. Important: SMS webhook URLs are managed automatically through assistant assignment. This endpoint only allows you to disable SMS webhooks when needed.

Request Body

  • phone_number (string, required): The phone number to update in E.164 format (e.g., +1234567890)
  • voice_webhook_url (string, optional): URL for voice call webhooks
  • disable_sms (boolean, optional): Set to true to disable SMS webhooks. Default: false
  • enable_sms (boolean, optional): Set to true to enable SMS webhooks based on assigned assistant. Default: false
  • provider (string, optional): Provider (twilio or telnyx). Auto-detected if not provided
Note: You cannot set both disable_sms and enable_sms to true in the same request.

SMS Webhook Management

SMS webhooks are automatically configured when you assign a phone number to an assistant with an sms_webhook_url. Use this endpoint to temporarily disable SMS handling:

Disabling SMS Webhooks

Request - Disable SMS
{
  "phone_number": "+15551234567",
  "disable_sms": true
}
What happens when SMS is disabled:
  • Twilio: Sets SMS webhook to https://demo.twilio.com/welcome/sms/reply
  • Telnyx: Sets SMS webhook to empty URL
  • Result: Incoming SMS messages are ignored

Re-enabling SMS Webhooks

Request - Enable SMS
{
  "phone_number": "+15551234567",
  "enable_sms": true
}
What happens when SMS is enabled:
  • Prerequisites: Phone number must be assigned to an assistant with sms_webhook_url configured
  • Twilio: Sets SMS webhook to /twilio-sms-webhook and enables messaging service
  • Telnyx: Sets SMS webhook to /telnyx-webhook
  • Result: SMS messages are forwarded to assistant’s sms_webhook_url

Updating Voice Webhooks

Request - Update Voice Webhook
{
  "phone_number": "+15551234567",
  "voice_webhook_url": "https://your-app.com/voice-webhook"
}

Combined Updates

Request - Update Voice + Disable SMS
{
  "phone_number": "+15551234567",
  "voice_webhook_url": "https://your-app.com/voice-webhook",
  "disable_sms": true
}
Request - Update Voice + Enable SMS
{
  "phone_number": "+15551234567",
  "voice_webhook_url": "https://your-app.com/voice-webhook",
  "enable_sms": true
}

Response

Response
{
  "success": true,
  "phone_number": "+15551234567",
  "provider": "twilio",
  "updated_webhooks": {
    "voice": "https://your-app.com/voice-webhook",
    "sms": "disabled (demo URL)"
  },
  "message": "Successfully updated 2 webhook(s) for +15551234567 via twilio"
}

Use Cases

  1. Voice webhook updates - Change where voice call events are sent
  2. Temporary SMS disable - Disable SMS during maintenance or testing
  3. Emergency SMS disable - Quickly stop SMS processing if needed
  4. Re-enable SMS after maintenance - Restore SMS functionality without reassigning phone numbers

Notes

  • At least one of voice_webhook_url, disable_sms, or enable_sms must be provided
  • Cannot set both disable_sms and enable_sms to true in the same request
  • To enable SMS, the phone number must be assigned to an assistant with sms_webhook_url configured
  • Voice webhooks can be updated independently of SMS webhook state