Delete an address

This code snippet deletes an address.

Example

Replace the following variables in the example code:

KeyDescription
ADDRESS_ID

The unique identifier for the address.

Write the code

Add the following to delete-address.sh:

curl -X "DELETE" "https://api.nexmo.com/v1/addresses/$ADDRESS_ID" \
     -H 'Content-Type: application/json' \
     -u "$VONAGE_API_KEY:$VONAGE_API_SECRET"

View full source

Run your code

Save this file to your machine and run it:

bash delete-address.sh