Get Started

REST API: SIP IP Access Control Lists

Overview

An IP Access Control List is a set of IPs that are allowed to reach your SIP Domain. If you or anyone sends traffic from any IP not on the list, Twilio will block that SIP traffic.

After you create an IP Access Control List, you then need to [map it to your SIP domain][/docs/sip] to make it take effect. You can apply a list to one or more SIP Domains.

Resource Properties

A IpAccessControlList instance resource has the following properties:

Property Description
Sid A 34 character string that uniquely identifies this resource.
AccountSid The unique id of the Account that sent this message.
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

SIP IpAccessControlLists List Resource

The SIP/IpAccessControlLists resource lists the IP Access Control Lists for an account and allows new ones to be created.

Resource URI

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

HTTP GET

Return a paged list of all IpAccessControlLists under this account.

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

HTTP POST

Create a new IpAccessControlList resource.

When created, the list will contain no IP addresses. You will need to add IP addresses to the list for it to be active. To add IP addresses, you will need to POST to the IpAddresses List subresource.

POST /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists
POST Parameters

The following parameters are required in your POST to IpAccessControlLists:

Parameter Description
FriendlyName A human readable descriptive text that describes the IpAccessControlList, up to 64 characters long.

Example

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

IpAccessControlList Instance Resource

The IpAccessControlList instance resource allows you to view, rename and delete individual IP Access Control Lists.

The instance resource is represented by the properties above.

Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}

HTTP GET

Return a specific IpAccessControlList resource.

GET /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}
Example

HTTP POST

Rename an IpAccessControlList.

POST /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}
POST Parameters

The following parameters are required in your POST to the IpAccessControlList instance:

Parameter Description
FriendlyName A human readable descriptive text that describes the IpAccessControlList, up to 64 characters long.

Example

HTTP PUT

Not supported.

HTTP DELETE

Delete an IpAccessControlList from your account. It can only be deleted if no domains are mapped to it. If you attempt to delete one that is mapped to a domain, you will receive an error.

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

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}
Example

IpAccessControlList Subresources

IpAccessControlList IpAddresses List Subresource

The IpAddresses subresource of an IpAccessControlList resource represents the IP Addresses that the list contains. You may add up to 25 IP addresses for each IP Access Control List. You must specify a full IP address; no IP wildcarding is supported.

Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses

Resource Properties

An IpAddress instance resource is represented by the following properties:

Property Description
Sid A 34 character string that uniquely identifies an IP address in the list.
AccountSid The unique id of the Account that responsible for this resource.
FriendlyName A human readable descriptive text for this resource, up to 64 characters long.
IpAddress An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today.
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

HTTP GET

List the IP Addresses contained in this list.

GET /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{AclSid}/IpAddresses
Example

HTTP POST

Add an IP Address to the list with a description.

POST /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{AclSid}/IpAddresses
POST Parameters

The following parameters are required in your POST to the IpAddresses:

Parameter Description
FriendlyName A human readable descriptive text for the an IP address, up to 64 characters long.
IpAddress An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today.

Example

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

IpAccessControlList IpAddress Instance Subresource

The IpAddress Instance subresource represents a single IP Address entry in the list.

Resource URI

/2010-04-01/Accounts/{AccountSid}/SIP//IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{IpAddressSid}

HTTP GET

Return a single IP Address resource.

GET /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{AclSid}/IpAddresses/{IpAddressSid}
Example

HTTP POST

Change the description or IP address of a given IpAddress instance resource

POST /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{AclSid}/IpAddresses/{IpAddressSid}
POST Parameters

The following parameters are required in your POST to the IpAddress instance:

Parameter Description
FriendlyName A human readable descriptive text for the an IP address, up to 64 characters long.
IpAddress An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today.

Example

HTTP PUT

Not supported.

HTTP DELETE

Deletes an IP address entry from the list.

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

DELETE /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{AclSid}/IpAddresses/{IpAddressSid}
Example