SIP Domains

Overview

A SIP domain is a custom DNS hostname that can accept SIP traffic for your account. If anyone makes a SIP request to that domain, for example, to “sip:alice@example.sip.twilio.com”, it will route to Twilio. When that request hits Twilio, it’s authenticated, and then Twilio requests TwiML from your server. The VoiceUrl of the SIP domain tells Twilio what URL to request.

Twilio has two built-in authentication methods for your SIP Domain: IpAccessControlLists and CredentialLists. You must have at least one mapped to your Domain or else all requests will be blocked. You may apply one or multiple of each type to each SIP Domain.

The IpAccessControlListMappings and CredentialListMappings subresources of the SIP Domain show which lists are mapped to your SIP Domain.

Resource Properties

A Domain instance resource has the following properties:

Name Description
account_sid

The unique id of the Account that sent this message. (not PII)

api_version

The version of the Twilio API used to process the message. (not PII)

auth_type

The types of authentication you have mapped to your domain. The possible values are "IP_ACL" and "CREDENTIAL_LIST". If you have both set up for your domain, both will be returned comma delimited. If you do not, have one setup for your domain, it will not be able to receive any traffic. (not PII)

date_created

The date that this resource was created, given as GMT in RFC 2822 format. (not PII)

date_updated

The date that this resource was last updated, given as GMT in RFC 2822 format. (not PII)

domain_name

The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-". (not PII)

friendly_name

A human readable descriptive text, up to 64 characters long. (not PII)

sid

A 34 character string that uniquely identifies the SIP domain in Twilio. (not PII)

sip_registration

This boolean can be enabled to allow SIP Endpoints to register with this domain to receive calls. (not PII)

uri

The URI for this resource, relative to https://api.twilio.com (not PII)

voice_fallback_method

The HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST. (not PII)

voice_fallback_url

The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by VoiceUrl. (🔐 PII MTL: 30 days)

voice_method

The HTTP method Twilio will use when requesting the above Url. Either GET or POST. (not PII)

voice_status_callback_method

The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST. (not PII)

voice_status_callback_url

The URL that Twilio will request to pass status parameters (such as call ended) to your application. (🔐 PII MTL: 30 days)

voice_url

The URL Twilio will request when this domain receives a call. (🔐 PII MTL: 30 days)

Domain List Resource

The list resource allows you to view the domains in an account as well as create new domains.

List Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/Domains

List HTTP GET

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains

Get a List of all Domains

Returns a paged list of the domains for an account.

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.list((err, data) => {
  data.domains.forEach(domain => {
    console.log(domain.DomainName);
  });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.each(domain => {
  console.log(domain.domainName);
});
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var domains = twilio.ListDomains();

    foreach (var domain in domains.Domains)
    {
      Console.WriteLine(domain.DomainName);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of domains and echo a property for each one
foreach ($client->account->sip->domains as $domain) {
    echo $domain->domain_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over domains and print out a property for each one
@client.account.sip.domains.list.each do |domain|
    puts domain.domain_name
end
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var domains = DomainResource.Read();

        foreach (var domain in domains)
        {
          Console.WriteLine(domain.DomainName);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of domains and echo a property for each one
foreach ($client->sip->domains->read() as $domain) {
    echo $domain->domainName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of domain objects with the properties described above
domains = client.sip.domains.list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over domains and print out a property for each one
@client.sip.domains.list.each do |domain|
  puts domain.domain_name
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    DomainList domains = client.getAccount().getDomains();
    
    // Loop over domains and print out a property for each one.
    for (Domain domain : domains) {
      System.out.println(domain.getDomainName());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Loop over the list of domains and print(a property for each one
for domain in client.sip.domains.list():
    print(domain.domain_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Domain> domains = Domain.reader().read();

    // Loop over domains and print out a property for each one.
    for (Domain domain : domains) {
      System.out.println(domain.getDomainName());
    }
  }
}
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json?PageSize=50&Page=0",
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json?PageSize=50&Page=0",
    "page_size": 50,
    "sip_domains": [
        {
            "auth_type": "",
            "voice_status_callback_method": "POST",
            "subresource_uris": {
                "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/IpAccessControlListMappings.json",
                "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/CredentialListMappings.json"
            },
            "date_updated": "Fri, 06 Sep 2013 18:48:50 -0000",
            "voice_status_callback_url": null,
            "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776.json",
            "friendly_name": "Scranton Office",
            "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "voice_url": "https://dundermifflin.example.com/twilio/app.php",
            "voice_method": "POST",
            "sid": "SD098e7b11c00d0ba152b1d3f084c4b776",
            "date_created": "Fri, 06 Sep 2013 18:48:50 -0000",
            "voice_fallback_method": "POST",
            "api_version": "2010-04-01",
            "voice_fallback_url": null
        },
        ...
    ],
    "next_page_uri": null,
    "page": 0
}
<TwilioResponse>
    <SipDomains [paging attributes]>
        <SipDomain>
            <Sid>SD098e7b11c00d0ba152b1d3f084c4b776</Sid>
            <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
            <FriendlyName>Scranton Office</FriendlyName>
            <ApiVersion>2010-04-01</ApiVersion>
            <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
            <AuthType/>
            <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
            <VoiceMethod>POST</VoiceMethod>
            <VoiceFallbackUrl/>
            <VoiceFallbackMethod>POST</VoiceFallbackMethod>
            <VoiceStatusCallbackUrl/>
            <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
            <DateCreated>Fri, 06 Sep 2013 18:48:50 -0000</DateCreated>
            <DateUpdated>Fri, 06 Sep 2013 18:48:50 -0000</DateUpdated>
            <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776</Uri>
            <SubresourceUris>
                <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/CredentialListMappings</CredentialListMappings>
                <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/IpAccessControlListMappings</IpAccessControlListMappings>
            </SubresourceUris>
        </SipDomain>
        ...
    </SipDomains>
</TwilioResponse>
Retrieve all SIP Domains

List HTTP POST

Creates a new Domain and returns its instance resource. You must pick a unique domain name that ends in “.sip.twilio.com”. After creating a Domain, you must map it to an authentication method before the domain is ready to receive traffic.

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains

You must POST at least the required DomainName to create a new Domain. We also recommend that you at least set the VoiceUrl of your Domain when creating it.

Name Description
DomainName

Required. The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-". (not PII)

AuthType

Optional. The types of authentication you have mapped to your domain (not PII)

FriendlyName

Optional. A human readable descriptive text, up to 64 characters long. (not PII)

VoiceFallbackMethod

Optional. The HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST. (not PII)

VoiceFallbackUrl

Optional. The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by VoiceUrl. (🔐 PII MTL: 30 days)

VoiceMethod

Optional. The HTTP method Twilio will use when requesting the above Url. Either GET or POST. (not PII)

VoiceStatusCallbackMethod

Optional. The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST. (not PII)

VoiceStatusCallbackUrl

Optional. The URL that Twilio will request to pass status parameters (such as call ended) to your application. (🔐 PII MTL: 30 days)

VoiceUrl

Optional. The URL Twilio will request when this domain receives a call. (🔐 PII MTL: 30 days)

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains.create({
    friendlyName: "My Domain",
    voiceUrl: "https://demo.twilio.com/welcome",
    authType: "IP_ACL",
    domainName: "marlo.sip.twilio.com"
}, function(err, domain) {
    process.stdout.write(domain.sid);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.create({
    friendlyName: 'My Domain',
    voiceUrl: 'https://demo.twilio.com/welcome',
    authType: 'IP_ACL',
    domainName: 'marlo.sip.twilio.com',
})
.then((domain) => {
    process.stdout.write(domain.sid);
});
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var options = new DomainOptions();
    options.FriendlyName = "My Domain";
    options.VoiceUrl = "https://demo.twilio.com/welcome";
    options.AuthType = "IP_ACL";
    options.DomainName = "marlo.sip.twilio.com";
    var domain = twilio.CreateDomain(options);

    Console.WriteLine(domain.Sid);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

$domain = $client->account->sip->domains->create(
    "My Domain",
    "marlo.sip.twilio.com",
    array(
        "VoiceUrl" => "https://demo.twilio.com/welcome",
        "AuthType" => "IP_ACL"
    )
);
echo $domain->sid;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

domain = @client.account.sip.domains.create(:friendly_name => "My Domain",
    :voice_url => "https://demo.twilio.com/welcome",
    :auth_type => "IP_ACL",
    :domain_name => "marlo.sip.twilio.com")
puts domain.domain_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var domain = DomainResource.Create(
            "marlo.sip.twilio.com", accountSid, "My Domain", "IP_ACL",
            new Uri("https://demo.twilio.com/welcome"));

        Console.WriteLine(domain.Sid);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client
    ->sip
    ->domains
    ->create(
        "dunder-mifflin-scranton.sip.twilio.com",
        array(
            "friendlyName" => "Scranton Office",
            "voiceUrl" => "https://dundermifflin.example.com/twilio/app.php"
        )
    );

echo $domain->sid;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

domain = client.sip.domains.create(friendly_name="My Domain",
    voice_url="https://demo.twilio.com/welcome",
    auth_type="IP_ACL",
    domain_name="marlo.sip.twilio.com")
print(domain.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

domain = @client.sip.domains.create(
  friendly_name: 'My Domain',
  voice_url: 'https://demo.twilio.com/welcome',
  auth_type: 'IP_ACL',
  domain_name: 'marlo.sip.twilio.com'
)

puts domain.domain_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.factory.sip.DomainFactory;
import com.twilio.sdk.resource.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the DomainList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "My Domain"));
    params.add(new BasicNameValuePair("VoiceUrl", "https://demo.twilio.com/welcome"));
    params.add(new BasicNameValuePair("AuthType", "IP_ACL"));
    params.add(new BasicNameValuePair("DomainName", "marlo.sip.twilio.com"));
    
    
    DomainFactory domainFactory = client.getAccount().getDomainFactory();
    Domain domain = domainFactory.create(params);
    System.out.println(domain.getSid());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

domain = client.sip \
        .domains \
        .create("dunder-mifflin-scranton.sip.twilio.com",
                friendly_name="Scranton Office",
                voice_url="https://dundermifflin.example.com/twilio/app.php")

print(domain.sid)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    Domain domain = Domain.creator("marlo.sip.twilio.com")
        .setFriendlyName("My Domain")
        .setVoiceUrl("https://demo.twilio.com/welcome")
        .setAuthType("IP_ACL")
        .create();

    System.out.println(domain.getSid());
  }
}
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains \
    -d "FriendlyName=My%20Domain" \
    -d "VoiceUrl=https://demo.twilio.com/welcome" \
    -d "AuthType=IP_ACL" \
    -d "DomainName=marlo.sip.twilio.com" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json \
    -d "FriendlyName=My%20Domain" \
    -d "VoiceUrl=https://demo.twilio.com/welcome" \
    -d "AuthType=IP_ACL" \
    -d "DomainName=marlo.sip.twilio.com" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "POST",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD27f0288630a668bdfbf177f8e22f5ccc</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>POST</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>POST</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
Create a SIP Domain

List HTTP PUT

Not supported.

List HTTP DELETE

Not supported.

Domain Instance Resource

The SIP/Domain instance resource allows you to view, modify and delete a single domain.

The instance resource is represented by the properties above.

Instance Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}

Instance HTTP GET

Return a specific instance by Sid.

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}

Get an Instance of a SIP Domain

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').get((err, domain) => {
  console.log(domain.voiceMethod);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .fetch()
  .then(domain => console.log(domain.voiceMethod));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var domain = twilio.GetDomain("SD32a3c49700934481addd5ce1659f04d2");

    Console.WriteLine(domain.VoiceMethod);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client->account->sip->domains->get("SD32a3c49700934481addd5ce1659f04d2");
echo $domain->voice_method;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2')
puts @domain.voice_method
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var domain = DomainResource.Fetch("SD32a3c49700934481addd5ce1659f04d2");

        Console.WriteLine(domain.VoiceMethod);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client->sip
    ->domains("SD27f0288630a668bdfbf177f8e22f5ccc")
    ->fetch();

echo $domain->voiceMethod;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

domain = client.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
print(domain.voice_method)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2').fetch

puts @domain.voice_method
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.Domain;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    System.out.println(domain.getVoiceMethod());
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
domain = client.sip \
               .domains("SD27f0288630a668bdfbf177f8e22f5ccc") \
               .fetch()

print(domain.voice_method)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = Domain.fetcher("SD32a3c49700934481addd5ce1659f04d2").fetch();

    System.out.println(domain.getVoiceMethod());
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "POST",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD27f0288630a668bdfbf177f8e22f5ccc</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>POST</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>POST</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
Retrieve an instance of SIP Domain

Instance HTTP POST

Update the attributes of a domain.

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}

Update a SIP Domain

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains("SD32a3c49700934481addd5ce1659f04d2").update({
    friendlyName: "Little Kevin",
    voiceMethod: "GET"
}, function(err, domain) {
    console.log(domain.domainName);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .update({
    friendlyName: 'Little Kevin',
    voiceMethod: 'GET',
  })
  .then((domain) => {
    console.log(domain.domainName);
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var options = new DomainOptions();
    options.FriendlyName = "Little Kevin";
    options.VoiceMethod = "GET";

    twilio.UpdateDomain("SD32a3c49700934481addd5ce1659f04d2", options);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client->account->sip->domains->get("SD32a3c49700934481addd5ce1659f04d2");
$domain->update(array(
        "FriendlyName" => "Little Kevin",
    "VoiceMethod" => "GET"
    ));
echo $domain->domain_name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
@domain.update(:friendly_name => "Little Kevin",
    :voice_method => "GET")
puts @domain.domain_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        DomainResource.Update("SD32a3c49700934481addd5ce1659f04d2",
            friendlyName: "Little Kevin", voiceMethod: "GET");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client->sip
    ->domains("SD27f0288630a668bdfbf177f8e22f5ccc")
    ->update(
        array(
            "friendlyName" => "Little Kevin",
            "voiceMethod" => "GET"
        )
    );

echo $domain->domainName;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

domain = client.sip.domains.update("SD32a3c49700934481addd5ce1659f04d2", friendly_name="Little Kevin",
    voice_method="GET")
print(domain.domain_name)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2').fetch

@domain.update(
  friendly_name: 'Little Kevin',
  voice_method: 'GET'
)

puts @domain.domain_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    // Build a filter for the DomainList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "Little Kevin"));
    params.add(new BasicNameValuePair("VoiceMethod", "GET"));
    domain.update(params);
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
domain = client.sip \
        .domains("SD27f0288630a668bdfbf177f8e22f5ccc") \
        .update(friendly_name="Little Kevin", voice_method="GET")

print(domain.domain_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.http.HttpMethod;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = Domain.updater("SD32a3c49700934481addd5ce1659f04d2")
        .setFriendlyName("Little Kevin")
        .setVoiceMethod(HttpMethod.GET)
        .update();

    System.out.println(domain.getDateUpdated());
  }
}
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -d "FriendlyName=Little%20Kevin" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -d "FriendlyName=Little%20Kevin" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office Dev",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "GET",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD32a3c49700934481addd5ce1659f04d2</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office Dev</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>GET</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>GET</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
Update an Instance of SIP Domain

Instance HTTP PUT

Not supported.

Instance HTTP DELETE

Delete a domain. If you have created subdomains of a domain, you will not be able to delete the domain until you first delete all subdomains of it.

If successful, Twilio will return an HTTP 204 response with no body.

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}

Delete a SIP Domain Instance

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains("SD32a3c49700934481addd5ce1659f04d2").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid SD32a3c49700934481addd5ce1659f04d2 deleted successfully.");
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .remove()
  .then((data) => {
    console.log('Sid IP32a3c49700934481addd5ce1659f04d2 deleted successfully.');
  })
  .catch((err) => {
    console.log(err.status);
    throw err.message;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteDomain("SD32a3c49700934481addd5ce1659f04d2");
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->sip->domains->delete("SD32a3c49700934481addd5ce1659f04d2");
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
@domain.delete
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        DomainResource.Delete("SD32a3c49700934481addd5ce1659f04d2");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.sip.domains.delete("SD32a3c49700934481addd5ce1659f04d2")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@domain = @client.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2')
                 .fetch

@domain.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.Domain;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    
    domain.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .delete()
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain.deleter("SD32a3c49700934481addd5ce1659f04d2").delete();
  }
}
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Delete an Instance of SIP Domain

Note: IpAccessControlListMapping and CredentialListMapping API path has changed. We suggest you use new resource path going forward.

IpAccessControlListMappings Subresource

The IpAccessControlListMappings subresource contains the list of IpAccessControlList instances associated with this domain. If an INVITE is received for a domain, the source IP address must be in one of the mapped lists for the INVITE to be accepted. 

IpAccessControlListMappings Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings

IpAccessControlListMappings Resource Properties

An IpAccessControlListMappings resource is represented by the following properties:

Property Description
Sid A 34 character string that uniquely identifies an IpAccessControlList you have mapped to the domain
AccountSid The unique id of the Account that responsible for this resource.
FriendlyName A human readable descriptive text, up to 64 characters long.
DateCreated The date that this resource was created, given as GMT in RFC 2822 format.
DateUpdated The date that this resource was last updated, given as GMT in RFC 2822 format.
Uri The URI for this resource, relative to https://api.twilio.com

IpAccessControlListMappings HTTP GET

Return the IpAccessControlListMappings that are associated with this domain.

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings

Return a specific instance by Sid.

Get a Specific SIP Domain Instance

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c").get(function(err, ipAccessControlListMapping) {
    console.log(ipAccessControlListMapping.friendlyName);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings('AL95a47094615fe05b7c17e62a7877836c')
  .fetch()
  .then((ipAccessControlListMapping) => {
    console.log(ipAccessControlListMapping.friendlyName);
});
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var ipAccessControlListMapping = twilio.GetIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
    
    Console.WriteLine(ipAccessControlListMapping.FriendlyName);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$ip_access_control_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->get("AL95a47094615fe05b7c17e62a7877836c");
echo $ip_access_control_list_mapping->friendly_name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.get("AL95a47094615fe05b7c17e62a7877836c")
puts @ip_access_control_list_mapping.friendly_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var ipAccessControlListMapping = IpAccessControlListMappingResource
            .Fetch("SD32a3c49700934481addd5ce1659f04d2",
                   "AL95a47094615fe05b7c17e62a7877836c");

        Console.WriteLine(ipAccessControlListMapping.FriendlyName);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$ipAccessControlListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c")
    ->fetch();

echo $ipAccessControlListMapping->friendlyName;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

ip_access_control_list_mapping = client.sip \
    .ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2") \
    .get("AL95a47094615fe05b7c17e62a7877836c")
print(ip_access_control_list_mapping.friendly_name)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@ip_acl_list_map_sid = 'AL95a47094615fe05b7c17e62a7877836c'

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@ip_acl_list_map = @client.sip
                          .domains('SD32a3c49700934481addd5ce1659f04d2')
                          .ip_access_control_list_mappings(@ip_acl_list_map_sid)
                          .fetch

puts @ip_acl_list_map.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.IpAccessControlListMapping;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    IpAccessControlListMapping ipAccessControlListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMapping("AL95a47094615fe05b7c17e62a7877836c");
    System.out.println(ipAccessControlListMapping.getFriendlyName());
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
ip_access_control_list_mapping = client.sip \
    .domains("SD32a3c49700934481addd5ce1659f04d2") \
    .ip_access_control_list_mappings("AL95a47094615fe05b7c17e62a7877836c") \
    .fetch()

print(ip_access_control_list_mapping.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    IpAccessControlListMapping ipAccessControlListMapping = IpAccessControlListMapping
        .fetcher("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .fetch();

    System.out.println(ipAccessControlListMapping.getFriendlyName());
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "subresource_uris": {
        "addresses": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses.json"
    },
    "date_updated": "Wed, 11 Sep 2013 04:06:07 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c.json",
    "sid": "AL95a47094615fe05b7c17e62a7877836c",
    "date_created": "Wed, 11 Sep 2013 04:06:07 -0000"
}
<TwilioResponse>
    <IpAccessControlList>
        <Sid>AL95a47094615fe05b7c17e62a7877836c</Sid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 04:06:07 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 04:06:07 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c</Uri>
        <SubresourceUris>
          <Addresses>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses</Addresses>
        </SubresourceUris>
    </IpAccessControlList>
</TwilioResponse>
Get an Instance of SIP Domain

IpAccessControlListMappings HTTP POST

Map an IpAccessControlList to this domain.

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings

POST Parameters

The following parameters are required in your POST to IpAccessControlListMappings:

Parameter Description
IpAccessControlListSid The Sid of the IpAccessControlList that you want to associated with this domain. Once associated, Twilio will start authenticating access to the domain against this list.
Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings.create({
    ipAccessControlListSid: "AL95a47094615fe05b7c17e62a7877836c"
}, function(err, ipAccessControlListMapping) {
    process.stdout.write(ipAccessControlListMapping.sid);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings
  .create({
    ipAccessControlListSid: 'AL95a47094615fe05b7c17e62a7877836c',
  })
  .then((ipAccessControlListMapping) => {
    process.stdout.write(ipAccessControlListMapping.sid);
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    
    var ipAccessControlListMapping = twilio.CreateIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
    
    Console.WriteLine(ipAccessControlListMapping.Sid);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$ip_access_control_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->create("AL95a47094615fe05b7c17e62a7877836c", array());
echo $ip_access_control_list_mapping->sid;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.create(:ip_access_control_list_sid => "AL95a47094615fe05b7c17e62a7877836c")
puts ip_access_control_list_mapping.friendly_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var ipAccessControlListMapping = IpAccessControlListMappingResource
            .Create("SD32a3c49700934481addd5ce1659f04d2",
                "AL95a47094615fe05b7c17e62a7877836c");

        Console.WriteLine(ipAccessControlListMapping.Sid);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$ipAccessControlListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings
    ->create("AL95a47094615fe05b7c17e62a7877836c");

echo $ipAccessControlListMapping->sid;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

ip_access_control_list_mapping = client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").create(ip_access_control_list_sid="AL95a47094615fe05b7c17e62a7877836c")
print(ip_access_control_list_mapping.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@ip_acl_list_sid = 'AL95a47094615fe05b7c17e62a7877836c'

ip_acl_map = @client.sip
                    .domains('SD32a3c49700934481addd5ce1659f04d2')
                    .ip_access_control_list_mappings
                    .create(ip_access_control_list_sid: @ip_acl_list_sid)

puts ip_acl_map.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.factory.sip.IpAccessControlListMappingFactory;
import com.twilio.sdk.resource.instance.sip.IpAccessControlListMapping;
import com.twilio.sdk.resource.list.sip.IpAccessControlListMappingList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the IpAccessControlListMappingList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("IpAccessControlListSid", "AL95a47094615fe05b7c17e62a7877836c"));
    
    
    IpAccessControlListMappingFactory ipAccessControlListMappingFactory = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMappingFactory();
    IpAccessControlListMapping ipAccessControlListMapping = ipAccessControlListMappingFactory.create(params);
    System.out.println(ipAccessControlListMapping.getSid());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

ip_access_control_list_mapping = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .ip_access_control_list_mappings \
        .create("AL95a47094615fe05b7c17e62a7877836c")

print(ip_access_control_list_mapping.sid)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    IpAccessControlListMapping ipAccessControlListMapping = IpAccessControlListMapping
        .creator("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .create();

    System.out.println(ipAccessControlListMapping.getSid());
  }
}
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings \
    -d "IpAccessControlListSid=AL95a47094615fe05b7c17e62a7877836c" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings.json \
    -d "IpAccessControlListSid=AL95a47094615fe05b7c17e62a7877836c" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "subresource_uris": {
        "addresses": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses.json"
    },
    "date_updated": "Wed, 11 Sep 2013 04:06:07 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c.json",
    "sid": "AL95a47094615fe05b7c17e62a7877836c",
    "date_created": "Wed, 11 Sep 2013 04:06:07 -0000"
}
<TwilioResponse>
    <IpAccessControlList>
        <Sid>AL95a47094615fe05b7c17e62a7877836c</Sid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 04:06:07 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 04:06:07 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c</Uri>
        <SubresourceUris>
          <Addresses>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses</Addresses>
        </SubresourceUris>
    </IpAccessControlList>
</TwilioResponse>
Map a IpAccessControlList to the Domain

IpAccessControlListMappings HTTP PUT

Not supported.

IpAccessControlListMappings HTTP DELETE

Remove a mapping from this domain.

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{ALSid}

Delete IpAccessControlList Mapping

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid AL95a47094615fe05b7c17e62a7877836c deleted successfully.");
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings('AL95a47094615fe05b7c17e62a7877836c')
  .remove()
  .then((data) => {
    console.log('Sid AL95a47094615fe05b7c17e62a7877836c deleted successfully.');
  })
  .catch((err) => {
    console.log(err.status);
    throw err.message;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->delete("AL95a47094615fe05b7c17e62a7877836c");
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.get("AL95a47094615fe05b7c17e62a7877836c")
@ip_access_control_list_mapping.delete
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        IpAccessControlListMappingResource.Delete(
            "SD32a3c49700934481addd5ce1659f04d2",
            "AL95a47094615fe05b7c17e62a7877836c");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").delete("AL95a47094615fe05b7c17e62a7877836c")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@sip_domain_sid = 'SD32a3c49700934481addd5ce1659f04d2'
@ip_acl_list_sid = 'AL95a47094615fe05b7c17e62a7877836c'

@ip_acl_mapping = @client.sip.domains(@sip_domain_sid)
                         .ip_access_control_list_mappings(@ip_acl_list_sid)

@ip_acl_mapping.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.IpAccessControlListMapping;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    IpAccessControlListMapping ipAccessControlListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMapping("AL95a47094615fe05b7c17e62a7877836c");
    
    ipAccessControlListMapping.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .ip_access_control_list_mappings("AL95a47094615fe05b7c17e62a7877836c") \
      .delete()
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    IpAccessControlListMapping
        .deleter("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .delete();
  }
}
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Delete a IpAccessControlList from a Domain

CredentialListMappings List Subresource

The CredentialListMappings subresource represents the CredentialLists instances associated with this domain. You can associate different CredentialLists for calls and registrations. In case of calls, if an INVITE is received for a domain with a Credential List mapped to it, Twilio will challenge the request. Your system will need to authenticate with a username and password. The username and password must be in one of the mapped lists for the INVITE to be accepted.

It's a similar case with registration. If a REGISTER is received for a domain with a Credential List mapped to it, Twilio will challenge the request. Your system will need to authenticate with a username and password. The username and password must be in one of the mapped lists for the REGISTER to be accepted. 

Resource URI for Calls

/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/Auth/Calls/CredentialListMappings

Resource URI for Registrations

/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/Auth/Registrations/CredentialListMappings

CredentialListMappings Resource Properties

A CredentialListMappings resource is represented by the following properties:

Property Description
Sid A 34 character string that uniquely identifies a CredentialList you have mapped to the domain.
AccountSid The unique id of the Account that responsible for this resource.
FriendlyName A human readable descriptive text, up to 64 characters long.
DateCreated The date that this resource was created, given as GMT in RFC 2822 format.
DateUpdated The date that this resource was last updated, given as GMT in RFC 2822 format.
Uri The URI for this resource, relative to https://api.twilio.com

CredentialListMappings HTTP GET

Get the user lists mapped to this domain that is used for calls.

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/Auth/Calls/CredentialListMappings

Get the user lists mapped to this domain that is used for registration.

GET /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/Auth/Calls/CredentialListMappings

Get a Credential List Mapping (calls)

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings.list((err, data) => {
    data.credentialListMappings.forEach(credentialListMapping => {
      console.log(credentialListMapping.FriendlyName);
    });
  });
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings.each(credentialListMapping => {
    console.log(credentialListMapping.friendlyName);
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var credentialListMappings = twilio.ListCredentialListMappings("SD32a3c49700934481addd5ce1659f04d2", null, null);
    
    foreach (var credentialListMapping in credentialListMappings.CredentialListMappings)
    {
      Console.WriteLine(credentialListMapping.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of credential_list_mappings and echo a property for each one
foreach ($client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings as $credential_list_mapping) {
    echo $credential_list_mapping->friendly_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Twilio::REST::Client.new account_sid, auth_token

# Loop over credential_list_mappings and print out a property for each one
credential_list = client.account.sip.domains
                        .get('SD32a3c49700934481addd5ce1659f04d2')
                        .credential_list_mappings.list

credential_list.each do |credential_list_mapping|
  puts credential_list_mapping.friendly_name
end
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var credentialListMappings = CredentialListMappingResource.Read(
            "SD32a3c49700934481addd5ce1659f04d2");

        foreach (var credentialListMapping in credentialListMappings)
        {
          Console.WriteLine(credentialListMapping.FriendlyName);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$credentialListMappings = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings
    ->read();

// Loop over the list of credential_list_mappings and echo a property for each one
foreach ($credentialListMappings as $credentialListMapping) {
    echo $credentialListMapping->friendlyName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of credential_list_mapping objects with the properties described above
credential_list_mappings = client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over credential_list_mappings and print out a property for each one
@client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
       .credential_list_mappings.list
       .each do |credential_list_mapping|
         puts credential_list_mapping.friendly_name
       end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;
import com.twilio.sdk.resource.list.sip.CredentialListMappingList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    CredentialListMappingList credentialListMappings = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMappings();
    
    // Loop over credentialListMappings and print out a property for each one.
    for (CredentialListMapping credentialListMapping : credentialListMappings) {
      System.out.println(credentialListMapping.getFriendlyName());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

credential_list_mappings = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .credential_list_mappings \
        .list()

# Loop over the list of credential_list_mappings and print
# a property for each one
for credential_list_mapping in credential_list_mappings:
    print(credential_list_mapping.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<CredentialListMapping> credentialListMappings =
        CredentialListMapping.reader("SD32a3c49700934481addd5ce1659f04d2").read();

    // Loop over credentialListMappings and print out a property for each one.
    for (CredentialListMapping credentialListMapping : credentialListMappings) {
      System.out.println(credentialListMapping.getFriendlyName());
    }
  }
}
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json?PageSize=50&Page=0",
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json?PageSize=50&Page=0",
    "page_size": 50,
    "next_page_uri": null,
    "credential_list_mappings": [
        {
            "subresource_uris": {
                "credentials": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials.json"
            },
            "date_updated": "Wed, 11 Sep 2013 17:51:38 -0000",
            "friendly_name": "Production Gateways IP Address - Scranton",
            "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2.json",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "sid": "CL32a3c49700934481addd5ce1659f04d2",
            "date_created": "Wed, 11 Sep 2013 17:51:38 -0000"
        },
        ...
    ],
    "page": 0
}
<TwilioResponse>
    <CredentialListMappings [paging data]>
        <CredentialListMapping>
            <Sid>CL32a3c49700934481addd5ce1659f04d2</Sid>
            <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
            <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
            <DateCreated>Wed, 11 Sep 2013 17:51:38 -0000</DateCreated>
            <DateUpdated>Wed, 11 Sep 2013 17:51:38 -0000</DateUpdated>
            <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/</Uri>
            <SubresourceUris>
                <Credentials>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials</Credentials>
            </SubresourceUris>
        </CredentialListMapping>
    </CredentialListMappings>
</TwilioResponse>
Get a CredentialListMapping

CredentialListMappings HTTP POST

Map a CredentialList to the domain (used for calls).

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/Auth/Calls/CredentialListMappings

Map a CredentialList to the domain (used for registrations).

POST /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/Auth/Registrations/CredentialListMappings

POST Parameters

The following parameters are required in your POST to CredentialListMappings:

Parameter Description
CredentialListSid The Sid of the CredentialList that you want to associate with this domain. Once associated, Twilio will start authenticating access to the domain against this list.
Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').credentialListMappings.create({
    credentialListSid: "CL32a3c49700934481addd5ce1659f04d2"
}, function(err, credentialListMapping) {
    process.stdout.write(credentialListMapping.sid);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings
  .create({
    credentialListSid: 'CL32a3c49700934481addd5ce1659f04d2',
  })
  .then((credentialListMapping) => {
    process.stdout.write(credentialListMapping.sid);
});
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    
    var credentialListMapping = twilio.CreateCredentialListMapping("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2");
    
    Console.WriteLine(credentialListMapping.Sid);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$credential_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings->create("CL32a3c49700934481addd5ce1659f04d2", array());
echo $credential_list_mapping->sid;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

credential_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').credential_list_mappings.create(:credential_list_sid => "CL32a3c49700934481addd5ce1659f04d2")
puts credential_list_mapping.friendly_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var credentialListMapping = CredentialListMappingResource.Create(
            "SD32a3c49700934481addd5ce1659f04d2",
            "CL32a3c49700934481addd5ce1659f04d2");

        Console.WriteLine(credentialListMapping.Sid);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$credentialListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings
    ->create("CL32a3c49700934481addd5ce1659f04d2");

echo $credentialListMapping->sid;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

credential_list_mapping = client.sip \
    .credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2") \
    .create(credential_list_sid="CL32a3c49700934481addd5ce1659f04d2")
print(credential_list_mapping.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@cred_list_sid = 'CL32a3c49700934481addd5ce1659f04d2'

# Get the credential mappings for the given sip domain and add a credential list
cred_list_mapping = @client.sip
                           .domains('SD32a3c49700934481addd5ce1659f04d2')
                           .credential_list_mappings
                           .create(credential_list_sid: @cred_list_sid)

puts cred_list_mapping.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.factory.sip.CredentialListMappingFactory;
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;
import com.twilio.sdk.resource.list.sip.CredentialListMappingList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the CredentialListMappingList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("CredentialListSid", "CL32a3c49700934481addd5ce1659f04d2"));
    
    
    CredentialListMappingFactory credentialListMappingFactory = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMappingFactory();
    CredentialListMapping credentialListMapping = credentialListMappingFactory.create(params);
    System.out.println(credentialListMapping.getSid());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

credential_list_mapping = client.sip \
    .domains("SD32a3c49700934481addd5ce1659f04d2") \
    .credential_list_mappings \
    .create("CL32a3c49700934481addd5ce1659f04d2")

print(credential_list_mapping.sid)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    CredentialListMapping credentialListMapping = CredentialListMapping
        .creator("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2")
        .create();

    System.out.println(credentialListMapping.getSid());
  }
}
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings \
    -d "CredentialListSid=CL32a3c49700934481addd5ce1659f04d2" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json \
    -d "CredentialListSid=CL32a3c49700934481addd5ce1659f04d2" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "subresource_uris": {
        "credentials": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials.json"
    },
    "date_updated": "Wed, 11 Sep 2013 17:51:38 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2.json",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "sid": "CL32a3c49700934481addd5ce1659f04d2",
    "date_created": "Wed, 11 Sep 2013 17:51:38 -0000"
}
<TwilioResponse>
    <CredentialListMapping>
        <Sid>CL32a3c49700934481addd5ce1659f04d2</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 17:51:38 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 17:51:38 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2</Uri>
        <SubresourceUris>
            <Credentials>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials</Credentials>
        </SubresourceUris>
    </CredentialListMapping>
</TwilioResponse>
Map a CredentialList for a domain

CredentialListMappings HTTP PUT

Not supported.

CredentialListMappings HTTP DELETE

Calls

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/Auth/Calls/CredentialListMappings/{CLSid}

Registrations

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}/Auth/Registrations/CredentialListMappings/{CLSid}

Delete a Credential List Mapping

Remove a CredentialListMapping from a domain for calls

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings('CL32a3c49700934481addd5ce1659f04d2')
  .delete((err, data) => {
    if (err) {
      console.log(err.status);
      throw err.message;
    } else {
      console.log(
        'Sid CL32a3c49700934481addd5ce1659f04d2 deleted successfully.'
      );
    }
  });
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings('CL32a3c49700934481addd5ce1659f04d2')
  .remove()
  .then(data => {
    console.log('Sid IP32a3c49700934481addd5ce1659f04d2 deleted successfully.');
  })
  .catch(err => {
    console.log(err.status);
    throw err.message;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteCredentialListMapping("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2");
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings->delete("CL32a3c49700934481addd5ce1659f04d2");
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Twilio::REST::Client.new account_sid, auth_token

credential_list_mapping = client.account.sip.domains
                                .get('SD32a3c49700934481addd5ce1659f04d2')
                                .credential_list_mappings
                                .get('CL32a3c49700934481addd5ce1659f04d2')

credential_list_mapping.delete
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        CredentialListMappingResource.Delete(
            "SD32a3c49700934481addd5ce1659f04d2",
            "CL32a3c49700934481addd5ce1659f04d2");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings("CL32a3c49700934481addd5ce1659f04d2")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").delete("CL32a3c49700934481addd5ce1659f04d2")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@sip_domain_sid = 'SD32a3c49700934481addd5ce1659f04d2'
@cred_list_mapping_sid = 'CL32a3c49700934481addd5ce1659f04d2'

@cred_list_mapping = @client.sip
                            .domains(@sip_domain_sid)
                            .credential_list_mappings(@cred_list_mapping_sid)

@cred_list_mapping.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    CredentialListMapping credentialListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMapping("CL32a3c49700934481addd5ce1659f04d2");
    
    credentialListMapping.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .credential_list_mappings("CL32a3c49700934481addd5ce1659f04d2") \
      .delete()
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    CredentialListMapping
        .deleter("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2")
        .delete();
  }
}
curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings/CL32a3c49700934481addd5ce1659f04d2 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings/CL32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Delete a CredentialListMapping

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

Loading Code Samples...
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.list((err, data) => {
  data.domains.forEach(domain => {
    console.log(domain.DomainName);
  });
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.each(domain => {
  console.log(domain.domainName);
});
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var domains = twilio.ListDomains();

    foreach (var domain in domains.Domains)
    {
      Console.WriteLine(domain.DomainName);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of domains and echo a property for each one
foreach ($client->account->sip->domains as $domain) {
    echo $domain->domain_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over domains and print out a property for each one
@client.account.sip.domains.list.each do |domain|
    puts domain.domain_name
end
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var domains = DomainResource.Read();

        foreach (var domain in domains)
        {
          Console.WriteLine(domain.DomainName);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of domains and echo a property for each one
foreach ($client->sip->domains->read() as $domain) {
    echo $domain->domainName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of domain objects with the properties described above
domains = client.sip.domains.list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over domains and print out a property for each one
@client.sip.domains.list.each do |domain|
  puts domain.domain_name
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    DomainList domains = client.getAccount().getDomains();
    
    // Loop over domains and print out a property for each one.
    for (Domain domain : domains) {
      System.out.println(domain.getDomainName());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Loop over the list of domains and print(a property for each one
for domain in client.sip.domains.list():
    print(domain.domain_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Domain> domains = Domain.reader().read();

    // Loop over domains and print out a property for each one.
    for (Domain domain : domains) {
      System.out.println(domain.getDomainName());
    }
  }
}
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json?PageSize=50&Page=0",
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json?PageSize=50&Page=0",
    "page_size": 50,
    "sip_domains": [
        {
            "auth_type": "",
            "voice_status_callback_method": "POST",
            "subresource_uris": {
                "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/IpAccessControlListMappings.json",
                "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/CredentialListMappings.json"
            },
            "date_updated": "Fri, 06 Sep 2013 18:48:50 -0000",
            "voice_status_callback_url": null,
            "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776.json",
            "friendly_name": "Scranton Office",
            "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "voice_url": "https://dundermifflin.example.com/twilio/app.php",
            "voice_method": "POST",
            "sid": "SD098e7b11c00d0ba152b1d3f084c4b776",
            "date_created": "Fri, 06 Sep 2013 18:48:50 -0000",
            "voice_fallback_method": "POST",
            "api_version": "2010-04-01",
            "voice_fallback_url": null
        },
        ...
    ],
    "next_page_uri": null,
    "page": 0
}
<TwilioResponse>
    <SipDomains [paging attributes]>
        <SipDomain>
            <Sid>SD098e7b11c00d0ba152b1d3f084c4b776</Sid>
            <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
            <FriendlyName>Scranton Office</FriendlyName>
            <ApiVersion>2010-04-01</ApiVersion>
            <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
            <AuthType/>
            <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
            <VoiceMethod>POST</VoiceMethod>
            <VoiceFallbackUrl/>
            <VoiceFallbackMethod>POST</VoiceFallbackMethod>
            <VoiceStatusCallbackUrl/>
            <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
            <DateCreated>Fri, 06 Sep 2013 18:48:50 -0000</DateCreated>
            <DateUpdated>Fri, 06 Sep 2013 18:48:50 -0000</DateUpdated>
            <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776</Uri>
            <SubresourceUris>
                <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/CredentialListMappings</CredentialListMappings>
                <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD098e7b11c00d0ba152b1d3f084c4b776/IpAccessControlListMappings</IpAccessControlListMappings>
            </SubresourceUris>
        </SipDomain>
        ...
    </SipDomains>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains.create({
    friendlyName: "My Domain",
    voiceUrl: "https://demo.twilio.com/welcome",
    authType: "IP_ACL",
    domainName: "marlo.sip.twilio.com"
}, function(err, domain) {
    process.stdout.write(domain.sid);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains.create({
    friendlyName: 'My Domain',
    voiceUrl: 'https://demo.twilio.com/welcome',
    authType: 'IP_ACL',
    domainName: 'marlo.sip.twilio.com',
})
.then((domain) => {
    process.stdout.write(domain.sid);
});
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var options = new DomainOptions();
    options.FriendlyName = "My Domain";
    options.VoiceUrl = "https://demo.twilio.com/welcome";
    options.AuthType = "IP_ACL";
    options.DomainName = "marlo.sip.twilio.com";
    var domain = twilio.CreateDomain(options);

    Console.WriteLine(domain.Sid);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

$domain = $client->account->sip->domains->create(
    "My Domain",
    "marlo.sip.twilio.com",
    array(
        "VoiceUrl" => "https://demo.twilio.com/welcome",
        "AuthType" => "IP_ACL"
    )
);
echo $domain->sid;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

domain = @client.account.sip.domains.create(:friendly_name => "My Domain",
    :voice_url => "https://demo.twilio.com/welcome",
    :auth_type => "IP_ACL",
    :domain_name => "marlo.sip.twilio.com")
puts domain.domain_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var domain = DomainResource.Create(
            "marlo.sip.twilio.com", accountSid, "My Domain", "IP_ACL",
            new Uri("https://demo.twilio.com/welcome"));

        Console.WriteLine(domain.Sid);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client
    ->sip
    ->domains
    ->create(
        "dunder-mifflin-scranton.sip.twilio.com",
        array(
            "friendlyName" => "Scranton Office",
            "voiceUrl" => "https://dundermifflin.example.com/twilio/app.php"
        )
    );

echo $domain->sid;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

domain = client.sip.domains.create(friendly_name="My Domain",
    voice_url="https://demo.twilio.com/welcome",
    auth_type="IP_ACL",
    domain_name="marlo.sip.twilio.com")
print(domain.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

domain = @client.sip.domains.create(
  friendly_name: 'My Domain',
  voice_url: 'https://demo.twilio.com/welcome',
  auth_type: 'IP_ACL',
  domain_name: 'marlo.sip.twilio.com'
)

puts domain.domain_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.factory.sip.DomainFactory;
import com.twilio.sdk.resource.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the DomainList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "My Domain"));
    params.add(new BasicNameValuePair("VoiceUrl", "https://demo.twilio.com/welcome"));
    params.add(new BasicNameValuePair("AuthType", "IP_ACL"));
    params.add(new BasicNameValuePair("DomainName", "marlo.sip.twilio.com"));
    
    
    DomainFactory domainFactory = client.getAccount().getDomainFactory();
    Domain domain = domainFactory.create(params);
    System.out.println(domain.getSid());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

domain = client.sip \
        .domains \
        .create("dunder-mifflin-scranton.sip.twilio.com",
                friendly_name="Scranton Office",
                voice_url="https://dundermifflin.example.com/twilio/app.php")

print(domain.sid)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    Domain domain = Domain.creator("marlo.sip.twilio.com")
        .setFriendlyName("My Domain")
        .setVoiceUrl("https://demo.twilio.com/welcome")
        .setAuthType("IP_ACL")
        .create();

    System.out.println(domain.getSid());
  }
}
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains \
    -d "FriendlyName=My%20Domain" \
    -d "VoiceUrl=https://demo.twilio.com/welcome" \
    -d "AuthType=IP_ACL" \
    -d "DomainName=marlo.sip.twilio.com" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains.json \
    -d "FriendlyName=My%20Domain" \
    -d "VoiceUrl=https://demo.twilio.com/welcome" \
    -d "AuthType=IP_ACL" \
    -d "DomainName=marlo.sip.twilio.com" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "POST",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD27f0288630a668bdfbf177f8e22f5ccc</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>POST</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>POST</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').get((err, domain) => {
  console.log(domain.voiceMethod);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .fetch()
  .then(domain => console.log(domain.voiceMethod));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var domain = twilio.GetDomain("SD32a3c49700934481addd5ce1659f04d2");

    Console.WriteLine(domain.VoiceMethod);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client->account->sip->domains->get("SD32a3c49700934481addd5ce1659f04d2");
echo $domain->voice_method;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2')
puts @domain.voice_method
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var domain = DomainResource.Fetch("SD32a3c49700934481addd5ce1659f04d2");

        Console.WriteLine(domain.VoiceMethod);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client->sip
    ->domains("SD27f0288630a668bdfbf177f8e22f5ccc")
    ->fetch();

echo $domain->voiceMethod;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

domain = client.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
print(domain.voice_method)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2').fetch

puts @domain.voice_method
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.Domain;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    System.out.println(domain.getVoiceMethod());
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
domain = client.sip \
               .domains("SD27f0288630a668bdfbf177f8e22f5ccc") \
               .fetch()

print(domain.voice_method)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = Domain.fetcher("SD32a3c49700934481addd5ce1659f04d2").fetch();

    System.out.println(domain.getVoiceMethod());
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "POST",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD27f0288630a668bdfbf177f8e22f5ccc</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>POST</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>POST</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains("SD32a3c49700934481addd5ce1659f04d2").update({
    friendlyName: "Little Kevin",
    voiceMethod: "GET"
}, function(err, domain) {
    console.log(domain.domainName);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .update({
    friendlyName: 'Little Kevin',
    voiceMethod: 'GET',
  })
  .then((domain) => {
    console.log(domain.domainName);
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var options = new DomainOptions();
    options.FriendlyName = "Little Kevin";
    options.VoiceMethod = "GET";

    twilio.UpdateDomain("SD32a3c49700934481addd5ce1659f04d2", options);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client->account->sip->domains->get("SD32a3c49700934481addd5ce1659f04d2");
$domain->update(array(
        "FriendlyName" => "Little Kevin",
    "VoiceMethod" => "GET"
    ));
echo $domain->domain_name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
@domain.update(:friendly_name => "Little Kevin",
    :voice_method => "GET")
puts @domain.domain_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        DomainResource.Update("SD32a3c49700934481addd5ce1659f04d2",
            friendlyName: "Little Kevin", voiceMethod: "GET");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$domain = $client->sip
    ->domains("SD27f0288630a668bdfbf177f8e22f5ccc")
    ->update(
        array(
            "friendlyName" => "Little Kevin",
            "voiceMethod" => "GET"
        )
    );

echo $domain->domainName;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

domain = client.sip.domains.update("SD32a3c49700934481addd5ce1659f04d2", friendly_name="Little Kevin",
    voice_method="GET")
print(domain.domain_name)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@domain = @client.account.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2').fetch

@domain.update(
  friendly_name: 'Little Kevin',
  voice_method: 'GET'
)

puts @domain.domain_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.Domain;
import com.twilio.sdk.resource.list.sip.DomainList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    // Build a filter for the DomainList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("FriendlyName", "Little Kevin"));
    params.add(new BasicNameValuePair("VoiceMethod", "GET"));
    domain.update(params);
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
domain = client.sip \
        .domains("SD27f0288630a668bdfbf177f8e22f5ccc") \
        .update(friendly_name="Little Kevin", voice_method="GET")

print(domain.domain_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.http.HttpMethod;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = Domain.updater("SD32a3c49700934481addd5ce1659f04d2")
        .setFriendlyName("Little Kevin")
        .setVoiceMethod(HttpMethod.GET)
        .update();

    System.out.println(domain.getDateUpdated());
  }
}
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -d "FriendlyName=Little%20Kevin" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -d "FriendlyName=Little%20Kevin" \
    -d "VoiceMethod=GET" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "auth_type": "IP_ACL",
    "voice_status_callback_method": "POST",
    "subresource_uris": {
        "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings.json",
        "credential_list_mappings": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings.json"
    },
    "date_updated": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_status_callback_url": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc.json",
    "friendly_name": "Scranton Office Dev",
    "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "voice_url": "https://dundermifflin.example.com/twilio/app.php",
    "voice_method": "GET",
    "sid": "SD27f0288630a668bdfbf177f8e22f5ccc",
    "date_created": "Fri, 06 Sep 2013 19:18:30 -0000",
    "voice_fallback_method": "POST",
    "api_version": "2010-04-01",
    "voice_fallback_url": null
}
<TwilioResponse>
    <SipDomain>
        <Sid>SD32a3c49700934481addd5ce1659f04d2</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Scranton Office Dev</FriendlyName>
        <ApiVersion>2010-04-01</ApiVersion>
        <DomainName>dunder-mifflin-scranton.sip.twilio.com</DomainName>
        <AuthType/>
        <VoiceUrl>https://dundermifflin.example.com/twilio/app.php</VoiceUrl>
        <VoiceMethod>GET</VoiceMethod>
        <VoiceFallbackUrl/>
        <VoiceFallbackMethod>GET</VoiceFallbackMethod>
        <VoiceStatusCallbackUrl/>
        <VoiceStatusCallbackMethod>POST</VoiceStatusCallbackMethod>
        <DateCreated>Fri, 06 Sep 2013 19:18:30 -0000</DateCreated>
        <DateUpdated>Fri, 06 Sep 2013 19:18:30 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc</Uri>
        <SubresourceUris>
            <CredentialListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/CredentialListMappings</CredentialListMappings>
            <IpAccessControlListMappings>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD27f0288630a668bdfbf177f8e22f5ccc/IpAccessControlListMappings</IpAccessControlListMappings>
        </SubresourceUris>
    </SipDomain>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains("SD32a3c49700934481addd5ce1659f04d2").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid SD32a3c49700934481addd5ce1659f04d2 deleted successfully.");
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .remove()
  .then((data) => {
    console.log('Sid IP32a3c49700934481addd5ce1659f04d2 deleted successfully.');
  })
  .catch((err) => {
    console.log(err.status);
    throw err.message;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteDomain("SD32a3c49700934481addd5ce1659f04d2");
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->sip->domains->delete("SD32a3c49700934481addd5ce1659f04d2");
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@domain = @client.account.sip.domains.get("SD32a3c49700934481addd5ce1659f04d2")
@domain.delete
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        DomainResource.Delete("SD32a3c49700934481addd5ce1659f04d2");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.sip.domains.delete("SD32a3c49700934481addd5ce1659f04d2")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@domain = @client.sip
                 .domains('SD32a3c49700934481addd5ce1659f04d2')
                 .fetch

@domain.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.Domain;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain domain = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2");
    
    domain.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .delete()
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.Domain;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Domain.deleter("SD32a3c49700934481addd5ce1659f04d2").delete();
  }
}
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c").get(function(err, ipAccessControlListMapping) {
    console.log(ipAccessControlListMapping.friendlyName);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings('AL95a47094615fe05b7c17e62a7877836c')
  .fetch()
  .then((ipAccessControlListMapping) => {
    console.log(ipAccessControlListMapping.friendlyName);
});
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var ipAccessControlListMapping = twilio.GetIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
    
    Console.WriteLine(ipAccessControlListMapping.FriendlyName);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$ip_access_control_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->get("AL95a47094615fe05b7c17e62a7877836c");
echo $ip_access_control_list_mapping->friendly_name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.get("AL95a47094615fe05b7c17e62a7877836c")
puts @ip_access_control_list_mapping.friendly_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var ipAccessControlListMapping = IpAccessControlListMappingResource
            .Fetch("SD32a3c49700934481addd5ce1659f04d2",
                   "AL95a47094615fe05b7c17e62a7877836c");

        Console.WriteLine(ipAccessControlListMapping.FriendlyName);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$ipAccessControlListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c")
    ->fetch();

echo $ipAccessControlListMapping->friendlyName;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

ip_access_control_list_mapping = client.sip \
    .ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2") \
    .get("AL95a47094615fe05b7c17e62a7877836c")
print(ip_access_control_list_mapping.friendly_name)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@ip_acl_list_map_sid = 'AL95a47094615fe05b7c17e62a7877836c'

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@ip_acl_list_map = @client.sip
                          .domains('SD32a3c49700934481addd5ce1659f04d2')
                          .ip_access_control_list_mappings(@ip_acl_list_map_sid)
                          .fetch

puts @ip_acl_list_map.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.IpAccessControlListMapping;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    IpAccessControlListMapping ipAccessControlListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMapping("AL95a47094615fe05b7c17e62a7877836c");
    System.out.println(ipAccessControlListMapping.getFriendlyName());
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
ip_access_control_list_mapping = client.sip \
    .domains("SD32a3c49700934481addd5ce1659f04d2") \
    .ip_access_control_list_mappings("AL95a47094615fe05b7c17e62a7877836c") \
    .fetch()

print(ip_access_control_list_mapping.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    IpAccessControlListMapping ipAccessControlListMapping = IpAccessControlListMapping
        .fetcher("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .fetch();

    System.out.println(ipAccessControlListMapping.getFriendlyName());
  }
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "subresource_uris": {
        "addresses": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses.json"
    },
    "date_updated": "Wed, 11 Sep 2013 04:06:07 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c.json",
    "sid": "AL95a47094615fe05b7c17e62a7877836c",
    "date_created": "Wed, 11 Sep 2013 04:06:07 -0000"
}
<TwilioResponse>
    <IpAccessControlList>
        <Sid>AL95a47094615fe05b7c17e62a7877836c</Sid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 04:06:07 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 04:06:07 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c</Uri>
        <SubresourceUris>
          <Addresses>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses</Addresses>
        </SubresourceUris>
    </IpAccessControlList>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings.create({
    ipAccessControlListSid: "AL95a47094615fe05b7c17e62a7877836c"
}, function(err, ipAccessControlListMapping) {
    process.stdout.write(ipAccessControlListMapping.sid);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings
  .create({
    ipAccessControlListSid: 'AL95a47094615fe05b7c17e62a7877836c',
  })
  .then((ipAccessControlListMapping) => {
    process.stdout.write(ipAccessControlListMapping.sid);
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    
    var ipAccessControlListMapping = twilio.CreateIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
    
    Console.WriteLine(ipAccessControlListMapping.Sid);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$ip_access_control_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->create("AL95a47094615fe05b7c17e62a7877836c", array());
echo $ip_access_control_list_mapping->sid;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.create(:ip_access_control_list_sid => "AL95a47094615fe05b7c17e62a7877836c")
puts ip_access_control_list_mapping.friendly_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var ipAccessControlListMapping = IpAccessControlListMappingResource
            .Create("SD32a3c49700934481addd5ce1659f04d2",
                "AL95a47094615fe05b7c17e62a7877836c");

        Console.WriteLine(ipAccessControlListMapping.Sid);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$ipAccessControlListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings
    ->create("AL95a47094615fe05b7c17e62a7877836c");

echo $ipAccessControlListMapping->sid;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

ip_access_control_list_mapping = client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").create(ip_access_control_list_sid="AL95a47094615fe05b7c17e62a7877836c")
print(ip_access_control_list_mapping.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@ip_acl_list_sid = 'AL95a47094615fe05b7c17e62a7877836c'

ip_acl_map = @client.sip
                    .domains('SD32a3c49700934481addd5ce1659f04d2')
                    .ip_access_control_list_mappings
                    .create(ip_access_control_list_sid: @ip_acl_list_sid)

puts ip_acl_map.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.factory.sip.IpAccessControlListMappingFactory;
import com.twilio.sdk.resource.instance.sip.IpAccessControlListMapping;
import com.twilio.sdk.resource.list.sip.IpAccessControlListMappingList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the IpAccessControlListMappingList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("IpAccessControlListSid", "AL95a47094615fe05b7c17e62a7877836c"));
    
    
    IpAccessControlListMappingFactory ipAccessControlListMappingFactory = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMappingFactory();
    IpAccessControlListMapping ipAccessControlListMapping = ipAccessControlListMappingFactory.create(params);
    System.out.println(ipAccessControlListMapping.getSid());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

ip_access_control_list_mapping = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .ip_access_control_list_mappings \
        .create("AL95a47094615fe05b7c17e62a7877836c")

print(ip_access_control_list_mapping.sid)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    IpAccessControlListMapping ipAccessControlListMapping = IpAccessControlListMapping
        .creator("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .create();

    System.out.println(ipAccessControlListMapping.getSid());
  }
}
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings \
    -d "IpAccessControlListSid=AL95a47094615fe05b7c17e62a7877836c" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings.json \
    -d "IpAccessControlListSid=AL95a47094615fe05b7c17e62a7877836c" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "subresource_uris": {
        "addresses": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses.json"
    },
    "date_updated": "Wed, 11 Sep 2013 04:06:07 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c.json",
    "sid": "AL95a47094615fe05b7c17e62a7877836c",
    "date_created": "Wed, 11 Sep 2013 04:06:07 -0000"
}
<TwilioResponse>
    <IpAccessControlList>
        <Sid>AL95a47094615fe05b7c17e62a7877836c</Sid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 04:06:07 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 04:06:07 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c</Uri>
        <SubresourceUris>
          <Addresses>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/IpAccessControlLists/AL95a47094615fe05b7c17e62a7877836c/Addresses</Addresses>
        </SubresourceUris>
    </IpAccessControlList>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid AL95a47094615fe05b7c17e62a7877836c deleted successfully.");
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .ipAccessControlListMappings('AL95a47094615fe05b7c17e62a7877836c')
  .remove()
  .then((data) => {
    console.log('Sid AL95a47094615fe05b7c17e62a7877836c deleted successfully.');
  })
  .catch((err) => {
    console.log(err.status);
    throw err.message;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteIpAccessControlListMapping("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c");
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->ip_access_control_list_mappings->delete("AL95a47094615fe05b7c17e62a7877836c");
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@ip_access_control_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').ip_access_control_list_mappings.get("AL95a47094615fe05b7c17e62a7877836c")
@ip_access_control_list_mapping.delete
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        IpAccessControlListMappingResource.Delete(
            "SD32a3c49700934481addd5ce1659f04d2",
            "AL95a47094615fe05b7c17e62a7877836c");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->ipAccessControlListMappings("AL95a47094615fe05b7c17e62a7877836c")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.sip.ip_access_control_list_mappings("SD32a3c49700934481addd5ce1659f04d2").delete("AL95a47094615fe05b7c17e62a7877836c")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@sip_domain_sid = 'SD32a3c49700934481addd5ce1659f04d2'
@ip_acl_list_sid = 'AL95a47094615fe05b7c17e62a7877836c'

@ip_acl_mapping = @client.sip.domains(@sip_domain_sid)
                         .ip_access_control_list_mappings(@ip_acl_list_sid)

@ip_acl_mapping.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.IpAccessControlListMapping;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    IpAccessControlListMapping ipAccessControlListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getIpAccessControlListMapping("AL95a47094615fe05b7c17e62a7877836c");
    
    ipAccessControlListMapping.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .ip_access_control_list_mappings("AL95a47094615fe05b7c17e62a7877836c") \
      .delete()
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    IpAccessControlListMapping
        .deleter("SD32a3c49700934481addd5ce1659f04d2", "AL95a47094615fe05b7c17e62a7877836c")
        .delete();
  }
}
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/IpAccessControlListMappings/AL95a47094615fe05b7c17e62a7877836c.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings.list((err, data) => {
    data.credentialListMappings.forEach(credentialListMapping => {
      console.log(credentialListMapping.FriendlyName);
    });
  });
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings.each(credentialListMapping => {
    console.log(credentialListMapping.friendlyName);
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var credentialListMappings = twilio.ListCredentialListMappings("SD32a3c49700934481addd5ce1659f04d2", null, null);
    
    foreach (var credentialListMapping in credentialListMappings.CredentialListMappings)
    {
      Console.WriteLine(credentialListMapping.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of credential_list_mappings and echo a property for each one
foreach ($client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings as $credential_list_mapping) {
    echo $credential_list_mapping->friendly_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Twilio::REST::Client.new account_sid, auth_token

# Loop over credential_list_mappings and print out a property for each one
credential_list = client.account.sip.domains
                        .get('SD32a3c49700934481addd5ce1659f04d2')
                        .credential_list_mappings.list

credential_list.each do |credential_list_mapping|
  puts credential_list_mapping.friendly_name
end
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var credentialListMappings = CredentialListMappingResource.Read(
            "SD32a3c49700934481addd5ce1659f04d2");

        foreach (var credentialListMapping in credentialListMappings)
        {
          Console.WriteLine(credentialListMapping.FriendlyName);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$credentialListMappings = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings
    ->read();

// Loop over the list of credential_list_mappings and echo a property for each one
foreach ($credentialListMappings as $credentialListMapping) {
    echo $credentialListMapping->friendlyName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of credential_list_mapping objects with the properties described above
credential_list_mappings = client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").list()
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over credential_list_mappings and print out a property for each one
@client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
       .credential_list_mappings.list
       .each do |credential_list_mapping|
         puts credential_list_mapping.friendly_name
       end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;
import com.twilio.sdk.resource.list.sip.CredentialListMappingList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    CredentialListMappingList credentialListMappings = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMappings();
    
    // Loop over credentialListMappings and print out a property for each one.
    for (CredentialListMapping credentialListMapping : credentialListMappings) {
      System.out.println(credentialListMapping.getFriendlyName());
    }
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

credential_list_mappings = client.sip \
        .domains("SD32a3c49700934481addd5ce1659f04d2") \
        .credential_list_mappings \
        .list()

# Loop over the list of credential_list_mappings and print
# a property for each one
for credential_list_mapping in credential_list_mappings:
    print(credential_list_mapping.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<CredentialListMapping> credentialListMappings =
        CredentialListMapping.reader("SD32a3c49700934481addd5ce1659f04d2").read();

    // Loop over credentialListMappings and print out a property for each one.
    for (CredentialListMapping credentialListMapping : credentialListMappings) {
      System.out.println(credentialListMapping.getFriendlyName());
    }
  }
}
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json?PageSize=50&Page=0",
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json?PageSize=50&Page=0",
    "page_size": 50,
    "next_page_uri": null,
    "credential_list_mappings": [
        {
            "subresource_uris": {
                "credentials": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials.json"
            },
            "date_updated": "Wed, 11 Sep 2013 17:51:38 -0000",
            "friendly_name": "Production Gateways IP Address - Scranton",
            "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2.json",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "sid": "CL32a3c49700934481addd5ce1659f04d2",
            "date_created": "Wed, 11 Sep 2013 17:51:38 -0000"
        },
        ...
    ],
    "page": 0
}
<TwilioResponse>
    <CredentialListMappings [paging data]>
        <CredentialListMapping>
            <Sid>CL32a3c49700934481addd5ce1659f04d2</Sid>
            <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
            <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
            <DateCreated>Wed, 11 Sep 2013 17:51:38 -0000</DateCreated>
            <DateUpdated>Wed, 11 Sep 2013 17:51:38 -0000</DateUpdated>
            <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/</Uri>
            <SubresourceUris>
                <Credentials>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials</Credentials>
            </SubresourceUris>
        </CredentialListMapping>
    </CredentialListMappings>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2').credentialListMappings.create({
    credentialListSid: "CL32a3c49700934481addd5ce1659f04d2"
}, function(err, credentialListMapping) {
    process.stdout.write(credentialListMapping.sid);
});
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip.domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings
  .create({
    credentialListSid: 'CL32a3c49700934481addd5ce1659f04d2',
  })
  .then((credentialListMapping) => {
    process.stdout.write(credentialListMapping.sid);
});
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    
    var credentialListMapping = twilio.CreateCredentialListMapping("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2");
    
    Console.WriteLine(credentialListMapping.Sid);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$credential_list_mapping = $client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings->create("CL32a3c49700934481addd5ce1659f04d2", array());
echo $credential_list_mapping->sid;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

credential_list_mapping = @client.account.sip.domains.get('SD32a3c49700934481addd5ce1659f04d2').credential_list_mappings.create(:credential_list_sid => "CL32a3c49700934481addd5ce1659f04d2")
puts credential_list_mapping.friendly_name
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var credentialListMapping = CredentialListMappingResource.Create(
            "SD32a3c49700934481addd5ce1659f04d2",
            "CL32a3c49700934481addd5ce1659f04d2");

        Console.WriteLine(credentialListMapping.Sid);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$credentialListMapping = $client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings
    ->create("CL32a3c49700934481addd5ce1659f04d2");

echo $credentialListMapping->sid;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

credential_list_mapping = client.sip \
    .credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2") \
    .create(credential_list_sid="CL32a3c49700934481addd5ce1659f04d2")
print(credential_list_mapping.sid)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@cred_list_sid = 'CL32a3c49700934481addd5ce1659f04d2'

# Get the credential mappings for the given sip domain and add a credential list
cred_list_mapping = @client.sip
                           .domains('SD32a3c49700934481addd5ce1659f04d2')
                           .credential_list_mappings
                           .create(credential_list_sid: @cred_list_sid)

puts cred_list_mapping.friendly_name
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.factory.sip.CredentialListMappingFactory;
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;
import com.twilio.sdk.resource.list.sip.CredentialListMappingList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the CredentialListMappingList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("CredentialListSid", "CL32a3c49700934481addd5ce1659f04d2"));
    
    
    CredentialListMappingFactory credentialListMappingFactory = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMappingFactory();
    CredentialListMapping credentialListMapping = credentialListMappingFactory.create(params);
    System.out.println(credentialListMapping.getSid());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

credential_list_mapping = client.sip \
    .domains("SD32a3c49700934481addd5ce1659f04d2") \
    .credential_list_mappings \
    .create("CL32a3c49700934481addd5ce1659f04d2")

print(credential_list_mapping.sid)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    CredentialListMapping credentialListMapping = CredentialListMapping
        .creator("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2")
        .create();

    System.out.println(credentialListMapping.getSid());
  }
}
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings \
    -d "CredentialListSid=CL32a3c49700934481addd5ce1659f04d2" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings.json \
    -d "CredentialListSid=CL32a3c49700934481addd5ce1659f04d2" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "subresource_uris": {
        "credentials": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials.json"
    },
    "date_updated": "Wed, 11 Sep 2013 17:51:38 -0000",
    "friendly_name": "Production Gateways IP Address - Scranton",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2.json",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "sid": "CL32a3c49700934481addd5ce1659f04d2",
    "date_created": "Wed, 11 Sep 2013 17:51:38 -0000"
}
<TwilioResponse>
    <CredentialListMapping>
        <Sid>CL32a3c49700934481addd5ce1659f04d2</Sid>
        <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
        <FriendlyName>Production Gateways IP Address - Scranton</FriendlyName>
        <DateCreated>Wed, 11 Sep 2013 17:51:38 -0000</DateCreated>
        <DateUpdated>Wed, 11 Sep 2013 17:51:38 -0000</DateUpdated>
        <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2</Uri>
        <SubresourceUris>
            <Credentials>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/CredentialLists/CL32a3c49700934481addd5ce1659f04d2/Credentials</Credentials>
        </SubresourceUris>
    </CredentialListMapping>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings('CL32a3c49700934481addd5ce1659f04d2')
  .delete((err, data) => {
    if (err) {
      console.log(err.status);
      throw err.message;
    } else {
      console.log(
        'Sid CL32a3c49700934481addd5ce1659f04d2 deleted successfully.'
      );
    }
  });
// Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.sip
  .domains('SD32a3c49700934481addd5ce1659f04d2')
  .credentialListMappings('CL32a3c49700934481addd5ce1659f04d2')
  .remove()
  .then(data => {
    console.log('Sid IP32a3c49700934481addd5ce1659f04d2 deleted successfully.');
  })
  .catch(err => {
    console.log(err.status);
    throw err.message;
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteCredentialListMapping("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2");
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->sip->domains->get('SD32a3c49700934481addd5ce1659f04d2')->credential_list_mappings->delete("CL32a3c49700934481addd5ce1659f04d2");
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems' # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Twilio::REST::Client.new account_sid, auth_token

credential_list_mapping = client.account.sip.domains
                                .get('SD32a3c49700934481addd5ce1659f04d2')
                                .credential_list_mappings
                                .get('CL32a3c49700934481addd5ce1659f04d2')

credential_list_mapping.delete
// Download the twilio-csharp library from
// https://www.twilio.com/docs/libraries/csharp#installation
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.Domain;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/user/account
        string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        CredentialListMappingResource.Delete(
            "SD32a3c49700934481addd5ce1659f04d2",
            "CL32a3c49700934481addd5ce1659f04d2");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->sip
    ->domains("SD32a3c49700934481addd5ce1659f04d2")
    ->credentialListMappings("CL32a3c49700934481addd5ce1659f04d2")
    ->delete();
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.sip.credential_list_mappings("SD32a3c49700934481addd5ce1659f04d2").delete("CL32a3c49700934481addd5ce1659f04d2")
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@sip_domain_sid = 'SD32a3c49700934481addd5ce1659f04d2'
@cred_list_mapping_sid = 'CL32a3c49700934481addd5ce1659f04d2'

@cred_list_mapping = @client.sip
                            .domains(@sip_domain_sid)
                            .credential_list_mappings(@cred_list_mapping_sid)

@cred_list_mapping.delete
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    CredentialListMapping credentialListMapping = client.getAccount().getDomain("SD32a3c49700934481addd5ce1659f04d2").getCredentialListMapping("CL32a3c49700934481addd5ce1659f04d2");
    
    credentialListMapping.delete();
    
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

client.sip \
      .domains("SD32a3c49700934481addd5ce1659f04d2") \
      .credential_list_mappings("CL32a3c49700934481addd5ce1659f04d2") \
      .delete()
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    CredentialListMapping
        .deleter("SD32a3c49700934481addd5ce1659f04d2", "CL32a3c49700934481addd5ce1659f04d2")
        .delete();
  }
}
curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SIP/Domains/SD32a3c49700934481addd5ce1659f04d2/CredentialListMappings/CL32a3c49700934481addd5ce1659f04d2 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
curl -XDELETE https://api.twilio.com/20