Cancel a Number

If you no longer require a Vonage virtual number that you have purchased you can cancel it.

This page shows you how to cancel a number programmatically.

You can also cancel a number online, using the developer dashboard or from the command line, using the Vonage CLI.

Replace the following variables in the sample code with your own values:

KeyDescription
VONAGE_API_KEY

Your Vonage API key (see it on your dashboard).

VONAGE_API_SECRET

Your Vonage API secret (also available on your dashboard).

COUNTRY_CODE

The two digit country code for the number. For example: GB for the United Kingdom

VONAGE_NUMBER

Your Vonage Number. E.g. 447700900000

Write the code

Add the following to cancel-number.sh:

View full source

Run your code

Save this file to your machine and run it:

sh cancel-number.sh

See also