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
Resource properties
account_sidtype: SID<AC>Not PII

sidtype: SID<IL>Not PII

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


friendly_nametype: stringNot PII

The string that you assigned to describe the resource.


ip_addresstype: stringPII MTL: 30 days

An IP address in dotted decimal notation, IPv4 only.


cidr_prefix_lengthtype: integerNot PII

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_createdtype: string<DATE TIME>Not PII

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


date_updatedtype: string<DATE TIME>Not PII

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


urltype: string<URI>Not PII

The absolute URL of the resource.


Create an IpRecord resource

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

Parameters

create-parameters page anchor
Request body parameters
IpAddresstype: stringPII MTL: 30 days
Required

An IP address in dotted decimal notation, IPv4 only.


FriendlyNametype: stringNot PII

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


CidrPrefixLengthtype: integerNot PII

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.

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}

URI parameters
Sidtype: SID<IL>Not PII
Path Parameter

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

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

URI parameters
PageSizetype: integerNot PII
Query Parameter

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


Pagetype: integerNot PII
Query Parameter

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


PageTokentype: stringNot PII
Query Parameter

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}

URI parameters
Sidtype: SID<IL>Not PII
Path Parameter

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


Request body parameters
FriendlyNametype: stringNot PII

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}

URI parameters
Sidtype: SID<IL>Not PII
Path Parameter

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

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: