Creates a dynamic emergency endpoint, associating a callback number and location with a device for emergency calling.
POST
/
dynamic_emergency_endpoints
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const dynamicEmergencyEndpoint = await client.dynamicEmergencyEndpoints.create({
callback_number: '+13125550000',
caller_name: 'Jane Doe Desk Phone',
dynamic_emergency_address_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0',
});
console.log(dynamicEmergencyEndpoint.data);
import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
dynamic_emergency_endpoint = client.dynamic_emergency_endpoints.create(
callback_number="+13125550000",
caller_name="Jane Doe Desk Phone",
dynamic_emergency_address_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
)
print(dynamic_emergency_endpoint.data)
{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The request failed because it was not well-formed."
}
]
}
{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request."
}
]
}
{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found."
}
]
}
{
"errors": [
{
"code": "10027",
"title": "Unprocessable Entity",
"detail": "The server understood the syntax of the request but was unable to process the instructions."
}
]
}
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const dynamicEmergencyEndpoint = await client.dynamicEmergencyEndpoints.create({
callback_number: '+13125550000',
caller_name: 'Jane Doe Desk Phone',
dynamic_emergency_address_id: '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0',
});
console.log(dynamicEmergencyEndpoint.data);
import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
dynamic_emergency_endpoint = client.dynamic_emergency_endpoints.create(
callback_number="+13125550000",
caller_name="Jane Doe Desk Phone",
dynamic_emergency_address_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
)
print(dynamic_emergency_endpoint.data)
{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The request failed because it was not well-formed."
}
]
}
{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request."
}
]
}
{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found."
}
]
}
{
"errors": [
{
"code": "10027",
"title": "Unprocessable Entity",
"detail": "The server understood the syntax of the request but was unable to process the instructions."
}
]
}