Delete Inbound Phone Number
curl --request POST \
--url https://app.luly.ai/api/v1/inbound/{phone_number}/delete \
--header 'authorization: <authorization>' \
--header 'encrypted_key: <encrypted_key>'import requests
url = "https://app.luly.ai/api/v1/inbound/{phone_number}/delete"
headers = {
"authorization": "<authorization>",
"encrypted_key": "<encrypted_key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', encrypted_key: '<encrypted_key>'}
};
fetch('https://app.luly.ai/api/v1/inbound/{phone_number}/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.luly.ai/api/v1/inbound/{phone_number}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>",
"encrypted_key: <encrypted_key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.luly.ai/api/v1/inbound/{phone_number}/delete"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("encrypted_key", "<encrypted_key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.luly.ai/api/v1/inbound/{phone_number}/delete")
.header("authorization", "<authorization>")
.header("encrypted_key", "<encrypted_key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.luly.ai/api/v1/inbound/{phone_number}/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["encrypted_key"] = '<encrypted_key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Successfully deleted number from database: +15555555555"
}
Custom Twilio Accounts
Delete Inbound Phone Number
Remove an inbound number that was uploaded through your own Twilio account. See Enterprise Twilio Integration for more information.
POST
/
v1
/
inbound
/
{phone_number}
/
delete
Delete Inbound Phone Number
curl --request POST \
--url https://app.luly.ai/api/v1/inbound/{phone_number}/delete \
--header 'authorization: <authorization>' \
--header 'encrypted_key: <encrypted_key>'import requests
url = "https://app.luly.ai/api/v1/inbound/{phone_number}/delete"
headers = {
"authorization": "<authorization>",
"encrypted_key": "<encrypted_key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', encrypted_key: '<encrypted_key>'}
};
fetch('https://app.luly.ai/api/v1/inbound/{phone_number}/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.luly.ai/api/v1/inbound/{phone_number}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>",
"encrypted_key: <encrypted_key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.luly.ai/api/v1/inbound/{phone_number}/delete"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("encrypted_key", "<encrypted_key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.luly.ai/api/v1/inbound/{phone_number}/delete")
.header("authorization", "<authorization>")
.header("encrypted_key", "<encrypted_key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.luly.ai/api/v1/inbound/{phone_number}/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["encrypted_key"] = '<encrypted_key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Successfully deleted number from database: +15555555555"
}
Headers
Your API key for authentication.
The encrypted_key for the Twilio account that owns the phone number you want to delete.
Path Parameters
The phone number you want to remove from Luly’s system.
Response
Can be
success or error.A message saying whether the deletion succeeded, or a helpful message describing why it failed.
{
"status": "success",
"message": "Successfully deleted number from database: +15555555555"
}
⌘I