import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

# Unlink a short code from Powerpack
powerpack = client.powerpacks.get(uuid='<powerpack_uuid>')
# Version 1
response = powerpack.remove_shortcode('<shortcode>')
# Version 2
response = powerpack.numberpool.shortcodes.remove('<shortcode>')
print(response)
{
    "api_id": "c378d44c-0a89-11ea-b072-0242ac110007",
    "response": "success"
}

Removes the short code from the specified number pool resource. Note that the short code isn’t unrented, it’s only unlinked from the number pool.

API Endpoint

DELETE
https://api.plivo.com/v1/Account/{auth_id}/NumberPool/{number_pool_uuid}/Shortcode/{shortcode}/

Arguments

No arguments need to be passed.

Returns

This API call removes the short code from the number pool resource identified by the shortcode and number_pool_uuid specified in the request URL.

import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

# Unlink a short code from Powerpack
powerpack = client.powerpacks.get(uuid='<powerpack_uuid>')
# Version 1
response = powerpack.remove_shortcode('<shortcode>')
# Version 2
response = powerpack.numberpool.shortcodes.remove('<shortcode>')
print(response)
{
    "api_id": "c378d44c-0a89-11ea-b072-0242ac110007",
    "response": "success"
}