Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

IpRecord Resource


The IpRecord resource describe Static IP addresses used to address the BYOC Trunk's Termination SIP Domain via an IP Address instead of an FQDN (Fully Qualified Domain Name).

(warning)

Warning

The IP Address used in this resource must be a subset of a Twilio Interconnect connection configured on the same Account.


IpRecord Properties

iprecord-properties page anchor
account_sidSID<AC>
Not PII

The SID of the Account(link takes you to an external page) that created the IP Record resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

sidSID<IL>

The unique string that we created to identify the IP Record resource.

Pattern: ^IL[0-9a-fA-F]{32}$Min length: 34Max length: 34

friendly_namestring

The string that you assigned to describe the resource.


ip_addressstring
PII MTL: 30 days

An IP address in dotted decimal notation, IPv4 only.


cidr_prefix_lengthinteger

An integer representing the length of the CIDR(link takes you to an external page) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32.


date_createdstring<date-time>

The date and time in GMT that the resource was created specified in RFC 2822(link takes you to an external page) format.


date_updatedstring<date-time>

The date and time in GMT that the resource was last updated specified in RFC 2822(link takes you to an external page) format.


urlstring<uri>

The absolute URL of the resource.


Create an IpRecord resource

create-an-iprecord-resource page anchor
POST https://voice.twilio.com/v1/IpRecords

Request body parameters

request-body-parameters page anchor
IpAddressstringrequired

An IP address in dotted decimal notation, IPv4 only.


FriendlyNamestring

A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.


CidrPrefixLengthinteger

An integer representing the length of the CIDR(link takes you to an external page) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32.

Create an IpRecord

create-an-iprecord page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.voice.v1.ipRecords
_10
.create({ipAddress: 'ip_address'})
_10
.then(ip_record => console.log(ip_record.sid));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"sid": "ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"friendly_name": "friendly_name",
_10
"ip_address": "10.2.3.4",
_10
"cidr_prefix_length": 30,
_10
"date_created": "2020-03-18T23:31:36Z",
_10
"date_updated": "2020-03-18T23:31:36Z",
_10
"url": "https://voice.twilio.com/v1/IpRecords/ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}


Fetch an IpRecord resource

fetch-an-iprecord-resource page anchor
GET https://voice.twilio.com/v1/IpRecords/{Sid}

SidSID<IL>required

The Twilio-provided string that uniquely identifies the IP Record resource to fetch.

Pattern: ^IL[0-9a-fA-F]{32}$Min length: 34Max length: 34
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.voice.v1.ipRecords('ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.fetch()
_10
.then(ip_record => console.log(ip_record.friendlyName));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"sid": "ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"friendly_name": "friendly_name",
_10
"ip_address": "10.2.3.4",
_10
"cidr_prefix_length": 30,
_10
"date_created": "2020-03-18T23:31:36Z",
_10
"date_updated": "2020-03-18T23:31:37Z",
_10
"url": "https://voice.twilio.com/v1/IpRecords/ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}


Read multiple IpRecord resources

read-multiple-iprecord-resources page anchor
GET https://voice.twilio.com/v1/IpRecords

PageSizeinteger

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

Pageinteger

The page index. This value is simply for client state.

Minimum: 0

PageTokenstring

The page token. This is provided by the API.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.voice.v1.ipRecords
_10
.list({limit: 20})
_10
.then(ipRecords => ipRecords.forEach(i => console.log(i.sid)));

Output

_23
{
_23
"meta": {
_23
"page": 0,
_23
"page_size": 50,
_23
"first_page_url": "https://voice.twilio.com/v1/IpRecords?PageSize=50&Page=0",
_23
"previous_page_url": "https://voice.twilio.com/v1/IpRecords?PageSize=50&Page=0",
_23
"url": "https://voice.twilio.com/v1/IpRecords?PageSize=50&Page=0",
_23
"next_page_url": "https://voice.twilio.com/v1/IpRecords?PageSize=50&Page=1",
_23
"key": "ip_records"
_23
},
_23
"ip_records": [
_23
{
_23
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23
"sid": "ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23
"friendly_name": "friendly_name",
_23
"ip_address": "10.2.3.4",
_23
"cidr_prefix_length": 30,
_23
"date_created": "2020-03-18T23:31:36Z",
_23
"date_updated": "2020-03-18T23:31:37Z",
_23
"url": "https://voice.twilio.com/v1/IpRecords/ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_23
}
_23
]
_23
}


Update an IpRecord resource

update-an-iprecord-resource page anchor
POST https://voice.twilio.com/v1/IpRecords/{Sid}

SidSID<IL>required

The Twilio-provided string that uniquely identifies the IP Record resource to update.

Pattern: ^IL[0-9a-fA-F]{32}$Min length: 34Max length: 34
FriendlyNamestring

A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.voice.v1.ipRecords('ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.update({friendlyName: 'friendly_name'})
_10
.then(ip_record => console.log(ip_record.friendlyName));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"sid": "ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"friendly_name": "update_name",
_10
"ip_address": "10.2.3.4",
_10
"cidr_prefix_length": 30,
_10
"date_created": "2020-03-18T23:31:36Z",
_10
"date_updated": "2020-03-18T23:31:37Z",
_10
"url": "https://voice.twilio.com/v1/IpRecords/ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}


Delete an IpRecord resource

delete-an-iprecord-resource page anchor
DELETE https://voice.twilio.com/v1/IpRecords/{Sid}

SidSID<IL>required

The Twilio-provided string that uniquely identifies the IP Record resource to delete.

Pattern: ^IL[0-9a-fA-F]{32}$Min length: 34Max length: 34
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.voice.v1.ipRecords('ILXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();


Rate this page: