Sample - Twilio API
POST/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json

Create an IP address resource

Creates an IP address resource in an IP access control list. Submit the required FriendlyName and IpAddress values as form data, and optionally set the CIDR prefix length.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 3 body fields
AccountSidstringrequired
The unique identifier of the account responsible for the IP address resource. Must be a 34-character SID matching `AC` followed by 32 hexadecimal characters.
IpAccessControlListSidstringrequired
The unique identifier of the IP access control list to associate with the new IP address. Must be a 34-character SID matching `AL` followed by 32 hexadecimal characters.

Form data defining an IPv4 address and its access control list metadata.

FriendlyNamestringrequired
A human readable descriptive text for this resource, up to 255 characters long.
IpAddressstringrequired
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.
CidrPrefixLengthintegeroptional
An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used.

1 status code
201Returns the created IP address resource, including its SID, account and list identifiers, friendly name, IPv4 address, CIDR prefix length, timestamps, and resource URI.
sidstringoptional
A 34 character string that uniquely identifies this resource.
account_sidstringoptional
The unique id of the Account that is responsible for this resource.
friendly_namestringoptional
A human readable descriptive text for this resource, up to 255 characters long.
ip_addressstringoptional
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.
cidr_prefix_lengthintegeroptional
An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used.
Default:0
ip_access_control_list_sidstringoptional
The unique id of the IpAccessControlList resource that includes this resource.
date_createdstringoptional
The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
date_updatedstringoptional
The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
uristringoptional
The URI for this resource, relative to `https://api.twilio.com`

Error handling

AccountSid and IpAccessControlListSid must be 34-character SIDs matching AC and AL followed by 32 hexadecimal characters respectively. FriendlyName and IpAddress are required; IpAddress must use dotted-decimal IPv4 notation, and CidrPrefixLength defaults to 0 when omitted.