Want to provide feedback?

Write to docs@telesign.com.

Cancel a Lease

If you leased a phone number with TeleSign and you no longer need the number, you need to cancel your lease. The https://rest-ww/telesign.com/phone_numbers/leases endpoint can be used to cancel leases on specific phone numbers.

If you have your credentials and access to the Phone Numbers API, you can try a test request in the Phone Numbers API Explorer below. You can also get a code snippet for the request.


Be sure you want to cancel the lease on a phone number - when you send the test request it will actually cancel your lease on the number if you have one. If you do not have a leased phone number and want one so you can test out functionality, refer to the Search for a Phone Number to Lease page to get started.

Phone Numbers API Explorer
NOTE: The time shown in ms is not indicative of regular transmission rates, and only applies to the Phone Number API Explorer. Be sure you want to cancel your lease before trying out a cancel request.
Send requests directly from the browser (CORS must be enabled)
No $$.env variables are being used in this request.

The Phone Numbers API Explorer in the above example is set up to show you how to cancel a number. To add your credentials and see the request run, do the following:

  1. Click the Auth [basic] tab and for Username add your customer ID. For Password add your API key.
  2. Click the Query tab and in the lease_id field, enter the lease ID for the lease you want to cancel. If you do not have a lease ID handy, go to the Retrieve a List of Your Leased Numbers to find the lease ID for the lease you want to cancel. If you are testing the API out and do not have any leases, go to Search for a Phone Number Lease page.
  3. Click Send. Your lease will be cancelled. You will be billed to the end of your current billing period, and then not for any future periods.
  4. Click the Code Generation tab and use the Language drop-downs to choose the language you want the your code snippet in.

Congratulations! You’ve canceled your first lease.

You can learn more about this API endpoint by going to the Cancel (DELETE /leases) page.

Cancel Leases Information

  • The URI is https://rest-ww.telesign.com/v1/phone_numbers/leases
  • You can authenticate with Basic (easiest to implement) and Digest
  • Accept only UTF-8 encoded unicode characters as inputs
  • Use Content-Type - application/x-www-form-urlencoded in request headers

Next Steps

This section offers some suggestions for next steps to take.