Delete an IncomingPhoneNumber
Use this endpoint for the IncomingPhoneNumber method to delete an IncomingPhoneNumber. If the delete is successful, a 204 response, with no body, will be returned.
Parameters
Parameter |
---|
No Parameters |
Request
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{IncomingPhoneNumberSid}.json \
-X DELETE \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.incomingPhoneNumbers('IncomingPhoneNumberSid')
.remove()
.then(incoming_phone_number => console.log(incoming_phone_number.sid))
.done();
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
IncomingPhoneNumberResource.Delete(pathSid: "IncomingPhoneNumberSid");
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
client.incoming_phone_numbers('IncomingPhoneNumberSid').delete()
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
@client.incoming_phone_numbers('IncomingPhoneNumberSid').delete
Responses
204 No Content
If the delete is successful, a 204 response, with no body, will be returned.