Skip to main content
PATCH
/
v1
/
sip
/
config
Update Advanced Config
curl --request PATCH \
  --url https://api.bland.ai/v1/sip/config \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "phone_number": "<string>",
  "direction": "<string>",
  "failover_config": {},
  "codec_config": {},
  "alert_config": {}
}
'

Headers

authorization
string
required
Your API key for authentication.

Body

phone_number
string
required
The phone number to update configuration for. Must be in E.164 format.
direction
string
required
The direction to update: "inbound" or "outbound".
failover_config
object
Failover configuration:
  • enabled (boolean) — Enable/disable failover
  • endpoints (array) — Failover SIP servers, each with host, port, transport, and priority
  • triggers (array) — Conditions that trigger failover: "unreachable", "auth_failure", "timeout"
  • failback (string) — "auto" or "manual"
codec_config
object
Codec configuration:
  • codecs (array) — Ordered list of codec names: "PCMU", "PCMA", "G.729", "Opus", "G.722"
  • transcode (boolean) — Enable transcoding between codecs
alert_config
object
Alert configuration:
  • enabled (boolean) — Enable/disable alerts
  • thresholdsunreachable_minutes (number), failure_rate_percent (number), failure_rate_window_minutes (number), response_time_ms (number)
  • channelsemail (boolean), sms (boolean), webhook (string, URL)
Example Request
curl -X PATCH https://api.bland.ai/v1/sip/config \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14150000000",
    "direction": "outbound",
    "failover_config": {
      "enabled": true,
      "endpoints": [
        { "host": "backup1.sip.provider.com", "port": 5061, "transport": "tls", "priority": 1 },
        { "host": "backup2.sip.provider.com", "port": 5061, "transport": "tls", "priority": 2 }
      ],
      "triggers": ["unreachable", "timeout"],
      "failback": "auto"
    },
    "codec_config": {
      "codecs": ["PCMU", "PCMA", "Opus"],
      "transcode": true
    },
    "alert_config": {
      "enabled": true,
      "thresholds": {
        "unreachable_minutes": 5,
        "failure_rate_percent": 20,
        "failure_rate_window_minutes": 30,
        "response_time_ms": 500
      },
      "channels": {
        "email": true,
        "sms": false,
        "webhook": "https://hooks.example.com/sip-alerts"
      }
    }
  }'