Skip to main content
PUT

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
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
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

Combined Updates

Request - Update Voice + Disable SMS
Request - Update Voice + Enable SMS

Response

Response

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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for updating phone number webhooks.

phone_number
string
required

Phone number to update webhooks for

voice_webhook_url
string | null

URL for voice call webhooks

disable_sms
boolean | null
default:false

Set to true to disable SMS webhooks (sets to demo URL)

enable_sms
boolean | null
default:false

Set to true to enable SMS webhooks based on assigned assistant

provider
string | null

Provider ('twilio' or 'telnyx'). Auto-detected if not provided

Response

Successful Response

Response model for webhook update.

success
boolean
required
phone_number
string
required
provider
string
required
updated_webhooks
Updated Webhooks · object
required
message
string
required