Update an IP access control list
const url = 'https://api.siprtc.io/v1/Accounts/example/SipTrunk/IPAcl/example';const options = { method: 'PUT', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"ip_acl_name":"Office IPs","update_ipacl_list_id":["203.0.113.10"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siprtc.io/v1/Accounts/example/SipTrunk/IPAcl/example \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "ip_acl_name": "Office IPs", "update_ipacl_list_id": [ "203.0.113.10" ] }'Renames an IP access control list and replaces its members. update_ipacl_list_id holds the addresses (not IDs) of the account’s IP address records that should be in the list afterwards: members not named are removed, named addresses are added, and [“”] empties the list. The name must be unique among the owning account’s lists; the status cannot be changed here. A vendor account can pass customer_id to act on a direct child account’s record.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of your account.
ID of the IP access control list.
Query Parameters
Section titled “ Query Parameters ”Vendor accounts only: act on this direct child account instead of your own.
Request Bodyrequired
Section titled “ Request Bodyrequired ”The new name and members.
object
New name of the list.
Example
Office IPsAddresses (not IDs) of the account’s IP address records that should be in the list after the update. Members not named are removed; [“”] removes every member.
Example
[ "203.0.113.10"]Responses
Section titled “ Responses ”Updated (message “ipacl updated successfully”).
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}Ip_acl_name is missing, the list does not exist, the name is taken, the change failed, or the gateway did not supply your company (message “company id is empty”).
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}Missing or wrong Basic-auth credentials (returned by the API gateway).
Example generated
exampleCustomer_id is not a direct child of your account.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}Your account or the customer account could not be looked up.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}