Skip to main content
The IP Access Control Lists API lets you create and manage IP address whitelists for authenticating outbound SIP trunks.

API Endpoint

https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/

The IP Access Control List Object

AttributeTypeDescription
ipacl_uuidstringUnique identifier for the IP ACL
namestringFriendly name for the IP ACL
ip_addressesarrayList of whitelisted IP addresses

Example Response

{
  "ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
  "name": "production-servers",
  "ip_addresses": [
    "192.168.1.1",
    "192.168.1.2"
  ]
}

Create an IP Access Control List

Create a new IP whitelist for SIP trunk authentication.
POST https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/

Parameters

ParameterTypeRequiredDescription
namestringNoFriendly name for the IP ACL
ip_addressesarrayYesArray of IP addresses to whitelist
cURL
curl -i --user AUTH_ID:AUTH_TOKEN \
    -H "Content-Type: application/json" \
    -d '{
      "name": "production-servers",
      "ip_addresses": ["192.168.0.1", "192.168.0.2", "10.0.0.1"]
    }' \
    https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/

Response

{
  "api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
  "message": "IP access control list created successfully.",
  "ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
}

Retrieve an IP Access Control List

Get details of a specific IP ACL.
GET https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/{ipacl_uuid}/
cURL
curl -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/

Response

{
  "ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
  "name": "production-servers",
  "ip_addresses": [
    "192.168.1.1",
    "192.168.1.2"
  ]
}

List All IP Access Control Lists

Get all IP ACLs for your account.
GET https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/

Query Parameters

ParameterTypeDescription
limitintegerResults per page (1-20). Default: 20
offsetintegerPagination offset. Default: 0
cURL
curl -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/

Response

{
  "api_id": "a04ad809-3b78-4bbe-9baf-acfc7800b10f",
  "meta": {
    "limit": 20,
    "offset": 0,
    "total_count": 109,
    "previous": null,
    "next": "v1/Account/{auth_id}/Zentrunk/IPAccessControlList/?limit=20&offset=20"
  },
  "objects": [
    {
      "ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
      "name": "production-servers",
      "ip_addresses": ["192.168.1.1", "192.168.1.2"]
    },
    {
      "ipacl_uuid": "a19c4773-4ae6-4b75-92ea-9cf3ea4227d7",
      "name": "staging-servers",
      "ip_addresses": ["10.0.0.1", "10.0.0.2"]
    }
  ]
}

Update an IP Access Control List

Modify an existing IP ACL’s name or IP addresses.
POST https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/{ipacl_uuid}/

Parameters

ParameterTypeDescription
namestringNew friendly name
ip_addressesarrayNew list of IP addresses (replaces existing)
cURL
curl -i --user AUTH_ID:AUTH_TOKEN \
    -H "Content-Type: application/json" \
    -d '{
      "name": "updated-servers",
      "ip_addresses": ["192.168.0.1", "192.168.0.2", "192.168.0.3"]
    }' \
    https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/

Response

{
  "api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
  "message": "IP access control list updated successfully.",
  "ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
}
Updating ip_addresses replaces the entire list. Include all IP addresses you want whitelisted.

Delete an IP Access Control List

Permanently delete an IP ACL.
DELETE https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/{ipacl_uuid}/
cURL
curl -X DELETE -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Response: HTTP 204 No Content
Deleting an IP ACL that is attached to an active trunk will break authentication for that trunk.

Usage with Trunks

After creating an IP ACL, attach it to an outbound trunk:
cURL
curl -i --user AUTH_ID:AUTH_TOKEN \
    -H "Content-Type: application/json" \
    -d '{
      "name": "outbound-trunk",
      "trunk_direction": "outbound",
      "ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
    }' \
    https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/

IP ACL vs Credentials

MethodUse Case
IP ACLWhen your PBX has static IP addresses. Simpler setup, no password management.
CredentialsWhen your PBX has dynamic IPs or you need additional security. Uses SIP digest authentication.
You can use either method (or both) for outbound trunk authentication.
  • Trunks - Create and manage SIP trunks
  • Credentials - Alternative authentication via username/password