Skip to main content

Enable emergency for a phone number

POST 
/phone_numbers/:id/actions/enable_emergency

Enable emergency for a phone number

Request

Path Parameters

    id int64required

    Identifies the resource.

Body

required

    emergency_enabled booleanrequired

    Indicates whether to enable emergency services on this number.

    emergency_address_id int64required

    Identifies the address to be used with emergency services.

Responses

200: Phone number emergency enabled.

202: Phone number emergency requested.

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/phone_numbers/:id/actions/enable_emergency' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"emergency_enabled": true,
"emergency_address_id": "53829456729313"
}'

Response samples


{
"data": {
"id": "1293384261075731499",
"record_type": "voice_settings",
"connection_id": "1d0e6cb8-8668-462e-94c6-49ae0f0ed48b",
"customer_reference": "customer-reference",
"tech_prefix_enabled": false,
"translated_number": "+13035559999",
"call_forwarding": {
"call_forwarding_enabled": true,
"forwards_to": "+13035559123",
"forwarding_type": "always"
},
"cnam_listing": {
"cnam_listing_enabled": true,
"cnam_listing_details": "example"
},
"emergency": {
"emergency_enabled": true,
"emergency_address_id": "1315261609962112019"
},
"usage_payment_method": "pay-per-minute",
"media_features": {
"rtp_auto_adjust_enabled": true,
"accept_any_rtp_packets_enabled": true,
"t38_fax_gateway_enabled": true
},
"call_recording": {
"inbound_call_recording_enabled": true,
"inbound_call_recording_format": "wav",
"inbound_call_recording_channels": "single"
},
"inbound_call_screening": "disabled"
}
}