Map ACL to Trunk (Whitelist IP)
7 min
registers your server's public ip address for authentication this is required for outbound/termination calls allowing your system to send calls through the trunk acl (access control list) ensures only authorized ip addresses can use your trunk for outbound calling http request post https //\<your api key> \<your api token>@\<subdomain>/v2/accounts/\<your sid>/trunks/\<trunk sid>/whitelisted ips request headers header value content type application/json request parameters parameter name mandatory/optional value ip mandatory string; your server's public ip address must be a valid ipv4 address example 44 248 146 11, 203 0 113 50 mask optional integer; subnet mask in cidr notation default 32(single ip) use 24for /24 subnet, 16for /16 subnet example 32, 24 example request curl s x post "https //\<your api key> \<your api token>@\<subdomain>/v2/accounts/\<your sid>/trunks/\<trunk sid>/whitelisted ips" \\ h "content type application/json" \\ d '{ "ip" "44 248 146 11", "mask" 32 }' http response on success, the http response status code will be 200 ok example response { "request id" "3daaed4cd05d443f854e07e60dd4c008", "method" "post", "http code" 200, "response" { "code" 200, "error data" null, "status" "success", "data" { "id" "1153", "mask" 32, "trunk sid" "trmum1f708622631150902801a1n", "ip" "44 248 146 11", "friendly name" null, "date created" "2026 01 23t11 37 36z", "date updated" "2026 01 23t11 37 36z" } } } response parameters parameter name type & value id string; unique identifier for this acl entry example 1153 ip string; the whitelisted ip address mask integer; subnet mask in cidr notation trunk sid string; the trunk this acl is associated with friendly name string or null; optional friendly name for the ip date created string; iso 8601 timestamp when acl was created date updated string; iso 8601 timestamp when acl was last updated
