import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")
# Remove a specific tollfree number from Powerpack - Unlink & Unrent
powerpack = client.powerpacks.get(uuid='<powerpack_uuid>')
# To Un-Rent while removing a number from powepack - Set flag to "True"
# Version 1
response = powerpack.remove_tollfree('<tollfree_number>', True)
# Version 2
response = powerpack.numberpool.tollfree.remove('<tollfree_number>', True)
print(response)
{
    "api_id": "57936fb0-7ed5-11ea-aa79-0242ac110003",
    "response": "success"
}

Removes the toll-free number from the number pool.

API Endpoint

DELETE
https://api.plivo.com/v1/Account/{auth_id}/NumberPool/{number_pool_uuid}/Tollfree/{tollfree_number}/

Arguments

unrent
boolean
Default is false if not specified.

Returns

This API call removes the toll-free number from the number pool resource identified by the number and number_pool_uuid specified in the request URL.

import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")
# Remove a specific tollfree number from Powerpack - Unlink & Unrent
powerpack = client.powerpacks.get(uuid='<powerpack_uuid>')
# To Un-Rent while removing a number from powepack - Set flag to "True"
# Version 1
response = powerpack.remove_tollfree('<tollfree_number>', True)
# Version 2
response = powerpack.numberpool.tollfree.remove('<tollfree_number>', True)
print(response)
{
    "api_id": "57936fb0-7ed5-11ea-aa79-0242ac110003",
    "response": "success"
}